generated-configure.sh revision 991:4da62ed34d20
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_LIBPNG
650PNG_LIBS
651PNG_CFLAGS
652USE_EXTERNAL_LIBGIF
653USE_EXTERNAL_LIBJPEG
654ALSA_LIBS
655ALSA_CFLAGS
656FREETYPE_BUNDLE_LIB_PATH
657FREETYPE_LIBS
658FREETYPE_CFLAGS
659CUPS_CFLAGS
660OPENWIN_HOME
661X_EXTRA_LIBS
662X_LIBS
663X_PRE_LIBS
664X_CFLAGS
665XMKMF
666FIXPATH
667CXXFLAGS_DEBUG_SYMBOLS
668CFLAGS_DEBUG_SYMBOLS
669ZIP_DEBUGINFO_FILES
670ENABLE_DEBUG_SYMBOLS
671USING_BROKEN_SUSE_LD
672COMPILER_SUPPORTS_TARGET_BITS_FLAG
673ZERO_ARCHFLAG
674LDFLAGS_CXX_JDK
675LDFLAGS_JDKEXE_SUFFIX
676LDFLAGS_JDKLIB_SUFFIX
677LDFLAGS_JDKEXE
678LDFLAGS_JDKLIB
679CXXFLAGS_JDKEXE
680CXXFLAGS_JDKLIB
681CFLAGS_JDKEXE
682CFLAGS_JDKLIB
683MACOSX_VERSION_MIN
684PACKAGE_PATH
685LEGACY_EXTRA_LDFLAGS
686LEGACY_EXTRA_CXXFLAGS
687LEGACY_EXTRA_CFLAGS
688CXX_FLAG_DEPS
689C_FLAG_DEPS
690CXX_O_FLAG_NONE
691CXX_O_FLAG_NORM
692CXX_O_FLAG_HI
693CXX_O_FLAG_HIGHEST
694C_O_FLAG_NONE
695C_O_FLAG_NORM
696C_O_FLAG_HI
697C_O_FLAG_HIGHEST
698POST_MCS_CMD
699POST_STRIP_CMD
700SET_EXECUTABLE_ORIGIN
701SET_SHARED_LIBRARY_ORIGIN
702CXX_FLAG_REORDER
703C_FLAG_REORDER
704SET_SHARED_LIBRARY_MAPFILE
705SET_SHARED_LIBRARY_NAME
706SHARED_LIBRARY_FLAGS
707EXE_SUFFIX
708STATIC_LIBRARY_SUFFIX
709SHARED_LIBRARY_SUFFIX
710LIBRARY_PREFIX
711STATIC_LIBRARY
712SHARED_LIBRARY
713OBJ_SUFFIX
714COMPILER_NAME
715JT_HOME
716JTREGEXE
717LIPO
718ac_ct_OBJDUMP
719OBJDUMP
720ac_ct_OBJCOPY
721OBJCOPY
722ac_ct_STRIP
723ac_ct_NM
724MCS
725STRIP
726GNM
727NM
728AS
729CXXCPP
730CPP
731COMPILER_TYPE
732RC_FLAGS
733DUMPBIN
734WINAR
735HOTSPOT_RC
736HOTSPOT_MT
737RC
738MT
739WINLD
740HOTSPOT_LD
741HOTSPOT_CXX
742ARFLAGS
743ac_ct_AR
744AR
745LDEXECXX
746LDCXX
747LDEXE
748LD
749ac_ct_OBJC
750OBJCFLAGS
751OBJC
752ac_ct_CXX
753CXXFLAGS
754CXX
755ac_ct_PROPER_COMPILER_CXX
756PROPER_COMPILER_CXX
757TOOLS_DIR_CXX
758POTENTIAL_CXX
759COMPILER_TARGET_BITS_FLAG
760OBJEXT
761EXEEXT
762ac_ct_CC
763CPPFLAGS
764LDFLAGS
765CFLAGS
766CC
767ac_ct_PROPER_COMPILER_CC
768PROPER_COMPILER_CC
769TOOLS_DIR_CC
770POTENTIAL_CC
771BUILD_LD
772BUILD_CXX
773BUILD_CC
774MSVCR_DLL
775VS_PATH
776VS_LIB
777VS_INCLUDE
778CYGWIN_LINK
779AR_OUT_OPTION
780LD_OUT_OPTION
781EXE_OUT_OPTION
782CC_OUT_OPTION
783BUILD_HOTSPOT
784HOTSPOT_DIST
785BUILD_OUTPUT
786OVERRIDE_SRC_ROOT
787ADD_SRC_ROOT
788JDK_TOPDIR
789NASHORN_TOPDIR
790HOTSPOT_TOPDIR
791JAXWS_TOPDIR
792JAXP_TOPDIR
793CORBA_TOPDIR
794LANGTOOLS_TOPDIR
795BOOT_JDK_JVMARGS
796JAVAC_FLAGS
797BOOT_JDK_SOURCETARGET
798JARSIGNER
799NATIVE2ASCII
800JAR
801JAVAH
802JAVAC
803JAVA
804BOOT_JDK
805BOOT_TOOLSJAR
806BOOT_RTJAR
807JAVA_CHECK
808JAVAC_CHECK
809COOKED_BUILD_NUMBER
810JDK_VERSION
811COPYRIGHT_YEAR
812MACOSX_BUNDLE_ID_BASE
813MACOSX_BUNDLE_NAME_BASE
814COMPANY_NAME
815JDK_RC_PLATFORM_NAME
816PRODUCT_SUFFIX
817PRODUCT_NAME
818LAUNCHER_NAME
819MILESTONE
820JDK_BUILD_NUMBER
821JDK_UPDATE_VERSION
822JDK_MICRO_VERSION
823JDK_MINOR_VERSION
824JDK_MAJOR_VERSION
825USER_RELEASE_SUFFIX
826COMPRESS_JARS
827RMICONNECTOR_IIOP
828UNLIMITED_CRYPTO
829CACERTS_FILE
830TEST_IN_BUILD
831BUILD_HEADLESS
832SUPPORT_HEADFUL
833SUPPORT_HEADLESS
834BDEPS_FTP
835BDEPS_UNZIP
836OS_VERSION_MICRO
837OS_VERSION_MINOR
838OS_VERSION_MAJOR
839PKG_CONFIG
840CODESIGN
841XATTR
842DSYMUTIL
843IS_GNU_TIME
844TIME
845STAT
846HG
847READELF
848OTOOL
849LDD
850ZIP
851UNZIP
852FIND_DELETE
853MAKE
854CHECK_TOOLSDIR_MAKE
855CHECK_TOOLSDIR_GMAKE
856CHECK_MAKE
857CHECK_GMAKE
858PKGHANDLER
859OUTPUT_ROOT
860CONF_NAME
861SPEC
862BUILD_VARIANT_RELEASE
863DEBUG_CLASSFILES
864FASTDEBUG
865VARIANT
866DEBUG_LEVEL
867MACOSX_UNIVERSAL
868INCLUDE_SA
869JVM_VARIANT_CORE
870JVM_VARIANT_ZEROSHARK
871JVM_VARIANT_ZERO
872JVM_VARIANT_KERNEL
873JVM_VARIANT_MINIMAL1
874JVM_VARIANT_CLIENT
875JVM_VARIANT_SERVER
876JVM_VARIANTS
877JVM_INTERPRETER
878JDK_VARIANT
879SET_OPENJDK
880BUILD_LOG_WRAPPER
881BUILD_LOG_PREVIOUS
882BUILD_LOG
883SYS_ROOT
884PATH_SEP
885SRC_ROOT
886ZERO_ARCHDEF
887DEFINE_CROSS_COMPILE_ARCH
888LP64
889OPENJDK_TARGET_OS_EXPORT_DIR
890OPENJDK_TARGET_OS_API_DIR
891OPENJDK_TARGET_CPU_JLI_CFLAGS
892OPENJDK_TARGET_CPU_OSARCH
893OPENJDK_TARGET_CPU_ISADIR
894OPENJDK_TARGET_CPU_LIBDIR
895OPENJDK_TARGET_CPU_LEGACY_LIB
896OPENJDK_TARGET_CPU_LEGACY
897REQUIRED_OS_VERSION
898REQUIRED_OS_NAME
899COMPILE_TYPE
900OPENJDK_TARGET_CPU_ENDIAN
901OPENJDK_TARGET_CPU_BITS
902OPENJDK_TARGET_CPU_ARCH
903OPENJDK_TARGET_CPU
904OPENJDK_TARGET_OS_API
905OPENJDK_TARGET_OS
906OPENJDK_BUILD_CPU_ENDIAN
907OPENJDK_BUILD_CPU_BITS
908OPENJDK_BUILD_CPU_ARCH
909OPENJDK_BUILD_CPU
910OPENJDK_BUILD_OS_API
911OPENJDK_BUILD_OS
912OPENJDK_BUILD_AUTOCONF_NAME
913OPENJDK_TARGET_AUTOCONF_NAME
914target_os
915target_vendor
916target_cpu
917target
918host_os
919host_vendor
920host_cpu
921host
922build_os
923build_vendor
924build_cpu
925build
926SETFILE
927DF
928READLINK
929CYGPATH
930SED
931FGREP
932EGREP
933GREP
934AWK
935XARGS
936WHICH
937WC
938UNIQ
939UNAME
940TR
941TOUCH
942TEE
943TAR
944TAIL
945SORT
946SH
947RM
948PRINTF
949NAWK
950MV
951MKTEMP
952MKDIR
953LS
954LN
955HEAD
956FIND
957FILE
958EXPR
959ECHO
960DIRNAME
961DIFF
962DATE
963CUT
964CPIO
965CP
966COMM
967CMP
968CHMOD
969CAT
970BASH
971BASENAME
972DATE_WHEN_CONFIGURED
973CONFIGURE_COMMAND_LINE
974target_alias
975host_alias
976build_alias
977LIBS
978ECHO_T
979ECHO_N
980ECHO_C
981DEFS
982mandir
983localedir
984libdir
985psdir
986pdfdir
987dvidir
988htmldir
989infodir
990docdir
991oldincludedir
992includedir
993localstatedir
994sharedstatedir
995sysconfdir
996datadir
997datarootdir
998libexecdir
999sbindir
1000bindir
1001program_transform_name
1002prefix
1003exec_prefix
1004PACKAGE_URL
1005PACKAGE_BUGREPORT
1006PACKAGE_STRING
1007PACKAGE_VERSION
1008PACKAGE_TARNAME
1009PACKAGE_NAME
1010PATH_SEPARATOR
1011SHELL'
1012ac_subst_files=''
1013ac_user_opts='
1014enable_option_checking
1015with_target_bits
1016with_sys_root
1017with_tools_dir
1018with_devkit
1019enable_openjdk_only
1020with_custom_make_dir
1021with_jdk_variant
1022with_jvm_interpreter
1023with_jvm_variants
1024enable_debug
1025with_debug_level
1026with_conf_name
1027with_builddeps_conf
1028with_builddeps_server
1029with_builddeps_dir
1030with_builddeps_group
1031enable_headful
1032enable_hotspot_test_in_build
1033with_cacerts_file
1034enable_unlimited_crypto
1035enable_rmiconnector_iiop
1036with_milestone
1037with_update_version
1038with_user_release_suffix
1039with_build_number
1040with_boot_jdk
1041with_boot_jdk_jvmargs
1042with_add_source_root
1043with_override_source_root
1044with_adds_and_overrides
1045with_override_langtools
1046with_override_corba
1047with_override_jaxp
1048with_override_jaxws
1049with_override_hotspot
1050with_override_nashorn
1051with_override_jdk
1052with_import_hotspot
1053with_msvcr_dll
1054with_dxsdk
1055with_dxsdk_lib
1056with_dxsdk_include
1057with_jtreg
1058with_extra_cflags
1059with_extra_cxxflags
1060with_extra_ldflags
1061enable_debug_symbols
1062enable_zip_debug_info
1063enable_macosx_runtime_support
1064with_x
1065with_cups
1066with_cups_include
1067with_freetype
1068with_freetype_include
1069with_freetype_lib
1070enable_freetype_bundling
1071with_alsa
1072with_alsa_include
1073with_alsa_lib
1074with_giflib
1075with_libpng
1076with_zlib
1077with_stdc__lib
1078with_num_cores
1079with_memory_size
1080with_jobs
1081with_sjavac_server_java
1082enable_sjavac
1083enable_precompiled_headers
1084enable_ccache
1085with_ccache_dir
1086'
1087      ac_precious_vars='build_alias
1088host_alias
1089target_alias
1090BASENAME
1091BASH
1092CAT
1093CHMOD
1094CMP
1095COMM
1096CP
1097CPIO
1098CUT
1099DATE
1100DIFF
1101DIRNAME
1102ECHO
1103EXPR
1104FILE
1105FIND
1106HEAD
1107LN
1108LS
1109MKDIR
1110MKTEMP
1111MV
1112NAWK
1113PRINTF
1114RM
1115SH
1116SORT
1117TAIL
1118TAR
1119TEE
1120TOUCH
1121TR
1122UNAME
1123UNIQ
1124WC
1125WHICH
1126XARGS
1127AWK
1128GREP
1129EGREP
1130FGREP
1131SED
1132CYGPATH
1133READLINK
1134DF
1135SETFILE
1136UNZIP
1137ZIP
1138LDD
1139OTOOL
1140READELF
1141HG
1142STAT
1143TIME
1144DSYMUTIL
1145XATTR
1146CODESIGN
1147PKG_CONFIG
1148JAVA
1149JAVAC
1150JAVAH
1151JAR
1152NATIVE2ASCII
1153JARSIGNER
1154BUILD_CC
1155BUILD_CXX
1156BUILD_LD
1157CC
1158CFLAGS
1159LDFLAGS
1160LIBS
1161CPPFLAGS
1162CXX
1163CXXFLAGS
1164CCC
1165OBJC
1166OBJCFLAGS
1167AR
1168CPP
1169CXXCPP
1170AS
1171NM
1172GNM
1173STRIP
1174MCS
1175OBJCOPY
1176OBJDUMP
1177LIPO
1178JTREGEXE
1179XMKMF
1180FREETYPE_CFLAGS
1181FREETYPE_LIBS
1182ALSA_CFLAGS
1183ALSA_LIBS
1184PNG_CFLAGS
1185PNG_LIBS
1186LIBFFI_CFLAGS
1187LIBFFI_LIBS
1188CCACHE'
1189
1190
1191# Initialize some variables set by options.
1192ac_init_help=
1193ac_init_version=false
1194ac_unrecognized_opts=
1195ac_unrecognized_sep=
1196# The variables have the same names as the options, with
1197# dashes changed to underlines.
1198cache_file=/dev/null
1199exec_prefix=NONE
1200no_create=
1201no_recursion=
1202prefix=NONE
1203program_prefix=NONE
1204program_suffix=NONE
1205program_transform_name=s,x,x,
1206silent=
1207site=
1208srcdir=
1209verbose=
1210x_includes=NONE
1211x_libraries=NONE
1212
1213# Installation directory options.
1214# These are left unexpanded so users can "make install exec_prefix=/foo"
1215# and all the variables that are supposed to be based on exec_prefix
1216# by default will actually change.
1217# Use braces instead of parens because sh, perl, etc. also accept them.
1218# (The list follows the same order as the GNU Coding Standards.)
1219bindir='${exec_prefix}/bin'
1220sbindir='${exec_prefix}/sbin'
1221libexecdir='${exec_prefix}/libexec'
1222datarootdir='${prefix}/share'
1223datadir='${datarootdir}'
1224sysconfdir='${prefix}/etc'
1225sharedstatedir='${prefix}/com'
1226localstatedir='${prefix}/var'
1227includedir='${prefix}/include'
1228oldincludedir='/usr/include'
1229docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1230infodir='${datarootdir}/info'
1231htmldir='${docdir}'
1232dvidir='${docdir}'
1233pdfdir='${docdir}'
1234psdir='${docdir}'
1235libdir='${exec_prefix}/lib'
1236localedir='${datarootdir}/locale'
1237mandir='${datarootdir}/man'
1238
1239ac_prev=
1240ac_dashdash=
1241for ac_option
1242do
1243  # If the previous option needs an argument, assign it.
1244  if test -n "$ac_prev"; then
1245    eval $ac_prev=\$ac_option
1246    ac_prev=
1247    continue
1248  fi
1249
1250  case $ac_option in
1251  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1252  *=)   ac_optarg= ;;
1253  *)    ac_optarg=yes ;;
1254  esac
1255
1256  # Accept the important Cygnus configure options, so we can diagnose typos.
1257
1258  case $ac_dashdash$ac_option in
1259  --)
1260    ac_dashdash=yes ;;
1261
1262  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1263    ac_prev=bindir ;;
1264  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1265    bindir=$ac_optarg ;;
1266
1267  -build | --build | --buil | --bui | --bu)
1268    ac_prev=build_alias ;;
1269  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1270    build_alias=$ac_optarg ;;
1271
1272  -cache-file | --cache-file | --cache-fil | --cache-fi \
1273  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1274    ac_prev=cache_file ;;
1275  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1276  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1277    cache_file=$ac_optarg ;;
1278
1279  --config-cache | -C)
1280    cache_file=config.cache ;;
1281
1282  -datadir | --datadir | --datadi | --datad)
1283    ac_prev=datadir ;;
1284  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1285    datadir=$ac_optarg ;;
1286
1287  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1288  | --dataroo | --dataro | --datar)
1289    ac_prev=datarootdir ;;
1290  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1291  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1292    datarootdir=$ac_optarg ;;
1293
1294  -disable-* | --disable-*)
1295    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1296    # Reject names that are not valid shell variable names.
1297    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1298      as_fn_error $? "invalid feature name: $ac_useropt"
1299    ac_useropt_orig=$ac_useropt
1300    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1301    case $ac_user_opts in
1302      *"
1303"enable_$ac_useropt"
1304"*) ;;
1305      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1306	 ac_unrecognized_sep=', ';;
1307    esac
1308    eval enable_$ac_useropt=no ;;
1309
1310  -docdir | --docdir | --docdi | --doc | --do)
1311    ac_prev=docdir ;;
1312  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1313    docdir=$ac_optarg ;;
1314
1315  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1316    ac_prev=dvidir ;;
1317  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1318    dvidir=$ac_optarg ;;
1319
1320  -enable-* | --enable-*)
1321    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1322    # Reject names that are not valid shell variable names.
1323    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1324      as_fn_error $? "invalid feature name: $ac_useropt"
1325    ac_useropt_orig=$ac_useropt
1326    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1327    case $ac_user_opts in
1328      *"
1329"enable_$ac_useropt"
1330"*) ;;
1331      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1332	 ac_unrecognized_sep=', ';;
1333    esac
1334    eval enable_$ac_useropt=\$ac_optarg ;;
1335
1336  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1337  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1338  | --exec | --exe | --ex)
1339    ac_prev=exec_prefix ;;
1340  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1341  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1342  | --exec=* | --exe=* | --ex=*)
1343    exec_prefix=$ac_optarg ;;
1344
1345  -gas | --gas | --ga | --g)
1346    # Obsolete; use --with-gas.
1347    with_gas=yes ;;
1348
1349  -help | --help | --hel | --he | -h)
1350    ac_init_help=long ;;
1351  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1352    ac_init_help=recursive ;;
1353  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1354    ac_init_help=short ;;
1355
1356  -host | --host | --hos | --ho)
1357    ac_prev=host_alias ;;
1358  -host=* | --host=* | --hos=* | --ho=*)
1359    host_alias=$ac_optarg ;;
1360
1361  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1362    ac_prev=htmldir ;;
1363  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1364  | --ht=*)
1365    htmldir=$ac_optarg ;;
1366
1367  -includedir | --includedir | --includedi | --included | --include \
1368  | --includ | --inclu | --incl | --inc)
1369    ac_prev=includedir ;;
1370  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1371  | --includ=* | --inclu=* | --incl=* | --inc=*)
1372    includedir=$ac_optarg ;;
1373
1374  -infodir | --infodir | --infodi | --infod | --info | --inf)
1375    ac_prev=infodir ;;
1376  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1377    infodir=$ac_optarg ;;
1378
1379  -libdir | --libdir | --libdi | --libd)
1380    ac_prev=libdir ;;
1381  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1382    libdir=$ac_optarg ;;
1383
1384  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1385  | --libexe | --libex | --libe)
1386    ac_prev=libexecdir ;;
1387  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1388  | --libexe=* | --libex=* | --libe=*)
1389    libexecdir=$ac_optarg ;;
1390
1391  -localedir | --localedir | --localedi | --localed | --locale)
1392    ac_prev=localedir ;;
1393  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1394    localedir=$ac_optarg ;;
1395
1396  -localstatedir | --localstatedir | --localstatedi | --localstated \
1397  | --localstate | --localstat | --localsta | --localst | --locals)
1398    ac_prev=localstatedir ;;
1399  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1400  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1401    localstatedir=$ac_optarg ;;
1402
1403  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1404    ac_prev=mandir ;;
1405  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1406    mandir=$ac_optarg ;;
1407
1408  -nfp | --nfp | --nf)
1409    # Obsolete; use --without-fp.
1410    with_fp=no ;;
1411
1412  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1413  | --no-cr | --no-c | -n)
1414    no_create=yes ;;
1415
1416  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1417  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1418    no_recursion=yes ;;
1419
1420  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1421  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1422  | --oldin | --oldi | --old | --ol | --o)
1423    ac_prev=oldincludedir ;;
1424  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1425  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1426  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1427    oldincludedir=$ac_optarg ;;
1428
1429  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1430    ac_prev=prefix ;;
1431  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1432    prefix=$ac_optarg ;;
1433
1434  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1435  | --program-pre | --program-pr | --program-p)
1436    ac_prev=program_prefix ;;
1437  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1438  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1439    program_prefix=$ac_optarg ;;
1440
1441  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1442  | --program-suf | --program-su | --program-s)
1443    ac_prev=program_suffix ;;
1444  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1445  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1446    program_suffix=$ac_optarg ;;
1447
1448  -program-transform-name | --program-transform-name \
1449  | --program-transform-nam | --program-transform-na \
1450  | --program-transform-n | --program-transform- \
1451  | --program-transform | --program-transfor \
1452  | --program-transfo | --program-transf \
1453  | --program-trans | --program-tran \
1454  | --progr-tra | --program-tr | --program-t)
1455    ac_prev=program_transform_name ;;
1456  -program-transform-name=* | --program-transform-name=* \
1457  | --program-transform-nam=* | --program-transform-na=* \
1458  | --program-transform-n=* | --program-transform-=* \
1459  | --program-transform=* | --program-transfor=* \
1460  | --program-transfo=* | --program-transf=* \
1461  | --program-trans=* | --program-tran=* \
1462  | --progr-tra=* | --program-tr=* | --program-t=*)
1463    program_transform_name=$ac_optarg ;;
1464
1465  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1466    ac_prev=pdfdir ;;
1467  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1468    pdfdir=$ac_optarg ;;
1469
1470  -psdir | --psdir | --psdi | --psd | --ps)
1471    ac_prev=psdir ;;
1472  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1473    psdir=$ac_optarg ;;
1474
1475  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1476  | -silent | --silent | --silen | --sile | --sil)
1477    silent=yes ;;
1478
1479  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1480    ac_prev=sbindir ;;
1481  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1482  | --sbi=* | --sb=*)
1483    sbindir=$ac_optarg ;;
1484
1485  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1486  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1487  | --sharedst | --shareds | --shared | --share | --shar \
1488  | --sha | --sh)
1489    ac_prev=sharedstatedir ;;
1490  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1491  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1492  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1493  | --sha=* | --sh=*)
1494    sharedstatedir=$ac_optarg ;;
1495
1496  -site | --site | --sit)
1497    ac_prev=site ;;
1498  -site=* | --site=* | --sit=*)
1499    site=$ac_optarg ;;
1500
1501  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1502    ac_prev=srcdir ;;
1503  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1504    srcdir=$ac_optarg ;;
1505
1506  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1507  | --syscon | --sysco | --sysc | --sys | --sy)
1508    ac_prev=sysconfdir ;;
1509  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1510  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1511    sysconfdir=$ac_optarg ;;
1512
1513  -target | --target | --targe | --targ | --tar | --ta | --t)
1514    ac_prev=target_alias ;;
1515  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1516    target_alias=$ac_optarg ;;
1517
1518  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1519    verbose=yes ;;
1520
1521  -version | --version | --versio | --versi | --vers | -V)
1522    ac_init_version=: ;;
1523
1524  -with-* | --with-*)
1525    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1526    # Reject names that are not valid shell variable names.
1527    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1528      as_fn_error $? "invalid package name: $ac_useropt"
1529    ac_useropt_orig=$ac_useropt
1530    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1531    case $ac_user_opts in
1532      *"
1533"with_$ac_useropt"
1534"*) ;;
1535      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1536	 ac_unrecognized_sep=', ';;
1537    esac
1538    eval with_$ac_useropt=\$ac_optarg ;;
1539
1540  -without-* | --without-*)
1541    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1542    # Reject names that are not valid shell variable names.
1543    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1544      as_fn_error $? "invalid package name: $ac_useropt"
1545    ac_useropt_orig=$ac_useropt
1546    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1547    case $ac_user_opts in
1548      *"
1549"with_$ac_useropt"
1550"*) ;;
1551      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1552	 ac_unrecognized_sep=', ';;
1553    esac
1554    eval with_$ac_useropt=no ;;
1555
1556  --x)
1557    # Obsolete; use --with-x.
1558    with_x=yes ;;
1559
1560  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1561  | --x-incl | --x-inc | --x-in | --x-i)
1562    ac_prev=x_includes ;;
1563  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1564  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1565    x_includes=$ac_optarg ;;
1566
1567  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1568  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1569    ac_prev=x_libraries ;;
1570  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1571  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1572    x_libraries=$ac_optarg ;;
1573
1574  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1575Try \`$0 --help' for more information"
1576    ;;
1577
1578  *=*)
1579    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1580    # Reject names that are not valid shell variable names.
1581    case $ac_envvar in #(
1582      '' | [0-9]* | *[!_$as_cr_alnum]* )
1583      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1584    esac
1585    eval $ac_envvar=\$ac_optarg
1586    export $ac_envvar ;;
1587
1588  *)
1589    # FIXME: should be removed in autoconf 3.0.
1590    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1591    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1592      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1593    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1594    ;;
1595
1596  esac
1597done
1598
1599if test -n "$ac_prev"; then
1600  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1601  as_fn_error $? "missing argument to $ac_option"
1602fi
1603
1604if test -n "$ac_unrecognized_opts"; then
1605  case $enable_option_checking in
1606    no) ;;
1607    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1608    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1609  esac
1610fi
1611
1612# Check all directory arguments for consistency.
1613for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1614		datadir sysconfdir sharedstatedir localstatedir includedir \
1615		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1616		libdir localedir mandir
1617do
1618  eval ac_val=\$$ac_var
1619  # Remove trailing slashes.
1620  case $ac_val in
1621    */ )
1622      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1623      eval $ac_var=\$ac_val;;
1624  esac
1625  # Be sure to have absolute directory names.
1626  case $ac_val in
1627    [\\/$]* | ?:[\\/]* )  continue;;
1628    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1629  esac
1630  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1631done
1632
1633# There might be people who depend on the old broken behavior: `$host'
1634# used to hold the argument of --host etc.
1635# FIXME: To remove some day.
1636build=$build_alias
1637host=$host_alias
1638target=$target_alias
1639
1640# FIXME: To remove some day.
1641if test "x$host_alias" != x; then
1642  if test "x$build_alias" = x; then
1643    cross_compiling=maybe
1644  elif test "x$build_alias" != "x$host_alias"; then
1645    cross_compiling=yes
1646  fi
1647fi
1648
1649ac_tool_prefix=
1650test -n "$host_alias" && ac_tool_prefix=$host_alias-
1651
1652test "$silent" = yes && exec 6>/dev/null
1653
1654
1655ac_pwd=`pwd` && test -n "$ac_pwd" &&
1656ac_ls_di=`ls -di .` &&
1657ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1658  as_fn_error $? "working directory cannot be determined"
1659test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1660  as_fn_error $? "pwd does not report name of working directory"
1661
1662
1663# Find the source files, if location was not specified.
1664if test -z "$srcdir"; then
1665  ac_srcdir_defaulted=yes
1666  # Try the directory containing this script, then the parent directory.
1667  ac_confdir=`$as_dirname -- "$as_myself" ||
1668$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1669	 X"$as_myself" : 'X\(//\)[^/]' \| \
1670	 X"$as_myself" : 'X\(//\)$' \| \
1671	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1672$as_echo X"$as_myself" |
1673    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1674	    s//\1/
1675	    q
1676	  }
1677	  /^X\(\/\/\)[^/].*/{
1678	    s//\1/
1679	    q
1680	  }
1681	  /^X\(\/\/\)$/{
1682	    s//\1/
1683	    q
1684	  }
1685	  /^X\(\/\).*/{
1686	    s//\1/
1687	    q
1688	  }
1689	  s/.*/./; q'`
1690  srcdir=$ac_confdir
1691  if test ! -r "$srcdir/$ac_unique_file"; then
1692    srcdir=..
1693  fi
1694else
1695  ac_srcdir_defaulted=no
1696fi
1697if test ! -r "$srcdir/$ac_unique_file"; then
1698  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1699  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1700fi
1701ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1702ac_abs_confdir=`(
1703	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1704	pwd)`
1705# When building in place, set srcdir=.
1706if test "$ac_abs_confdir" = "$ac_pwd"; then
1707  srcdir=.
1708fi
1709# Remove unnecessary trailing slashes from srcdir.
1710# Double slashes in file names in object file debugging info
1711# mess up M-x gdb in Emacs.
1712case $srcdir in
1713*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1714esac
1715for ac_var in $ac_precious_vars; do
1716  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1717  eval ac_env_${ac_var}_value=\$${ac_var}
1718  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1719  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1720done
1721
1722#
1723# Report the --help message.
1724#
1725if test "$ac_init_help" = "long"; then
1726  # Omit some internal or obsolete options to make the list less imposing.
1727  # This message is too long to be a string in the A/UX 3.1 sh.
1728  cat <<_ACEOF
1729\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1730
1731Usage: $0 [OPTION]... [VAR=VALUE]...
1732
1733To assign environment variables (e.g., CC, CFLAGS...), specify them as
1734VAR=VALUE.  See below for descriptions of some of the useful variables.
1735
1736Defaults for the options are specified in brackets.
1737
1738Configuration:
1739  -h, --help              display this help and exit
1740      --help=short        display options specific to this package
1741      --help=recursive    display the short help of all the included packages
1742  -V, --version           display version information and exit
1743  -q, --quiet, --silent   do not print \`checking ...' messages
1744      --cache-file=FILE   cache test results in FILE [disabled]
1745  -C, --config-cache      alias for \`--cache-file=config.cache'
1746  -n, --no-create         do not create output files
1747      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1748
1749Installation directories:
1750  --prefix=PREFIX         install architecture-independent files in PREFIX
1751                          [$ac_default_prefix]
1752  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1753                          [PREFIX]
1754
1755By default, \`make install' will install all the files in
1756\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1757an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1758for instance \`--prefix=\$HOME'.
1759
1760For better control, use the options below.
1761
1762Fine tuning of the installation directories:
1763  --bindir=DIR            user executables [EPREFIX/bin]
1764  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1765  --libexecdir=DIR        program executables [EPREFIX/libexec]
1766  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1767  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1768  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1769  --libdir=DIR            object code libraries [EPREFIX/lib]
1770  --includedir=DIR        C header files [PREFIX/include]
1771  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1772  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1773  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1774  --infodir=DIR           info documentation [DATAROOTDIR/info]
1775  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1776  --mandir=DIR            man documentation [DATAROOTDIR/man]
1777  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1778  --htmldir=DIR           html documentation [DOCDIR]
1779  --dvidir=DIR            dvi documentation [DOCDIR]
1780  --pdfdir=DIR            pdf documentation [DOCDIR]
1781  --psdir=DIR             ps documentation [DOCDIR]
1782_ACEOF
1783
1784  cat <<\_ACEOF
1785
1786X features:
1787  --x-includes=DIR    X include files are in DIR
1788  --x-libraries=DIR   X library files are in DIR
1789
1790System types:
1791  --build=BUILD     configure for building on BUILD [guessed]
1792  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1793  --target=TARGET   configure for building compilers for TARGET [HOST]
1794_ACEOF
1795fi
1796
1797if test -n "$ac_init_help"; then
1798  case $ac_init_help in
1799     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1800   esac
1801  cat <<\_ACEOF
1802
1803Optional Features:
1804  --disable-option-checking  ignore unrecognized --enable/--with options
1805  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1806  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1807  --enable-openjdk-only   suppress building custom source even if present
1808                          [disabled]
1809  --enable-debug          set the debug level to fastdebug (shorthand for
1810                          --with-debug-level=fastdebug) [disabled]
1811  --disable-headful       disable building headful support (graphical UI
1812                          support) [enabled]
1813  --enable-hotspot-test-in-build
1814                          run the Queens test after Hotspot build [disabled]
1815  --enable-unlimited-crypto
1816                          Enable unlimited crypto policy [disabled]
1817  --enable-rmiconnector-iiop
1818                          enable the JMX RMIConnector iiop transport
1819                          [disabled]
1820  --disable-debug-symbols disable generation of debug symbols [enabled]
1821  --disable-zip-debug-info
1822                          disable zipping of debug-info files [enabled]
1823  --enable-macosx-runtime-support
1824                          Deprecated. Option is kept for backwards
1825                          compatibility and is ignored
1826  --disable-freetype-bundling
1827                          disable bundling of the freetype library with the
1828                          build result [enabled on Windows or when using
1829                          --with-freetype, disabled otherwise]
1830  --enable-sjavac         use sjavac to do fast incremental compiles
1831                          [disabled]
1832  --disable-precompiled-headers
1833                          disable using precompiled headers when compiling C++
1834                          [enabled]
1835  --enable-ccache         enable using ccache to speed up recompilations
1836                          [disabled]
1837
1838Optional Packages:
1839  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1840  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1841  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1842                          support it), e.g. --with-target-bits=32 [guessed]
1843  --with-sys-root         pass this sys-root to the compilers and tools (for
1844                          cross-compiling)
1845  --with-tools-dir        search this directory for compilers and tools (for
1846                          cross-compiling)
1847  --with-devkit           use this directory as base for tools-dir and
1848                          sys-root (for cross-compiling)
1849  --with-custom-make-dir  Deprecated. Option is kept for backwards
1850                          compatibility and is ignored
1851  --with-jdk-variant      JDK variant to build (normal) [normal]
1852  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1853  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1854                          client, minimal1, kernel, zero, zeroshark, core)
1855                          [server]
1856  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1857                          [release]
1858  --with-conf-name        use this as the name of the configuration [generated
1859                          from important configuration options]
1860  --with-builddeps-conf   use this configuration file for the builddeps
1861  --with-builddeps-server download and use build dependencies from this server
1862                          url
1863  --with-builddeps-dir    store downloaded build dependencies here
1864                          [/localhome/builddeps]
1865  --with-builddeps-group  chgrp the downloaded build dependencies to this
1866                          group
1867  --with-cacerts-file     specify alternative cacerts file
1868  --with-milestone        Set milestone value for build [internal]
1869  --with-update-version   Set update version value for build [b00]
1870  --with-user-release-suffix
1871                          Add a custom string to the version string if build
1872                          number is not set.[username_builddateb00]
1873  --with-build-number     Set build number value for build [b00]
1874  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1875  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1876                          invocations of the Boot JDK, overriding the default
1877                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1878                          -enableassertions"
1879  --with-add-source-root  for each and every source directory, look in this
1880                          additional source root for the same directory; if it
1881                          exists and have files in it, include it in the build
1882  --with-override-source-root
1883                          for each and every source directory, look in this
1884                          override source root for the same directory; if it
1885                          exists, use that directory instead and ignore the
1886                          directory in the original source root
1887  --with-adds-and-overrides
1888                          use the subdirs 'adds' and 'overrides' in the
1889                          specified directory as add-source-root and
1890                          override-source-root
1891  --with-override-langtools
1892                          use this langtools dir for the build
1893  --with-override-corba   use this corba dir for the build
1894  --with-override-jaxp    use this jaxp dir for the build
1895  --with-override-jaxws   use this jaxws dir for the build
1896  --with-override-hotspot use this hotspot dir for the build
1897  --with-override-nashorn use this nashorn dir for the build
1898  --with-override-jdk     use this jdk dir for the build
1899  --with-import-hotspot   import hotspot binaries from this jdk image or
1900                          hotspot build dist dir instead of building from
1901                          source
1902  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1903                          only) [probed]
1904  --with-dxsdk            Deprecated. Option is kept for backwards
1905                          compatibility and is ignored
1906  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1907                          compatibility and is ignored
1908  --with-dxsdk-include    Deprecated. Option is kept for backwards
1909                          compatibility and is ignored
1910  --with-jtreg            Regression Test Harness [probed]
1911  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1912  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1913  --with-extra-ldflags    extra flags to be used when linking jdk
1914  --with-x                use the X Window System
1915  --with-cups             specify prefix directory for the cups package
1916                          (expecting the headers under PATH/include)
1917  --with-cups-include     specify directory for the cups include files
1918  --with-freetype         specify prefix directory for the freetype package
1919                          (expecting the libraries under PATH/lib and the
1920                          headers under PATH/include)
1921  --with-freetype-include specify directory for the freetype include files
1922  --with-freetype-lib     specify directory for the freetype library
1923  --with-alsa             specify prefix directory for the alsa package
1924                          (expecting the libraries under PATH/lib and the
1925                          headers under PATH/include)
1926  --with-alsa-include     specify directory for the alsa include files
1927  --with-alsa-lib         specify directory for the alsa library
1928  --with-giflib           use giflib from build system or OpenJDK source
1929                          (system, bundled) [bundled]
1930  --with-libpng           use libpng from build system or OpenJDK source
1931                          (system, bundled) [bundled]
1932  --with-zlib             use zlib from build system or OpenJDK source
1933                          (system, bundled) [bundled]
1934  --with-stdc++lib=<static>,<dynamic>,<default>
1935                          force linking of the C++ runtime on Linux to either
1936                          static or dynamic, default is static with dynamic as
1937                          fallback
1938  --with-num-cores        number of cores in the build system, e.g.
1939                          --with-num-cores=8 [probed]
1940  --with-memory-size      memory (in MB) available in the build system, e.g.
1941                          --with-memory-size=1024 [probed]
1942  --with-jobs             number of parallel jobs to let make run [calculated
1943                          based on cores and memory]
1944  --with-sjavac-server-java
1945                          use this java binary for running the sjavac
1946                          background server [Boot JDK java]
1947  --with-ccache-dir       where to store ccache files [~/.ccache]
1948
1949Some influential environment variables:
1950  BASENAME    Override default value for BASENAME
1951  BASH        Override default value for BASH
1952  CAT         Override default value for CAT
1953  CHMOD       Override default value for CHMOD
1954  CMP         Override default value for CMP
1955  COMM        Override default value for COMM
1956  CP          Override default value for CP
1957  CPIO        Override default value for CPIO
1958  CUT         Override default value for CUT
1959  DATE        Override default value for DATE
1960  DIFF        Override default value for DIFF
1961  DIRNAME     Override default value for DIRNAME
1962  ECHO        Override default value for ECHO
1963  EXPR        Override default value for EXPR
1964  FILE        Override default value for FILE
1965  FIND        Override default value for FIND
1966  HEAD        Override default value for HEAD
1967  LN          Override default value for LN
1968  LS          Override default value for LS
1969  MKDIR       Override default value for MKDIR
1970  MKTEMP      Override default value for MKTEMP
1971  MV          Override default value for MV
1972  NAWK        Override default value for NAWK
1973  PRINTF      Override default value for PRINTF
1974  RM          Override default value for RM
1975  SH          Override default value for SH
1976  SORT        Override default value for SORT
1977  TAIL        Override default value for TAIL
1978  TAR         Override default value for TAR
1979  TEE         Override default value for TEE
1980  TOUCH       Override default value for TOUCH
1981  TR          Override default value for TR
1982  UNAME       Override default value for UNAME
1983  UNIQ        Override default value for UNIQ
1984  WC          Override default value for WC
1985  WHICH       Override default value for WHICH
1986  XARGS       Override default value for XARGS
1987  AWK         Override default value for AWK
1988  GREP        Override default value for GREP
1989  EGREP       Override default value for EGREP
1990  FGREP       Override default value for FGREP
1991  SED         Override default value for SED
1992  CYGPATH     Override default value for CYGPATH
1993  READLINK    Override default value for READLINK
1994  DF          Override default value for DF
1995  SETFILE     Override default value for SETFILE
1996  UNZIP       Override default value for UNZIP
1997  ZIP         Override default value for ZIP
1998  LDD         Override default value for LDD
1999  OTOOL       Override default value for OTOOL
2000  READELF     Override default value for READELF
2001  HG          Override default value for HG
2002  STAT        Override default value for STAT
2003  TIME        Override default value for TIME
2004  DSYMUTIL    Override default value for DSYMUTIL
2005  XATTR       Override default value for XATTR
2006  CODESIGN    Override default value for CODESIGN
2007  PKG_CONFIG  path to pkg-config utility
2008  JAVA        Override default value for JAVA
2009  JAVAC       Override default value for JAVAC
2010  JAVAH       Override default value for JAVAH
2011  JAR         Override default value for JAR
2012  NATIVE2ASCII
2013              Override default value for NATIVE2ASCII
2014  JARSIGNER   Override default value for JARSIGNER
2015  BUILD_CC    Override default value for BUILD_CC
2016  BUILD_CXX   Override default value for BUILD_CXX
2017  BUILD_LD    Override default value for BUILD_LD
2018  CC          C compiler command
2019  CFLAGS      C compiler flags
2020  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2021              nonstandard directory <lib dir>
2022  LIBS        libraries to pass to the linker, e.g. -l<library>
2023  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2024              you have headers in a nonstandard directory <include dir>
2025  CXX         C++ compiler command
2026  CXXFLAGS    C++ compiler flags
2027  OBJC        Objective C compiler command
2028  OBJCFLAGS   Objective C compiler flags
2029  AR          Override default value for AR
2030  CPP         C preprocessor
2031  CXXCPP      C++ preprocessor
2032  AS          Override default value for AS
2033  NM          Override default value for NM
2034  GNM         Override default value for GNM
2035  STRIP       Override default value for STRIP
2036  MCS         Override default value for MCS
2037  OBJCOPY     Override default value for OBJCOPY
2038  OBJDUMP     Override default value for OBJDUMP
2039  LIPO        Override default value for LIPO
2040  JTREGEXE    Override default value for JTREGEXE
2041  XMKMF       Path to xmkmf, Makefile generator for X Window System
2042  FREETYPE_CFLAGS
2043              C compiler flags for FREETYPE, overriding pkg-config
2044  FREETYPE_LIBS
2045              linker flags for FREETYPE, overriding pkg-config
2046  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2047  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2048  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2049  PNG_LIBS    linker flags for PNG, overriding pkg-config
2050  LIBFFI_CFLAGS
2051              C compiler flags for LIBFFI, overriding pkg-config
2052  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2053  CCACHE      Override default value for CCACHE
2054
2055Use these variables to override the choices made by `configure' or to help
2056it to find libraries and programs with nonstandard names/locations.
2057
2058Report bugs to <build-dev@openjdk.java.net>.
2059OpenJDK home page: <http://openjdk.java.net>.
2060_ACEOF
2061ac_status=$?
2062fi
2063
2064if test "$ac_init_help" = "recursive"; then
2065  # If there are subdirs, report their specific --help.
2066  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2067    test -d "$ac_dir" ||
2068      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2069      continue
2070    ac_builddir=.
2071
2072case "$ac_dir" in
2073.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2074*)
2075  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2076  # A ".." for each directory in $ac_dir_suffix.
2077  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2078  case $ac_top_builddir_sub in
2079  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2080  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2081  esac ;;
2082esac
2083ac_abs_top_builddir=$ac_pwd
2084ac_abs_builddir=$ac_pwd$ac_dir_suffix
2085# for backward compatibility:
2086ac_top_builddir=$ac_top_build_prefix
2087
2088case $srcdir in
2089  .)  # We are building in place.
2090    ac_srcdir=.
2091    ac_top_srcdir=$ac_top_builddir_sub
2092    ac_abs_top_srcdir=$ac_pwd ;;
2093  [\\/]* | ?:[\\/]* )  # Absolute name.
2094    ac_srcdir=$srcdir$ac_dir_suffix;
2095    ac_top_srcdir=$srcdir
2096    ac_abs_top_srcdir=$srcdir ;;
2097  *) # Relative name.
2098    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2099    ac_top_srcdir=$ac_top_build_prefix$srcdir
2100    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2101esac
2102ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2103
2104    cd "$ac_dir" || { ac_status=$?; continue; }
2105    # Check for guested configure.
2106    if test -f "$ac_srcdir/configure.gnu"; then
2107      echo &&
2108      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2109    elif test -f "$ac_srcdir/configure"; then
2110      echo &&
2111      $SHELL "$ac_srcdir/configure" --help=recursive
2112    else
2113      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2114    fi || ac_status=$?
2115    cd "$ac_pwd" || { ac_status=$?; break; }
2116  done
2117fi
2118
2119test -n "$ac_init_help" && exit $ac_status
2120if $ac_init_version; then
2121  cat <<\_ACEOF
2122OpenJDK configure jdk8
2123generated by GNU Autoconf 2.69
2124
2125Copyright (C) 2012 Free Software Foundation, Inc.
2126This configure script is free software; the Free Software Foundation
2127gives unlimited permission to copy, distribute and modify it.
2128_ACEOF
2129  exit
2130fi
2131
2132## ------------------------ ##
2133## Autoconf initialization. ##
2134## ------------------------ ##
2135
2136# ac_fn_c_try_compile LINENO
2137# --------------------------
2138# Try to compile conftest.$ac_ext, and return whether this succeeded.
2139ac_fn_c_try_compile ()
2140{
2141  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2142  rm -f conftest.$ac_objext
2143  if { { ac_try="$ac_compile"
2144case "(($ac_try" in
2145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2146  *) ac_try_echo=$ac_try;;
2147esac
2148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2149$as_echo "$ac_try_echo"; } >&5
2150  (eval "$ac_compile") 2>conftest.err
2151  ac_status=$?
2152  if test -s conftest.err; then
2153    grep -v '^ *+' conftest.err >conftest.er1
2154    cat conftest.er1 >&5
2155    mv -f conftest.er1 conftest.err
2156  fi
2157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2158  test $ac_status = 0; } && {
2159	 test -z "$ac_c_werror_flag" ||
2160	 test ! -s conftest.err
2161       } && test -s conftest.$ac_objext; then :
2162  ac_retval=0
2163else
2164  $as_echo "$as_me: failed program was:" >&5
2165sed 's/^/| /' conftest.$ac_ext >&5
2166
2167	ac_retval=1
2168fi
2169  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2170  as_fn_set_status $ac_retval
2171
2172} # ac_fn_c_try_compile
2173
2174# ac_fn_cxx_try_compile LINENO
2175# ----------------------------
2176# Try to compile conftest.$ac_ext, and return whether this succeeded.
2177ac_fn_cxx_try_compile ()
2178{
2179  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180  rm -f conftest.$ac_objext
2181  if { { ac_try="$ac_compile"
2182case "(($ac_try" in
2183  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2184  *) ac_try_echo=$ac_try;;
2185esac
2186eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2187$as_echo "$ac_try_echo"; } >&5
2188  (eval "$ac_compile") 2>conftest.err
2189  ac_status=$?
2190  if test -s conftest.err; then
2191    grep -v '^ *+' conftest.err >conftest.er1
2192    cat conftest.er1 >&5
2193    mv -f conftest.er1 conftest.err
2194  fi
2195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2196  test $ac_status = 0; } && {
2197	 test -z "$ac_cxx_werror_flag" ||
2198	 test ! -s conftest.err
2199       } && test -s conftest.$ac_objext; then :
2200  ac_retval=0
2201else
2202  $as_echo "$as_me: failed program was:" >&5
2203sed 's/^/| /' conftest.$ac_ext >&5
2204
2205	ac_retval=1
2206fi
2207  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208  as_fn_set_status $ac_retval
2209
2210} # ac_fn_cxx_try_compile
2211
2212# ac_fn_objc_try_compile LINENO
2213# -----------------------------
2214# Try to compile conftest.$ac_ext, and return whether this succeeded.
2215ac_fn_objc_try_compile ()
2216{
2217  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218  rm -f conftest.$ac_objext
2219  if { { ac_try="$ac_compile"
2220case "(($ac_try" in
2221  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2222  *) ac_try_echo=$ac_try;;
2223esac
2224eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2225$as_echo "$ac_try_echo"; } >&5
2226  (eval "$ac_compile") 2>conftest.err
2227  ac_status=$?
2228  if test -s conftest.err; then
2229    grep -v '^ *+' conftest.err >conftest.er1
2230    cat conftest.er1 >&5
2231    mv -f conftest.er1 conftest.err
2232  fi
2233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2234  test $ac_status = 0; } && {
2235	 test -z "$ac_objc_werror_flag" ||
2236	 test ! -s conftest.err
2237       } && test -s conftest.$ac_objext; then :
2238  ac_retval=0
2239else
2240  $as_echo "$as_me: failed program was:" >&5
2241sed 's/^/| /' conftest.$ac_ext >&5
2242
2243	ac_retval=1
2244fi
2245  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246  as_fn_set_status $ac_retval
2247
2248} # ac_fn_objc_try_compile
2249
2250# ac_fn_c_try_cpp LINENO
2251# ----------------------
2252# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2253ac_fn_c_try_cpp ()
2254{
2255  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256  if { { ac_try="$ac_cpp conftest.$ac_ext"
2257case "(($ac_try" in
2258  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2259  *) ac_try_echo=$ac_try;;
2260esac
2261eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2262$as_echo "$ac_try_echo"; } >&5
2263  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2264  ac_status=$?
2265  if test -s conftest.err; then
2266    grep -v '^ *+' conftest.err >conftest.er1
2267    cat conftest.er1 >&5
2268    mv -f conftest.er1 conftest.err
2269  fi
2270  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2271  test $ac_status = 0; } > conftest.i && {
2272	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2273	 test ! -s conftest.err
2274       }; then :
2275  ac_retval=0
2276else
2277  $as_echo "$as_me: failed program was:" >&5
2278sed 's/^/| /' conftest.$ac_ext >&5
2279
2280    ac_retval=1
2281fi
2282  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2283  as_fn_set_status $ac_retval
2284
2285} # ac_fn_c_try_cpp
2286
2287# ac_fn_cxx_try_cpp LINENO
2288# ------------------------
2289# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2290ac_fn_cxx_try_cpp ()
2291{
2292  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293  if { { ac_try="$ac_cpp conftest.$ac_ext"
2294case "(($ac_try" in
2295  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2296  *) ac_try_echo=$ac_try;;
2297esac
2298eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2299$as_echo "$ac_try_echo"; } >&5
2300  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2301  ac_status=$?
2302  if test -s conftest.err; then
2303    grep -v '^ *+' conftest.err >conftest.er1
2304    cat conftest.er1 >&5
2305    mv -f conftest.er1 conftest.err
2306  fi
2307  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2308  test $ac_status = 0; } > conftest.i && {
2309	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2310	 test ! -s conftest.err
2311       }; then :
2312  ac_retval=0
2313else
2314  $as_echo "$as_me: failed program was:" >&5
2315sed 's/^/| /' conftest.$ac_ext >&5
2316
2317    ac_retval=1
2318fi
2319  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2320  as_fn_set_status $ac_retval
2321
2322} # ac_fn_cxx_try_cpp
2323
2324# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2325# ---------------------------------------------------------
2326# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2327# the include files in INCLUDES and setting the cache variable VAR
2328# accordingly.
2329ac_fn_cxx_check_header_mongrel ()
2330{
2331  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2332  if eval \${$3+:} false; then :
2333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2334$as_echo_n "checking for $2... " >&6; }
2335if eval \${$3+:} false; then :
2336  $as_echo_n "(cached) " >&6
2337fi
2338eval ac_res=\$$3
2339	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
2341else
2342  # Is the header compilable?
2343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2344$as_echo_n "checking $2 usability... " >&6; }
2345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h.  */
2347$4
2348#include <$2>
2349_ACEOF
2350if ac_fn_cxx_try_compile "$LINENO"; then :
2351  ac_header_compiler=yes
2352else
2353  ac_header_compiler=no
2354fi
2355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2357$as_echo "$ac_header_compiler" >&6; }
2358
2359# Is the header present?
2360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2361$as_echo_n "checking $2 presence... " >&6; }
2362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363/* end confdefs.h.  */
2364#include <$2>
2365_ACEOF
2366if ac_fn_cxx_try_cpp "$LINENO"; then :
2367  ac_header_preproc=yes
2368else
2369  ac_header_preproc=no
2370fi
2371rm -f conftest.err conftest.i conftest.$ac_ext
2372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2373$as_echo "$ac_header_preproc" >&6; }
2374
2375# So?  What about this header?
2376case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2377  yes:no: )
2378    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2379$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2380    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2381$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2382    ;;
2383  no:yes:* )
2384    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2385$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2387$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2388    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2389$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2390    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2391$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2393$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2394( $as_echo "## ----------------------------------------- ##
2395## Report this to build-dev@openjdk.java.net ##
2396## ----------------------------------------- ##"
2397     ) | sed "s/^/$as_me: WARNING:     /" >&2
2398    ;;
2399esac
2400  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2401$as_echo_n "checking for $2... " >&6; }
2402if eval \${$3+:} false; then :
2403  $as_echo_n "(cached) " >&6
2404else
2405  eval "$3=\$ac_header_compiler"
2406fi
2407eval ac_res=\$$3
2408	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2409$as_echo "$ac_res" >&6; }
2410fi
2411  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412
2413} # ac_fn_cxx_check_header_mongrel
2414
2415# ac_fn_cxx_try_run LINENO
2416# ------------------------
2417# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2418# that executables *can* be run.
2419ac_fn_cxx_try_run ()
2420{
2421  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422  if { { ac_try="$ac_link"
2423case "(($ac_try" in
2424  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2425  *) ac_try_echo=$ac_try;;
2426esac
2427eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2428$as_echo "$ac_try_echo"; } >&5
2429  (eval "$ac_link") 2>&5
2430  ac_status=$?
2431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2433  { { case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_try") 2>&5
2440  ac_status=$?
2441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442  test $ac_status = 0; }; }; then :
2443  ac_retval=0
2444else
2445  $as_echo "$as_me: program exited with status $ac_status" >&5
2446       $as_echo "$as_me: failed program was:" >&5
2447sed 's/^/| /' conftest.$ac_ext >&5
2448
2449       ac_retval=$ac_status
2450fi
2451  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2452  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2453  as_fn_set_status $ac_retval
2454
2455} # ac_fn_cxx_try_run
2456
2457# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2458# ---------------------------------------------------------
2459# Tests whether HEADER exists and can be compiled using the include files in
2460# INCLUDES, setting the cache variable VAR accordingly.
2461ac_fn_cxx_check_header_compile ()
2462{
2463  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465$as_echo_n "checking for $2... " >&6; }
2466if eval \${$3+:} false; then :
2467  $as_echo_n "(cached) " >&6
2468else
2469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470/* end confdefs.h.  */
2471$4
2472#include <$2>
2473_ACEOF
2474if ac_fn_cxx_try_compile "$LINENO"; then :
2475  eval "$3=yes"
2476else
2477  eval "$3=no"
2478fi
2479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480fi
2481eval ac_res=\$$3
2482	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483$as_echo "$ac_res" >&6; }
2484  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485
2486} # ac_fn_cxx_check_header_compile
2487
2488# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2489# ----------------------------------------------
2490# Tries to find the compile-time value of EXPR in a program that includes
2491# INCLUDES, setting VAR accordingly. Returns whether the value could be
2492# computed
2493ac_fn_cxx_compute_int ()
2494{
2495  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496  if test "$cross_compiling" = yes; then
2497    # Depending upon the size, compute the lo and hi bounds.
2498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2499/* end confdefs.h.  */
2500$4
2501int
2502main ()
2503{
2504static int test_array [1 - 2 * !(($2) >= 0)];
2505test_array [0] = 0;
2506return test_array [0];
2507
2508  ;
2509  return 0;
2510}
2511_ACEOF
2512if ac_fn_cxx_try_compile "$LINENO"; then :
2513  ac_lo=0 ac_mid=0
2514  while :; do
2515    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516/* end confdefs.h.  */
2517$4
2518int
2519main ()
2520{
2521static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2522test_array [0] = 0;
2523return test_array [0];
2524
2525  ;
2526  return 0;
2527}
2528_ACEOF
2529if ac_fn_cxx_try_compile "$LINENO"; then :
2530  ac_hi=$ac_mid; break
2531else
2532  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2533			if test $ac_lo -le $ac_mid; then
2534			  ac_lo= ac_hi=
2535			  break
2536			fi
2537			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2538fi
2539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2540  done
2541else
2542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2543/* end confdefs.h.  */
2544$4
2545int
2546main ()
2547{
2548static int test_array [1 - 2 * !(($2) < 0)];
2549test_array [0] = 0;
2550return test_array [0];
2551
2552  ;
2553  return 0;
2554}
2555_ACEOF
2556if ac_fn_cxx_try_compile "$LINENO"; then :
2557  ac_hi=-1 ac_mid=-1
2558  while :; do
2559    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562int
2563main ()
2564{
2565static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2566test_array [0] = 0;
2567return test_array [0];
2568
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  ac_lo=$ac_mid; break
2575else
2576  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2577			if test $ac_mid -le $ac_hi; then
2578			  ac_lo= ac_hi=
2579			  break
2580			fi
2581			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2582fi
2583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2584  done
2585else
2586  ac_lo= ac_hi=
2587fi
2588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2589fi
2590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2591# Binary search between lo and hi bounds.
2592while test "x$ac_lo" != "x$ac_hi"; do
2593  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2594  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2595/* end confdefs.h.  */
2596$4
2597int
2598main ()
2599{
2600static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2601test_array [0] = 0;
2602return test_array [0];
2603
2604  ;
2605  return 0;
2606}
2607_ACEOF
2608if ac_fn_cxx_try_compile "$LINENO"; then :
2609  ac_hi=$ac_mid
2610else
2611  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2612fi
2613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614done
2615case $ac_lo in #((
2616?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2617'') ac_retval=1 ;;
2618esac
2619  else
2620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623static long int longval () { return $2; }
2624static unsigned long int ulongval () { return $2; }
2625#include <stdio.h>
2626#include <stdlib.h>
2627int
2628main ()
2629{
2630
2631  FILE *f = fopen ("conftest.val", "w");
2632  if (! f)
2633    return 1;
2634  if (($2) < 0)
2635    {
2636      long int i = longval ();
2637      if (i != ($2))
2638	return 1;
2639      fprintf (f, "%ld", i);
2640    }
2641  else
2642    {
2643      unsigned long int i = ulongval ();
2644      if (i != ($2))
2645	return 1;
2646      fprintf (f, "%lu", i);
2647    }
2648  /* Do not output a trailing newline, as this causes \r\n confusion
2649     on some platforms.  */
2650  return ferror (f) || fclose (f) != 0;
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_run "$LINENO"; then :
2657  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2658else
2659  ac_retval=1
2660fi
2661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2662  conftest.$ac_objext conftest.beam conftest.$ac_ext
2663rm -f conftest.val
2664
2665  fi
2666  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2667  as_fn_set_status $ac_retval
2668
2669} # ac_fn_cxx_compute_int
2670
2671# ac_fn_cxx_try_link LINENO
2672# -------------------------
2673# Try to link conftest.$ac_ext, and return whether this succeeded.
2674ac_fn_cxx_try_link ()
2675{
2676  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2677  rm -f conftest.$ac_objext conftest$ac_exeext
2678  if { { ac_try="$ac_link"
2679case "(($ac_try" in
2680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2681  *) ac_try_echo=$ac_try;;
2682esac
2683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2684$as_echo "$ac_try_echo"; } >&5
2685  (eval "$ac_link") 2>conftest.err
2686  ac_status=$?
2687  if test -s conftest.err; then
2688    grep -v '^ *+' conftest.err >conftest.er1
2689    cat conftest.er1 >&5
2690    mv -f conftest.er1 conftest.err
2691  fi
2692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2693  test $ac_status = 0; } && {
2694	 test -z "$ac_cxx_werror_flag" ||
2695	 test ! -s conftest.err
2696       } && test -s conftest$ac_exeext && {
2697	 test "$cross_compiling" = yes ||
2698	 test -x conftest$ac_exeext
2699       }; then :
2700  ac_retval=0
2701else
2702  $as_echo "$as_me: failed program was:" >&5
2703sed 's/^/| /' conftest.$ac_ext >&5
2704
2705	ac_retval=1
2706fi
2707  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2708  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2709  # interfere with the next link command; also delete a directory that is
2710  # left behind by Apple's compiler.  We do this before executing the actions.
2711  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2712  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2713  as_fn_set_status $ac_retval
2714
2715} # ac_fn_cxx_try_link
2716
2717# ac_fn_cxx_check_func LINENO FUNC VAR
2718# ------------------------------------
2719# Tests whether FUNC exists, setting the cache variable VAR accordingly
2720ac_fn_cxx_check_func ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2731   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2732#define $2 innocuous_$2
2733
2734/* System header to define __stub macros and hopefully few prototypes,
2735    which can conflict with char $2 (); below.
2736    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2737    <limits.h> exists even on freestanding compilers.  */
2738
2739#ifdef __STDC__
2740# include <limits.h>
2741#else
2742# include <assert.h>
2743#endif
2744
2745#undef $2
2746
2747/* Override any GCC internal prototype to avoid an error.
2748   Use char because int might match the return type of a GCC
2749   builtin and then its argument prototype would still apply.  */
2750#ifdef __cplusplus
2751extern "C"
2752#endif
2753char $2 ();
2754/* The GNU C library defines this for functions which it implements
2755    to always fail with ENOSYS.  Some functions are actually named
2756    something starting with __ and the normal name is an alias.  */
2757#if defined __stub_$2 || defined __stub___$2
2758choke me
2759#endif
2760
2761int
2762main ()
2763{
2764return $2 ();
2765  ;
2766  return 0;
2767}
2768_ACEOF
2769if ac_fn_cxx_try_link "$LINENO"; then :
2770  eval "$3=yes"
2771else
2772  eval "$3=no"
2773fi
2774rm -f core conftest.err conftest.$ac_objext \
2775    conftest$ac_exeext conftest.$ac_ext
2776fi
2777eval ac_res=\$$3
2778	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2779$as_echo "$ac_res" >&6; }
2780  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2781
2782} # ac_fn_cxx_check_func
2783
2784# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2785# -------------------------------------------------------
2786# Tests whether HEADER exists and can be compiled using the include files in
2787# INCLUDES, setting the cache variable VAR accordingly.
2788ac_fn_c_check_header_compile ()
2789{
2790  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2792$as_echo_n "checking for $2... " >&6; }
2793if eval \${$3+:} false; then :
2794  $as_echo_n "(cached) " >&6
2795else
2796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799#include <$2>
2800_ACEOF
2801if ac_fn_c_try_compile "$LINENO"; then :
2802  eval "$3=yes"
2803else
2804  eval "$3=no"
2805fi
2806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2807fi
2808eval ac_res=\$$3
2809	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2810$as_echo "$ac_res" >&6; }
2811  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2812
2813} # ac_fn_c_check_header_compile
2814cat >config.log <<_ACEOF
2815This file contains any messages produced by compilers while
2816running configure, to aid debugging if configure makes a mistake.
2817
2818It was created by OpenJDK $as_me jdk8, which was
2819generated by GNU Autoconf 2.69.  Invocation command line was
2820
2821  $ $0 $@
2822
2823_ACEOF
2824exec 5>>config.log
2825{
2826cat <<_ASUNAME
2827## --------- ##
2828## Platform. ##
2829## --------- ##
2830
2831hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2832uname -m = `(uname -m) 2>/dev/null || echo unknown`
2833uname -r = `(uname -r) 2>/dev/null || echo unknown`
2834uname -s = `(uname -s) 2>/dev/null || echo unknown`
2835uname -v = `(uname -v) 2>/dev/null || echo unknown`
2836
2837/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2838/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2839
2840/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2841/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2842/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2843/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2844/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2845/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2846/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2847
2848_ASUNAME
2849
2850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2851for as_dir in $PATH
2852do
2853  IFS=$as_save_IFS
2854  test -z "$as_dir" && as_dir=.
2855    $as_echo "PATH: $as_dir"
2856  done
2857IFS=$as_save_IFS
2858
2859} >&5
2860
2861cat >&5 <<_ACEOF
2862
2863
2864## ----------- ##
2865## Core tests. ##
2866## ----------- ##
2867
2868_ACEOF
2869
2870
2871# Keep a trace of the command line.
2872# Strip out --no-create and --no-recursion so they do not pile up.
2873# Strip out --silent because we don't want to record it for future runs.
2874# Also quote any args containing shell meta-characters.
2875# Make two passes to allow for proper duplicate-argument suppression.
2876ac_configure_args=
2877ac_configure_args0=
2878ac_configure_args1=
2879ac_must_keep_next=false
2880for ac_pass in 1 2
2881do
2882  for ac_arg
2883  do
2884    case $ac_arg in
2885    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2886    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2887    | -silent | --silent | --silen | --sile | --sil)
2888      continue ;;
2889    *\'*)
2890      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2891    esac
2892    case $ac_pass in
2893    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2894    2)
2895      as_fn_append ac_configure_args1 " '$ac_arg'"
2896      if test $ac_must_keep_next = true; then
2897	ac_must_keep_next=false # Got value, back to normal.
2898      else
2899	case $ac_arg in
2900	  *=* | --config-cache | -C | -disable-* | --disable-* \
2901	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2902	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2903	  | -with-* | --with-* | -without-* | --without-* | --x)
2904	    case "$ac_configure_args0 " in
2905	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2906	    esac
2907	    ;;
2908	  -* ) ac_must_keep_next=true ;;
2909	esac
2910      fi
2911      as_fn_append ac_configure_args " '$ac_arg'"
2912      ;;
2913    esac
2914  done
2915done
2916{ ac_configure_args0=; unset ac_configure_args0;}
2917{ ac_configure_args1=; unset ac_configure_args1;}
2918
2919# When interrupted or exit'd, cleanup temporary files, and complete
2920# config.log.  We remove comments because anyway the quotes in there
2921# would cause problems or look ugly.
2922# WARNING: Use '\'' to represent an apostrophe within the trap.
2923# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2924trap 'exit_status=$?
2925  # Save into config.log some information that might help in debugging.
2926  {
2927    echo
2928
2929    $as_echo "## ---------------- ##
2930## Cache variables. ##
2931## ---------------- ##"
2932    echo
2933    # The following way of writing the cache mishandles newlines in values,
2934(
2935  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2936    eval ac_val=\$$ac_var
2937    case $ac_val in #(
2938    *${as_nl}*)
2939      case $ac_var in #(
2940      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2941$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2942      esac
2943      case $ac_var in #(
2944      _ | IFS | as_nl) ;; #(
2945      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2946      *) { eval $ac_var=; unset $ac_var;} ;;
2947      esac ;;
2948    esac
2949  done
2950  (set) 2>&1 |
2951    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2952    *${as_nl}ac_space=\ *)
2953      sed -n \
2954	"s/'\''/'\''\\\\'\'''\''/g;
2955	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2956      ;; #(
2957    *)
2958      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2959      ;;
2960    esac |
2961    sort
2962)
2963    echo
2964
2965    $as_echo "## ----------------- ##
2966## Output variables. ##
2967## ----------------- ##"
2968    echo
2969    for ac_var in $ac_subst_vars
2970    do
2971      eval ac_val=\$$ac_var
2972      case $ac_val in
2973      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2974      esac
2975      $as_echo "$ac_var='\''$ac_val'\''"
2976    done | sort
2977    echo
2978
2979    if test -n "$ac_subst_files"; then
2980      $as_echo "## ------------------- ##
2981## File substitutions. ##
2982## ------------------- ##"
2983      echo
2984      for ac_var in $ac_subst_files
2985      do
2986	eval ac_val=\$$ac_var
2987	case $ac_val in
2988	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2989	esac
2990	$as_echo "$ac_var='\''$ac_val'\''"
2991      done | sort
2992      echo
2993    fi
2994
2995    if test -s confdefs.h; then
2996      $as_echo "## ----------- ##
2997## confdefs.h. ##
2998## ----------- ##"
2999      echo
3000      cat confdefs.h
3001      echo
3002    fi
3003    test "$ac_signal" != 0 &&
3004      $as_echo "$as_me: caught signal $ac_signal"
3005    $as_echo "$as_me: exit $exit_status"
3006  } >&5
3007  rm -f core *.core core.conftest.* &&
3008    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3009    exit $exit_status
3010' 0
3011for ac_signal in 1 2 13 15; do
3012  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3013done
3014ac_signal=0
3015
3016# confdefs.h avoids OS command line length limits that DEFS can exceed.
3017rm -f -r conftest* confdefs.h
3018
3019$as_echo "/* confdefs.h */" > confdefs.h
3020
3021# Predefined preprocessor variables.
3022
3023cat >>confdefs.h <<_ACEOF
3024#define PACKAGE_NAME "$PACKAGE_NAME"
3025_ACEOF
3026
3027cat >>confdefs.h <<_ACEOF
3028#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3029_ACEOF
3030
3031cat >>confdefs.h <<_ACEOF
3032#define PACKAGE_VERSION "$PACKAGE_VERSION"
3033_ACEOF
3034
3035cat >>confdefs.h <<_ACEOF
3036#define PACKAGE_STRING "$PACKAGE_STRING"
3037_ACEOF
3038
3039cat >>confdefs.h <<_ACEOF
3040#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3041_ACEOF
3042
3043cat >>confdefs.h <<_ACEOF
3044#define PACKAGE_URL "$PACKAGE_URL"
3045_ACEOF
3046
3047
3048# Let the site file select an alternate cache file if it wants to.
3049# Prefer an explicitly selected file to automatically selected ones.
3050ac_site_file1=NONE
3051ac_site_file2=NONE
3052if test -n "$CONFIG_SITE"; then
3053  # We do not want a PATH search for config.site.
3054  case $CONFIG_SITE in #((
3055    -*)  ac_site_file1=./$CONFIG_SITE;;
3056    */*) ac_site_file1=$CONFIG_SITE;;
3057    *)   ac_site_file1=./$CONFIG_SITE;;
3058  esac
3059elif test "x$prefix" != xNONE; then
3060  ac_site_file1=$prefix/share/config.site
3061  ac_site_file2=$prefix/etc/config.site
3062else
3063  ac_site_file1=$ac_default_prefix/share/config.site
3064  ac_site_file2=$ac_default_prefix/etc/config.site
3065fi
3066for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3067do
3068  test "x$ac_site_file" = xNONE && continue
3069  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3070    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3071$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3072    sed 's/^/| /' "$ac_site_file" >&5
3073    . "$ac_site_file" \
3074      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3076as_fn_error $? "failed to load site script $ac_site_file
3077See \`config.log' for more details" "$LINENO" 5; }
3078  fi
3079done
3080
3081if test -r "$cache_file"; then
3082  # Some versions of bash will fail to source /dev/null (special files
3083  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3084  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3085    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3086$as_echo "$as_me: loading cache $cache_file" >&6;}
3087    case $cache_file in
3088      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3089      *)                      . "./$cache_file";;
3090    esac
3091  fi
3092else
3093  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3094$as_echo "$as_me: creating cache $cache_file" >&6;}
3095  >$cache_file
3096fi
3097
3098# Check that the precious variables saved in the cache have kept the same
3099# value.
3100ac_cache_corrupted=false
3101for ac_var in $ac_precious_vars; do
3102  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3103  eval ac_new_set=\$ac_env_${ac_var}_set
3104  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3105  eval ac_new_val=\$ac_env_${ac_var}_value
3106  case $ac_old_set,$ac_new_set in
3107    set,)
3108      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3109$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3110      ac_cache_corrupted=: ;;
3111    ,set)
3112      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3113$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3114      ac_cache_corrupted=: ;;
3115    ,);;
3116    *)
3117      if test "x$ac_old_val" != "x$ac_new_val"; then
3118	# differences in whitespace do not lead to failure.
3119	ac_old_val_w=`echo x $ac_old_val`
3120	ac_new_val_w=`echo x $ac_new_val`
3121	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3122	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3123$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3124	  ac_cache_corrupted=:
3125	else
3126	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3127$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3128	  eval $ac_var=\$ac_old_val
3129	fi
3130	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3131$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3132	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3133$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3134      fi;;
3135  esac
3136  # Pass precious variables to config.status.
3137  if test "$ac_new_set" = set; then
3138    case $ac_new_val in
3139    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3140    *) ac_arg=$ac_var=$ac_new_val ;;
3141    esac
3142    case " $ac_configure_args " in
3143      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3144      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3145    esac
3146  fi
3147done
3148if $ac_cache_corrupted; then
3149  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3151  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3152$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3153  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3154fi
3155## -------------------- ##
3156## Main body of script. ##
3157## -------------------- ##
3158
3159ac_ext=c
3160ac_cpp='$CPP $CPPFLAGS'
3161ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3162ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3163ac_compiler_gnu=$ac_cv_c_compiler_gnu
3164
3165
3166
3167ac_aux_dir=
3168for ac_dir in build-aux "$srcdir"/build-aux; do
3169  if test -f "$ac_dir/install-sh"; then
3170    ac_aux_dir=$ac_dir
3171    ac_install_sh="$ac_aux_dir/install-sh -c"
3172    break
3173  elif test -f "$ac_dir/install.sh"; then
3174    ac_aux_dir=$ac_dir
3175    ac_install_sh="$ac_aux_dir/install.sh -c"
3176    break
3177  elif test -f "$ac_dir/shtool"; then
3178    ac_aux_dir=$ac_dir
3179    ac_install_sh="$ac_aux_dir/shtool install -c"
3180    break
3181  fi
3182done
3183if test -z "$ac_aux_dir"; then
3184  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3185fi
3186
3187# These three variables are undocumented and unsupported,
3188# and are intended to be withdrawn in a future Autoconf release.
3189# They can cause serious problems if a builder's source tree is in a directory
3190# whose full name contains unusual characters.
3191ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3192ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3193ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3194
3195
3196# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3197
3198#
3199# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3200# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3201#
3202# This code is free software; you can redistribute it and/or modify it
3203# under the terms of the GNU General Public License version 2 only, as
3204# published by the Free Software Foundation.  Oracle designates this
3205# particular file as subject to the "Classpath" exception as provided
3206# by Oracle in the LICENSE file that accompanied this code.
3207#
3208# This code is distributed in the hope that it will be useful, but WITHOUT
3209# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3210# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3211# version 2 for more details (a copy is included in the LICENSE file that
3212# accompanied this code).
3213#
3214# You should have received a copy of the GNU General Public License version
3215# 2 along with this work; if not, write to the Free Software Foundation,
3216# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3217#
3218# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3219# or visit www.oracle.com if you need additional information or have any
3220# questions.
3221#
3222
3223#
3224# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3225#
3226# This program is free software; you can redistribute it and/or modify
3227# it under the terms of the GNU General Public License as published by
3228# the Free Software Foundation; either version 2 of the License, or
3229# (at your option) any later version.
3230#
3231# This program is distributed in the hope that it will be useful, but
3232# WITHOUT ANY WARRANTY; without even the implied warranty of
3233# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3234# General Public License for more details.
3235#
3236# You should have received a copy of the GNU General Public License
3237# along with this program; if not, write to the Free Software
3238# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3239#
3240# As a special exception to the GNU General Public License, if you
3241# distribute this file as part of a program that contains a
3242# configuration script generated by Autoconf, you may include it under
3243# the same distribution terms that you use for the rest of that program.
3244
3245# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3246# ----------------------------------
3247# PKG_PROG_PKG_CONFIG
3248
3249# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3250#
3251# Check to see whether a particular set of modules exists.  Similar
3252# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3253#
3254#
3255# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3256# this or PKG_CHECK_MODULES is called, or make sure to call
3257# PKG_CHECK_EXISTS manually
3258# --------------------------------------------------------------
3259
3260
3261
3262# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3263# ---------------------------------------------
3264# _PKG_CONFIG
3265
3266# _PKG_SHORT_ERRORS_SUPPORTED
3267# -----------------------------
3268# _PKG_SHORT_ERRORS_SUPPORTED
3269
3270
3271# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3272# [ACTION-IF-NOT-FOUND])
3273#
3274#
3275# Note that if there is a possibility the first call to
3276# PKG_CHECK_MODULES might not happen, you should be sure to include an
3277# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3278#
3279#
3280# --------------------------------------------------------------
3281# PKG_CHECK_MODULES
3282
3283
3284# Include these first...
3285#
3286# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3287# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3288#
3289# This code is free software; you can redistribute it and/or modify it
3290# under the terms of the GNU General Public License version 2 only, as
3291# published by the Free Software Foundation.  Oracle designates this
3292# particular file as subject to the "Classpath" exception as provided
3293# by Oracle in the LICENSE file that accompanied this code.
3294#
3295# This code is distributed in the hope that it will be useful, but WITHOUT
3296# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3297# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3298# version 2 for more details (a copy is included in the LICENSE file that
3299# accompanied this code).
3300#
3301# You should have received a copy of the GNU General Public License version
3302# 2 along with this work; if not, write to the Free Software Foundation,
3303# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3304#
3305# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3306# or visit www.oracle.com if you need additional information or have any
3307# questions.
3308#
3309
3310# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3311# If so, then append $1 to $2 \
3312# Also set JVM_ARG_OK to true/false depending on outcome.
3313
3314
3315# Appends a string to a path variable, only adding the : when needed.
3316
3317
3318# This will make sure the given variable points to a full and proper
3319# path. This means:
3320# 1) There will be no spaces in the path. On posix platforms,
3321#    spaces in the path will result in an error. On Windows,
3322#    the path will be rewritten using short-style to be space-free.
3323# 2) The path will be absolute, and it will be in unix-style (on
3324#     cygwin).
3325# $1: The name of the variable to fix
3326
3327
3328# This will make sure the given variable points to a executable
3329# with a full and proper path. This means:
3330# 1) There will be no spaces in the path. On posix platforms,
3331#    spaces in the path will result in an error. On Windows,
3332#    the path will be rewritten using short-style to be space-free.
3333# 2) The path will be absolute, and it will be in unix-style (on
3334#     cygwin).
3335# Any arguments given to the executable is preserved.
3336# If the input variable does not have a directory specification, then
3337# it need to be in the PATH.
3338# $1: The name of the variable to fix
3339
3340
3341
3342
3343# Register a --with argument but mark it as deprecated
3344# $1: The name of the with argument to deprecate, not including --with-
3345
3346
3347# Register a --enable argument but mark it as deprecated
3348# $1: The name of the with argument to deprecate, not including --enable-
3349# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3350
3351
3352
3353
3354# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3355# $1: variable to check
3356
3357
3358# Check that there are no unprocessed overridden variables left.
3359# If so, they are an incorrect argument and we will exit with an error.
3360
3361
3362# Setup a tool for the given variable. If correctly specified by the user,
3363# use that value, otherwise search for the tool using the supplied code snippet.
3364# $1: variable to set
3365# $2: code snippet to call to look for the tool
3366
3367
3368# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3369# $1: variable to set
3370# $2: executable name (or list of names) to look for
3371
3372
3373# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3374# $1: variable to set
3375# $2: executable name (or list of names) to look for
3376
3377
3378# Like BASIC_PATH_PROGS but fails if no tool was found.
3379# $1: variable to set
3380# $2: executable name (or list of names) to look for
3381
3382
3383# Like BASIC_SETUP_TOOL but fails if no tool was found.
3384# $1: variable to set
3385# $2: autoconf macro to call to look for the special tool
3386
3387
3388# Setup the most fundamental tools that relies on not much else to set up,
3389# but is used by much of the early bootstrap code.
3390
3391
3392# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3393
3394
3395
3396
3397
3398
3399
3400#%%% Simple tools %%%
3401
3402# Check if we have found a usable version of make
3403# $1: the path to a potential make binary (or empty)
3404# $2: the description on how we found this
3405
3406
3407# Goes looking for a usable version of GNU make.
3408
3409
3410
3411
3412
3413
3414# Check if build directory is on local disk. If not possible to determine,
3415# we prefer to claim it's local.
3416# Argument 1: directory to test
3417# Argument 2: what to do if it is on local disk
3418# Argument 3: what to do otherwise (remote disk or failure)
3419
3420
3421# Check that source files have basic read permissions set. This might
3422# not be the case in cygwin in certain conditions.
3423
3424
3425
3426
3427#
3428# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3429# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3430#
3431# This code is free software; you can redistribute it and/or modify it
3432# under the terms of the GNU General Public License version 2 only, as
3433# published by the Free Software Foundation.  Oracle designates this
3434# particular file as subject to the "Classpath" exception as provided
3435# by Oracle in the LICENSE file that accompanied this code.
3436#
3437# This code is distributed in the hope that it will be useful, but WITHOUT
3438# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3439# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3440# version 2 for more details (a copy is included in the LICENSE file that
3441# accompanied this code).
3442#
3443# You should have received a copy of the GNU General Public License version
3444# 2 along with this work; if not, write to the Free Software Foundation,
3445# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3446#
3447# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3448# or visit www.oracle.com if you need additional information or have any
3449# questions.
3450#
3451
3452
3453
3454
3455
3456# Helper function which possibly converts a path using DOS-style short mode.
3457# If so, the updated path is stored in $new_path.
3458# $1: The path to check
3459
3460
3461# Helper function which possibly converts a path using DOS-style short mode.
3462# If so, the updated path is stored in $new_path.
3463# $1: The path to check
3464
3465
3466# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3467# and could probably be heavily simplified. However, all changes in this
3468# area tend to need lot of testing in different scenarios, and in lack of
3469# proper unit testing, cleaning this up has not been deemed worth the effort
3470# at the moment.
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3481
3482
3483
3484
3485#
3486# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3487# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3488#
3489# This code is free software; you can redistribute it and/or modify it
3490# under the terms of the GNU General Public License version 2 only, as
3491# published by the Free Software Foundation.  Oracle designates this
3492# particular file as subject to the "Classpath" exception as provided
3493# by Oracle in the LICENSE file that accompanied this code.
3494#
3495# This code is distributed in the hope that it will be useful, but WITHOUT
3496# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3497# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3498# version 2 for more details (a copy is included in the LICENSE file that
3499# accompanied this code).
3500#
3501# You should have received a copy of the GNU General Public License version
3502# 2 along with this work; if not, write to the Free Software Foundation,
3503# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3504#
3505# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3506# or visit www.oracle.com if you need additional information or have any
3507# questions.
3508#
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520# ... then the rest
3521#
3522# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3523# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3524#
3525# This code is free software; you can redistribute it and/or modify it
3526# under the terms of the GNU General Public License version 2 only, as
3527# published by the Free Software Foundation.  Oracle designates this
3528# particular file as subject to the "Classpath" exception as provided
3529# by Oracle in the LICENSE file that accompanied this code.
3530#
3531# This code is distributed in the hope that it will be useful, but WITHOUT
3532# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3533# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3534# version 2 for more details (a copy is included in the LICENSE file that
3535# accompanied this code).
3536#
3537# You should have received a copy of the GNU General Public License version
3538# 2 along with this work; if not, write to the Free Software Foundation,
3539# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3540#
3541# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3542# or visit www.oracle.com if you need additional information or have any
3543# questions.
3544#
3545
3546########################################################################
3547# This file handles detection of the Boot JDK. The Boot JDK detection
3548# process has been developed as a response to solve a complex real-world
3549# problem. Initially, it was simple, but it has grown as platform after
3550# platform, idiosyncracy after idiosyncracy has been supported.
3551#
3552# The basic idea is this:
3553# 1) You need an acceptable *) JDK to use as a Boot JDK
3554# 2) There are several ways to locate a JDK, that are mostly platform
3555#    dependent **)
3556# 3) You can have multiple JDKs installed
3557# 4) If possible, configure should try to dig out an acceptable JDK
3558#    automatically, without having to resort to command-line options
3559#
3560# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3561#     javac) and not a JRE, etc.
3562#
3563# **) On Windows we typically use a well-known path.
3564#     On MacOSX we typically use the tool java_home.
3565#     On Linux we typically find javac in the $PATH, and then follow a
3566#     chain of symlinks that often ends up in a real JDK.
3567#
3568# This leads to the code where we check in different ways to locate a
3569# JDK, and if one is found, check if it is acceptable. If not, we print
3570# our reasons for rejecting it (useful when debugging non-working
3571# configure situations) and continue checking the next one.
3572########################################################################
3573
3574# Execute the check given as argument, and verify the result
3575# If the Boot JDK was previously found, do nothing
3576# $1 A command line (typically autoconf macro) to execute
3577
3578
3579# Test: Is bootjdk explicitely set by command line arguments?
3580
3581
3582# Test: Is bootjdk available from builddeps?
3583
3584
3585# Test: Is $JAVA_HOME set?
3586
3587
3588# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3589
3590
3591# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3592# $1: Argument to the java_home binary (optional)
3593
3594
3595# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3596
3597
3598# Look for a jdk in the given path. If there are multiple, try to select the newest.
3599# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3600# $1 = Path to directory containing jdk installations.
3601# $2 = String to append to the found JDK directory to get the proper JDK home
3602
3603
3604# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3605# environmental variable as base for where to look.
3606# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3607
3608
3609# Test: Is there a JDK installed in default, well-known locations?
3610
3611
3612# Check that a command-line tool in the Boot JDK is correct
3613# $1 = name of variable to assign
3614# $2 = name of binary
3615
3616
3617###############################################################################
3618#
3619# We need a Boot JDK to bootstrap the build.
3620#
3621
3622
3623
3624
3625
3626#
3627# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3628# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3629#
3630# This code is free software; you can redistribute it and/or modify it
3631# under the terms of the GNU General Public License version 2 only, as
3632# published by the Free Software Foundation.  Oracle designates this
3633# particular file as subject to the "Classpath" exception as provided
3634# by Oracle in the LICENSE file that accompanied this code.
3635#
3636# This code is distributed in the hope that it will be useful, but WITHOUT
3637# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3638# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3639# version 2 for more details (a copy is included in the LICENSE file that
3640# accompanied this code).
3641#
3642# You should have received a copy of the GNU General Public License version
3643# 2 along with this work; if not, write to the Free Software Foundation,
3644# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3645#
3646# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3647# or visit www.oracle.com if you need additional information or have any
3648# questions.
3649#
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670#
3671# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3672# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3673#
3674# This code is free software; you can redistribute it and/or modify it
3675# under the terms of the GNU General Public License version 2 only, as
3676# published by the Free Software Foundation.  Oracle designates this
3677# particular file as subject to the "Classpath" exception as provided
3678# by Oracle in the LICENSE file that accompanied this code.
3679#
3680# This code is distributed in the hope that it will be useful, but WITHOUT
3681# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3682# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3683# version 2 for more details (a copy is included in the LICENSE file that
3684# accompanied this code).
3685#
3686# You should have received a copy of the GNU General Public License version
3687# 2 along with this work; if not, write to the Free Software Foundation,
3688# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3689#
3690# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3691# or visit www.oracle.com if you need additional information or have any
3692# questions.
3693#
3694
3695
3696
3697
3698
3699cygwin_help() {
3700  case $1 in
3701    unzip)
3702      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3703      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3704      ;;
3705    zip)
3706      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3708      ;;
3709    make)
3710      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3711      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3712      ;;
3713    freetype)
3714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3715        HELP_MSG="To install freetype, run:
3716wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3717chmod +x /tmp/freetype-setup.exe
3718/tmp/freetype-setup.exe
3719Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3720After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3721      else
3722        HELP_MSG="You need to build a 64-bit version of freetype.
3723This is not readily available.
3724You can find source code and build instructions on
3725http://www.freetype.org/
3726If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3727      fi
3728      ;;
3729  esac
3730}
3731
3732msys_help() {
3733  PKGHANDLER_COMMAND=""
3734}
3735
3736apt_help() {
3737  case $1 in
3738    devkit)
3739      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3740    openjdk)
3741      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3742    alsa)
3743      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3744    cups)
3745      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3746    freetype)
3747      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3748    pulse)
3749      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3750    x11)
3751      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3752    ccache)
3753      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3754  esac
3755}
3756
3757yum_help() {
3758  case $1 in
3759    devkit)
3760      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3761    openjdk)
3762      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3763    alsa)
3764      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3765    cups)
3766      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3767    freetype)
3768      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3769    pulse)
3770      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3771    x11)
3772      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3773    ccache)
3774      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3775  esac
3776}
3777
3778port_help() {
3779  PKGHANDLER_COMMAND=""
3780}
3781
3782pkgutil_help() {
3783  PKGHANDLER_COMMAND=""
3784}
3785
3786pkgadd_help() {
3787  PKGHANDLER_COMMAND=""
3788}
3789
3790
3791
3792#
3793# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3794# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3795#
3796# This code is free software; you can redistribute it and/or modify it
3797# under the terms of the GNU General Public License version 2 only, as
3798# published by the Free Software Foundation.  Oracle designates this
3799# particular file as subject to the "Classpath" exception as provided
3800# by Oracle in the LICENSE file that accompanied this code.
3801#
3802# This code is distributed in the hope that it will be useful, but WITHOUT
3803# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3804# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3805# version 2 for more details (a copy is included in the LICENSE file that
3806# accompanied this code).
3807#
3808# You should have received a copy of the GNU General Public License version
3809# 2 along with this work; if not, write to the Free Software Foundation,
3810# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3811#
3812# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3813# or visit www.oracle.com if you need additional information or have any
3814# questions.
3815#
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826###############################################################################
3827#
3828# Should we build only OpenJDK even if closed sources are present?
3829#
3830
3831
3832
3833
3834###############################################################################
3835#
3836# Setup version numbers
3837#
3838
3839
3840
3841
3842
3843
3844#
3845# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3846# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3847#
3848# This code is free software; you can redistribute it and/or modify it
3849# under the terms of the GNU General Public License version 2 only, as
3850# published by the Free Software Foundation.  Oracle designates this
3851# particular file as subject to the "Classpath" exception as provided
3852# by Oracle in the LICENSE file that accompanied this code.
3853#
3854# This code is distributed in the hope that it will be useful, but WITHOUT
3855# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3856# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3857# version 2 for more details (a copy is included in the LICENSE file that
3858# accompanied this code).
3859#
3860# You should have received a copy of the GNU General Public License version
3861# 2 along with this work; if not, write to the Free Software Foundation,
3862# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3863#
3864# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3865# or visit www.oracle.com if you need additional information or have any
3866# questions.
3867#
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885#
3886# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3887# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3888#
3889# This code is free software; you can redistribute it and/or modify it
3890# under the terms of the GNU General Public License version 2 only, as
3891# published by the Free Software Foundation.  Oracle designates this
3892# particular file as subject to the "Classpath" exception as provided
3893# by Oracle in the LICENSE file that accompanied this code.
3894#
3895# This code is distributed in the hope that it will be useful, but WITHOUT
3896# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3897# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3898# version 2 for more details (a copy is included in the LICENSE file that
3899# accompanied this code).
3900#
3901# You should have received a copy of the GNU General Public License version
3902# 2 along with this work; if not, write to the Free Software Foundation,
3903# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3904#
3905# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3906# or visit www.oracle.com if you need additional information or have any
3907# questions.
3908#
3909
3910# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3911# Converts autoconf style CPU name to OpenJDK style, into
3912# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3913
3914
3915# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3916# Converts autoconf style OS name to OpenJDK style, into
3917# VAR_OS and VAR_OS_API.
3918
3919
3920# Expects $host_os $host_cpu $build_os and $build_cpu
3921# and $with_target_bits to have been setup!
3922#
3923# Translate the standard triplet(quadruplet) definition
3924# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3925# OPENJDK_BUILD_OS, etc.
3926
3927
3928# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3929# accordingly. Must be done after setting up build and target system, but before
3930# doing anything else with these values.
3931
3932
3933# Setup the legacy variables, for controlling the old makefiles.
3934#
3935
3936
3937
3938
3939#%%% Build and target systems %%%
3940
3941
3942
3943
3944# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3945# Add -mX to various FLAGS variables.
3946
3947
3948
3949
3950
3951
3952#
3953# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3954# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3955#
3956# This code is free software; you can redistribute it and/or modify it
3957# under the terms of the GNU General Public License version 2 only, as
3958# published by the Free Software Foundation.  Oracle designates this
3959# particular file as subject to the "Classpath" exception as provided
3960# by Oracle in the LICENSE file that accompanied this code.
3961#
3962# This code is distributed in the hope that it will be useful, but WITHOUT
3963# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3964# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3965# version 2 for more details (a copy is included in the LICENSE file that
3966# accompanied this code).
3967#
3968# You should have received a copy of the GNU General Public License version
3969# 2 along with this work; if not, write to the Free Software Foundation,
3970# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3971#
3972# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3973# or visit www.oracle.com if you need additional information or have any
3974# questions.
3975#
3976
3977
3978
3979
3980
3981
3982
3983
3984#
3985# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3986# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3987#
3988# This code is free software; you can redistribute it and/or modify it
3989# under the terms of the GNU General Public License version 2 only, as
3990# published by the Free Software Foundation.  Oracle designates this
3991# particular file as subject to the "Classpath" exception as provided
3992# by Oracle in the LICENSE file that accompanied this code.
3993#
3994# This code is distributed in the hope that it will be useful, but WITHOUT
3995# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3996# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3997# version 2 for more details (a copy is included in the LICENSE file that
3998# accompanied this code).
3999#
4000# You should have received a copy of the GNU General Public License version
4001# 2 along with this work; if not, write to the Free Software Foundation,
4002# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4003#
4004# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4005# or visit www.oracle.com if you need additional information or have any
4006# questions.
4007#
4008
4009# $1 = compiler to test (CC or CXX)
4010# $2 = human readable name of compiler (C or C++)
4011
4012
4013
4014
4015
4016# $1 = compiler to test (CC or CXX)
4017# $2 = human readable name of compiler (C or C++)
4018# $3 = list of compiler names to search for
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
4033#                                   [RUN-IF-FALSE])
4034# ------------------------------------------------------------
4035# Check that the c and c++ compilers support an argument
4036
4037
4038
4039
4040# Setup the JTREG paths
4041
4042
4043#
4044# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4045# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4046#
4047# This code is free software; you can redistribute it and/or modify it
4048# under the terms of the GNU General Public License version 2 only, as
4049# published by the Free Software Foundation.  Oracle designates this
4050# particular file as subject to the "Classpath" exception as provided
4051# by Oracle in the LICENSE file that accompanied this code.
4052#
4053# This code is distributed in the hope that it will be useful, but WITHOUT
4054# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4055# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4056# version 2 for more details (a copy is included in the LICENSE file that
4057# accompanied this code).
4058#
4059# You should have received a copy of the GNU General Public License version
4060# 2 along with this work; if not, write to the Free Software Foundation,
4061# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4062#
4063# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4064# or visit www.oracle.com if you need additional information or have any
4065# questions.
4066#
4067
4068
4069
4070
4071
4072
4073
4074# Check if the VS env variables were setup prior to running configure.
4075# If not, then find vcvarsall.bat and run it automatically, and integrate
4076# the set env variables into the spec file.
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087# This line needs to be here, verbatim, after all includes and the dummy hook
4088# definitions. It is replaced with custom functionality when building
4089# custom sources.
4090#CUSTOM_AUTOCONF_INCLUDE
4091
4092# Do not change or remove the following line, it is needed for consistency checks:
4093DATE_WHEN_GENERATED=1392907541
4094
4095###############################################################################
4096#
4097# Initialization / Boot-strapping
4098#
4099# The bootstrapping process needs to solve the "chicken or the egg" problem,
4100# thus it jumps back and forth, each time gaining something needed later on.
4101#
4102###############################################################################
4103
4104# Basic initialization that must happen first of all
4105
4106  # Save the original command line. This is passed to us by the wrapper configure script.
4107
4108  DATE_WHEN_CONFIGURED=`LANG=C date`
4109
4110  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4111$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4112  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4113$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4114
4115
4116  # Start with tools that do not need have cross compilation support
4117  # and can be expected to be found in the default PATH. These tools are
4118  # used by configure. Nor are these tools expected to be found in the
4119  # devkit from the builddeps server either, since they are
4120  # needed to download the devkit.
4121
4122  # First are all the simple required tools.
4123
4124
4125
4126  # Publish this variable in the help.
4127
4128
4129  if test "x$BASENAME" = x; then
4130    # The variable is not set by user, try to locate tool using the code snippet
4131    for ac_prog in basename
4132do
4133  # Extract the first word of "$ac_prog", so it can be a program name with args.
4134set dummy $ac_prog; ac_word=$2
4135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4136$as_echo_n "checking for $ac_word... " >&6; }
4137if ${ac_cv_path_BASENAME+:} false; then :
4138  $as_echo_n "(cached) " >&6
4139else
4140  case $BASENAME in
4141  [\\/]* | ?:[\\/]*)
4142  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4143  ;;
4144  *)
4145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4146for as_dir in $PATH
4147do
4148  IFS=$as_save_IFS
4149  test -z "$as_dir" && as_dir=.
4150    for ac_exec_ext in '' $ac_executable_extensions; do
4151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4152    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4154    break 2
4155  fi
4156done
4157  done
4158IFS=$as_save_IFS
4159
4160  ;;
4161esac
4162fi
4163BASENAME=$ac_cv_path_BASENAME
4164if test -n "$BASENAME"; then
4165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4166$as_echo "$BASENAME" >&6; }
4167else
4168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4169$as_echo "no" >&6; }
4170fi
4171
4172
4173  test -n "$BASENAME" && break
4174done
4175
4176  else
4177    # The variable is set, but is it from the command line or the environment?
4178
4179    # Try to remove the string !BASENAME! from our list.
4180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4182      # If it failed, the variable was not from the command line. Ignore it,
4183      # but warn the user (except for BASH, which is always set by the calling BASH).
4184      if test "xBASENAME" != xBASH; then
4185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4186$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4187      fi
4188      # Try to locate tool using the code snippet
4189      for ac_prog in basename
4190do
4191  # Extract the first word of "$ac_prog", so it can be a program name with args.
4192set dummy $ac_prog; ac_word=$2
4193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4194$as_echo_n "checking for $ac_word... " >&6; }
4195if ${ac_cv_path_BASENAME+:} false; then :
4196  $as_echo_n "(cached) " >&6
4197else
4198  case $BASENAME in
4199  [\\/]* | ?:[\\/]*)
4200  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4201  ;;
4202  *)
4203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4204for as_dir in $PATH
4205do
4206  IFS=$as_save_IFS
4207  test -z "$as_dir" && as_dir=.
4208    for ac_exec_ext in '' $ac_executable_extensions; do
4209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4210    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4212    break 2
4213  fi
4214done
4215  done
4216IFS=$as_save_IFS
4217
4218  ;;
4219esac
4220fi
4221BASENAME=$ac_cv_path_BASENAME
4222if test -n "$BASENAME"; then
4223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4224$as_echo "$BASENAME" >&6; }
4225else
4226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4227$as_echo "no" >&6; }
4228fi
4229
4230
4231  test -n "$BASENAME" && break
4232done
4233
4234    else
4235      # If it succeeded, then it was overridden by the user. We will use it
4236      # for the tool.
4237
4238      # First remove it from the list of overridden variables, so we can test
4239      # for unknown variables in the end.
4240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4241
4242      # Check if the provided tool contains a complete path.
4243      tool_specified="$BASENAME"
4244      tool_basename="${tool_specified##*/}"
4245      if test "x$tool_basename" = "x$tool_specified"; then
4246        # A command without a complete path is provided, search $PATH.
4247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4248$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4249        # Extract the first word of "$tool_basename", so it can be a program name with args.
4250set dummy $tool_basename; ac_word=$2
4251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252$as_echo_n "checking for $ac_word... " >&6; }
4253if ${ac_cv_path_BASENAME+:} false; then :
4254  $as_echo_n "(cached) " >&6
4255else
4256  case $BASENAME in
4257  [\\/]* | ?:[\\/]*)
4258  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4259  ;;
4260  *)
4261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4262for as_dir in $PATH
4263do
4264  IFS=$as_save_IFS
4265  test -z "$as_dir" && as_dir=.
4266    for ac_exec_ext in '' $ac_executable_extensions; do
4267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4268    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4270    break 2
4271  fi
4272done
4273  done
4274IFS=$as_save_IFS
4275
4276  ;;
4277esac
4278fi
4279BASENAME=$ac_cv_path_BASENAME
4280if test -n "$BASENAME"; then
4281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4282$as_echo "$BASENAME" >&6; }
4283else
4284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4285$as_echo "no" >&6; }
4286fi
4287
4288
4289        if test "x$BASENAME" = x; then
4290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4291        fi
4292      else
4293        # Otherwise we believe it is a complete path. Use it as it is.
4294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4295$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4297$as_echo_n "checking for BASENAME... " >&6; }
4298        if test ! -x "$tool_specified"; then
4299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4300$as_echo "not found" >&6; }
4301          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4302        fi
4303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4304$as_echo "$tool_specified" >&6; }
4305      fi
4306    fi
4307  fi
4308
4309
4310
4311  if test "x$BASENAME" = x; then
4312    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4313  fi
4314
4315
4316
4317
4318
4319  # Publish this variable in the help.
4320
4321
4322  if test "x$BASH" = x; then
4323    # The variable is not set by user, try to locate tool using the code snippet
4324    for ac_prog in bash
4325do
4326  # Extract the first word of "$ac_prog", so it can be a program name with args.
4327set dummy $ac_prog; ac_word=$2
4328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4329$as_echo_n "checking for $ac_word... " >&6; }
4330if ${ac_cv_path_BASH+:} false; then :
4331  $as_echo_n "(cached) " >&6
4332else
4333  case $BASH in
4334  [\\/]* | ?:[\\/]*)
4335  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4336  ;;
4337  *)
4338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4339for as_dir in $PATH
4340do
4341  IFS=$as_save_IFS
4342  test -z "$as_dir" && as_dir=.
4343    for ac_exec_ext in '' $ac_executable_extensions; do
4344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4345    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4347    break 2
4348  fi
4349done
4350  done
4351IFS=$as_save_IFS
4352
4353  ;;
4354esac
4355fi
4356BASH=$ac_cv_path_BASH
4357if test -n "$BASH"; then
4358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4359$as_echo "$BASH" >&6; }
4360else
4361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4362$as_echo "no" >&6; }
4363fi
4364
4365
4366  test -n "$BASH" && break
4367done
4368
4369  else
4370    # The variable is set, but is it from the command line or the environment?
4371
4372    # Try to remove the string !BASH! from our list.
4373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4375      # If it failed, the variable was not from the command line. Ignore it,
4376      # but warn the user (except for BASH, which is always set by the calling BASH).
4377      if test "xBASH" != xBASH; then
4378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4379$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4380      fi
4381      # Try to locate tool using the code snippet
4382      for ac_prog in bash
4383do
4384  # Extract the first word of "$ac_prog", so it can be a program name with args.
4385set dummy $ac_prog; ac_word=$2
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4387$as_echo_n "checking for $ac_word... " >&6; }
4388if ${ac_cv_path_BASH+:} false; then :
4389  $as_echo_n "(cached) " >&6
4390else
4391  case $BASH in
4392  [\\/]* | ?:[\\/]*)
4393  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4394  ;;
4395  *)
4396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4397for as_dir in $PATH
4398do
4399  IFS=$as_save_IFS
4400  test -z "$as_dir" && as_dir=.
4401    for ac_exec_ext in '' $ac_executable_extensions; do
4402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4403    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4405    break 2
4406  fi
4407done
4408  done
4409IFS=$as_save_IFS
4410
4411  ;;
4412esac
4413fi
4414BASH=$ac_cv_path_BASH
4415if test -n "$BASH"; then
4416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4417$as_echo "$BASH" >&6; }
4418else
4419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4420$as_echo "no" >&6; }
4421fi
4422
4423
4424  test -n "$BASH" && break
4425done
4426
4427    else
4428      # If it succeeded, then it was overridden by the user. We will use it
4429      # for the tool.
4430
4431      # First remove it from the list of overridden variables, so we can test
4432      # for unknown variables in the end.
4433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4434
4435      # Check if the provided tool contains a complete path.
4436      tool_specified="$BASH"
4437      tool_basename="${tool_specified##*/}"
4438      if test "x$tool_basename" = "x$tool_specified"; then
4439        # A command without a complete path is provided, search $PATH.
4440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4441$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4442        # Extract the first word of "$tool_basename", so it can be a program name with args.
4443set dummy $tool_basename; ac_word=$2
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445$as_echo_n "checking for $ac_word... " >&6; }
4446if ${ac_cv_path_BASH+:} false; then :
4447  $as_echo_n "(cached) " >&6
4448else
4449  case $BASH in
4450  [\\/]* | ?:[\\/]*)
4451  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4452  ;;
4453  *)
4454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in $PATH
4456do
4457  IFS=$as_save_IFS
4458  test -z "$as_dir" && as_dir=.
4459    for ac_exec_ext in '' $ac_executable_extensions; do
4460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4461    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4463    break 2
4464  fi
4465done
4466  done
4467IFS=$as_save_IFS
4468
4469  ;;
4470esac
4471fi
4472BASH=$ac_cv_path_BASH
4473if test -n "$BASH"; then
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4475$as_echo "$BASH" >&6; }
4476else
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478$as_echo "no" >&6; }
4479fi
4480
4481
4482        if test "x$BASH" = x; then
4483          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4484        fi
4485      else
4486        # Otherwise we believe it is a complete path. Use it as it is.
4487        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4488$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4489        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4490$as_echo_n "checking for BASH... " >&6; }
4491        if test ! -x "$tool_specified"; then
4492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4493$as_echo "not found" >&6; }
4494          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4495        fi
4496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4497$as_echo "$tool_specified" >&6; }
4498      fi
4499    fi
4500  fi
4501
4502
4503
4504  if test "x$BASH" = x; then
4505    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4506  fi
4507
4508
4509
4510
4511
4512  # Publish this variable in the help.
4513
4514
4515  if test "x$CAT" = x; then
4516    # The variable is not set by user, try to locate tool using the code snippet
4517    for ac_prog in cat
4518do
4519  # Extract the first word of "$ac_prog", so it can be a program name with args.
4520set dummy $ac_prog; ac_word=$2
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4522$as_echo_n "checking for $ac_word... " >&6; }
4523if ${ac_cv_path_CAT+:} false; then :
4524  $as_echo_n "(cached) " >&6
4525else
4526  case $CAT in
4527  [\\/]* | ?:[\\/]*)
4528  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4529  ;;
4530  *)
4531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534  IFS=$as_save_IFS
4535  test -z "$as_dir" && as_dir=.
4536    for ac_exec_ext in '' $ac_executable_extensions; do
4537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4538    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4540    break 2
4541  fi
4542done
4543  done
4544IFS=$as_save_IFS
4545
4546  ;;
4547esac
4548fi
4549CAT=$ac_cv_path_CAT
4550if test -n "$CAT"; then
4551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4552$as_echo "$CAT" >&6; }
4553else
4554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555$as_echo "no" >&6; }
4556fi
4557
4558
4559  test -n "$CAT" && break
4560done
4561
4562  else
4563    # The variable is set, but is it from the command line or the environment?
4564
4565    # Try to remove the string !CAT! from our list.
4566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4568      # If it failed, the variable was not from the command line. Ignore it,
4569      # but warn the user (except for BASH, which is always set by the calling BASH).
4570      if test "xCAT" != xBASH; then
4571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4572$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4573      fi
4574      # Try to locate tool using the code snippet
4575      for ac_prog in cat
4576do
4577  # Extract the first word of "$ac_prog", so it can be a program name with args.
4578set dummy $ac_prog; ac_word=$2
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580$as_echo_n "checking for $ac_word... " >&6; }
4581if ${ac_cv_path_CAT+:} false; then :
4582  $as_echo_n "(cached) " >&6
4583else
4584  case $CAT in
4585  [\\/]* | ?:[\\/]*)
4586  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4587  ;;
4588  *)
4589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH
4591do
4592  IFS=$as_save_IFS
4593  test -z "$as_dir" && as_dir=.
4594    for ac_exec_ext in '' $ac_executable_extensions; do
4595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4596    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598    break 2
4599  fi
4600done
4601  done
4602IFS=$as_save_IFS
4603
4604  ;;
4605esac
4606fi
4607CAT=$ac_cv_path_CAT
4608if test -n "$CAT"; then
4609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4610$as_echo "$CAT" >&6; }
4611else
4612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613$as_echo "no" >&6; }
4614fi
4615
4616
4617  test -n "$CAT" && break
4618done
4619
4620    else
4621      # If it succeeded, then it was overridden by the user. We will use it
4622      # for the tool.
4623
4624      # First remove it from the list of overridden variables, so we can test
4625      # for unknown variables in the end.
4626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4627
4628      # Check if the provided tool contains a complete path.
4629      tool_specified="$CAT"
4630      tool_basename="${tool_specified##*/}"
4631      if test "x$tool_basename" = "x$tool_specified"; then
4632        # A command without a complete path is provided, search $PATH.
4633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4634$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4635        # Extract the first word of "$tool_basename", so it can be a program name with args.
4636set dummy $tool_basename; ac_word=$2
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
4639if ${ac_cv_path_CAT+:} false; then :
4640  $as_echo_n "(cached) " >&6
4641else
4642  case $CAT in
4643  [\\/]* | ?:[\\/]*)
4644  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4645  ;;
4646  *)
4647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in $PATH
4649do
4650  IFS=$as_save_IFS
4651  test -z "$as_dir" && as_dir=.
4652    for ac_exec_ext in '' $ac_executable_extensions; do
4653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4654    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656    break 2
4657  fi
4658done
4659  done
4660IFS=$as_save_IFS
4661
4662  ;;
4663esac
4664fi
4665CAT=$ac_cv_path_CAT
4666if test -n "$CAT"; then
4667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4668$as_echo "$CAT" >&6; }
4669else
4670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
4674
4675        if test "x$CAT" = x; then
4676          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4677        fi
4678      else
4679        # Otherwise we believe it is a complete path. Use it as it is.
4680        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4681$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4683$as_echo_n "checking for CAT... " >&6; }
4684        if test ! -x "$tool_specified"; then
4685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4686$as_echo "not found" >&6; }
4687          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4688        fi
4689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4690$as_echo "$tool_specified" >&6; }
4691      fi
4692    fi
4693  fi
4694
4695
4696
4697  if test "x$CAT" = x; then
4698    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4699  fi
4700
4701
4702
4703
4704
4705  # Publish this variable in the help.
4706
4707
4708  if test "x$CHMOD" = x; then
4709    # The variable is not set by user, try to locate tool using the code snippet
4710    for ac_prog in chmod
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if ${ac_cv_path_CHMOD+:} false; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $CHMOD in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4731    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742CHMOD=$ac_cv_path_CHMOD
4743if test -n "$CHMOD"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4745$as_echo "$CHMOD" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$CHMOD" && break
4753done
4754
4755  else
4756    # The variable is set, but is it from the command line or the environment?
4757
4758    # Try to remove the string !CHMOD! from our list.
4759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4761      # If it failed, the variable was not from the command line. Ignore it,
4762      # but warn the user (except for BASH, which is always set by the calling BASH).
4763      if test "xCHMOD" != xBASH; then
4764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4765$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4766      fi
4767      # Try to locate tool using the code snippet
4768      for ac_prog in chmod
4769do
4770  # Extract the first word of "$ac_prog", so it can be a program name with args.
4771set dummy $ac_prog; ac_word=$2
4772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4773$as_echo_n "checking for $ac_word... " >&6; }
4774if ${ac_cv_path_CHMOD+:} false; then :
4775  $as_echo_n "(cached) " >&6
4776else
4777  case $CHMOD in
4778  [\\/]* | ?:[\\/]*)
4779  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4780  ;;
4781  *)
4782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4783for as_dir in $PATH
4784do
4785  IFS=$as_save_IFS
4786  test -z "$as_dir" && as_dir=.
4787    for ac_exec_ext in '' $ac_executable_extensions; do
4788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4789    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4791    break 2
4792  fi
4793done
4794  done
4795IFS=$as_save_IFS
4796
4797  ;;
4798esac
4799fi
4800CHMOD=$ac_cv_path_CHMOD
4801if test -n "$CHMOD"; then
4802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4803$as_echo "$CHMOD" >&6; }
4804else
4805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
4807fi
4808
4809
4810  test -n "$CHMOD" && break
4811done
4812
4813    else
4814      # If it succeeded, then it was overridden by the user. We will use it
4815      # for the tool.
4816
4817      # First remove it from the list of overridden variables, so we can test
4818      # for unknown variables in the end.
4819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4820
4821      # Check if the provided tool contains a complete path.
4822      tool_specified="$CHMOD"
4823      tool_basename="${tool_specified##*/}"
4824      if test "x$tool_basename" = "x$tool_specified"; then
4825        # A command without a complete path is provided, search $PATH.
4826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4827$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4828        # Extract the first word of "$tool_basename", so it can be a program name with args.
4829set dummy $tool_basename; ac_word=$2
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
4832if ${ac_cv_path_CHMOD+:} false; then :
4833  $as_echo_n "(cached) " >&6
4834else
4835  case $CHMOD in
4836  [\\/]* | ?:[\\/]*)
4837  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4838  ;;
4839  *)
4840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in $PATH
4842do
4843  IFS=$as_save_IFS
4844  test -z "$as_dir" && as_dir=.
4845    for ac_exec_ext in '' $ac_executable_extensions; do
4846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4847    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849    break 2
4850  fi
4851done
4852  done
4853IFS=$as_save_IFS
4854
4855  ;;
4856esac
4857fi
4858CHMOD=$ac_cv_path_CHMOD
4859if test -n "$CHMOD"; then
4860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4861$as_echo "$CHMOD" >&6; }
4862else
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
4865fi
4866
4867
4868        if test "x$CHMOD" = x; then
4869          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4870        fi
4871      else
4872        # Otherwise we believe it is a complete path. Use it as it is.
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
4874$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
4875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
4876$as_echo_n "checking for CHMOD... " >&6; }
4877        if test ! -x "$tool_specified"; then
4878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4879$as_echo "not found" >&6; }
4880          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
4881        fi
4882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4883$as_echo "$tool_specified" >&6; }
4884      fi
4885    fi
4886  fi
4887
4888
4889
4890  if test "x$CHMOD" = x; then
4891    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
4892  fi
4893
4894
4895
4896
4897
4898  # Publish this variable in the help.
4899
4900
4901  if test "x$CMP" = x; then
4902    # The variable is not set by user, try to locate tool using the code snippet
4903    for ac_prog in cmp
4904do
4905  # Extract the first word of "$ac_prog", so it can be a program name with args.
4906set dummy $ac_prog; ac_word=$2
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4908$as_echo_n "checking for $ac_word... " >&6; }
4909if ${ac_cv_path_CMP+:} false; then :
4910  $as_echo_n "(cached) " >&6
4911else
4912  case $CMP in
4913  [\\/]* | ?:[\\/]*)
4914  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4915  ;;
4916  *)
4917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4918for as_dir in $PATH
4919do
4920  IFS=$as_save_IFS
4921  test -z "$as_dir" && as_dir=.
4922    for ac_exec_ext in '' $ac_executable_extensions; do
4923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4924    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4926    break 2
4927  fi
4928done
4929  done
4930IFS=$as_save_IFS
4931
4932  ;;
4933esac
4934fi
4935CMP=$ac_cv_path_CMP
4936if test -n "$CMP"; then
4937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4938$as_echo "$CMP" >&6; }
4939else
4940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4941$as_echo "no" >&6; }
4942fi
4943
4944
4945  test -n "$CMP" && break
4946done
4947
4948  else
4949    # The variable is set, but is it from the command line or the environment?
4950
4951    # Try to remove the string !CMP! from our list.
4952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
4953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4954      # If it failed, the variable was not from the command line. Ignore it,
4955      # but warn the user (except for BASH, which is always set by the calling BASH).
4956      if test "xCMP" != xBASH; then
4957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
4958$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
4959      fi
4960      # Try to locate tool using the code snippet
4961      for ac_prog in cmp
4962do
4963  # Extract the first word of "$ac_prog", so it can be a program name with args.
4964set dummy $ac_prog; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_CMP+:} false; then :
4968  $as_echo_n "(cached) " >&6
4969else
4970  case $CMP in
4971  [\\/]* | ?:[\\/]*)
4972  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4973  ;;
4974  *)
4975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978  IFS=$as_save_IFS
4979  test -z "$as_dir" && as_dir=.
4980    for ac_exec_ext in '' $ac_executable_extensions; do
4981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984    break 2
4985  fi
4986done
4987  done
4988IFS=$as_save_IFS
4989
4990  ;;
4991esac
4992fi
4993CMP=$ac_cv_path_CMP
4994if test -n "$CMP"; then
4995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4996$as_echo "$CMP" >&6; }
4997else
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002
5003  test -n "$CMP" && break
5004done
5005
5006    else
5007      # If it succeeded, then it was overridden by the user. We will use it
5008      # for the tool.
5009
5010      # First remove it from the list of overridden variables, so we can test
5011      # for unknown variables in the end.
5012      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5013
5014      # Check if the provided tool contains a complete path.
5015      tool_specified="$CMP"
5016      tool_basename="${tool_specified##*/}"
5017      if test "x$tool_basename" = "x$tool_specified"; then
5018        # A command without a complete path is provided, search $PATH.
5019        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5020$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5021        # Extract the first word of "$tool_basename", so it can be a program name with args.
5022set dummy $tool_basename; ac_word=$2
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024$as_echo_n "checking for $ac_word... " >&6; }
5025if ${ac_cv_path_CMP+:} false; then :
5026  $as_echo_n "(cached) " >&6
5027else
5028  case $CMP in
5029  [\\/]* | ?:[\\/]*)
5030  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5031  ;;
5032  *)
5033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036  IFS=$as_save_IFS
5037  test -z "$as_dir" && as_dir=.
5038    for ac_exec_ext in '' $ac_executable_extensions; do
5039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5040    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042    break 2
5043  fi
5044done
5045  done
5046IFS=$as_save_IFS
5047
5048  ;;
5049esac
5050fi
5051CMP=$ac_cv_path_CMP
5052if test -n "$CMP"; then
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5054$as_echo "$CMP" >&6; }
5055else
5056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057$as_echo "no" >&6; }
5058fi
5059
5060
5061        if test "x$CMP" = x; then
5062          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5063        fi
5064      else
5065        # Otherwise we believe it is a complete path. Use it as it is.
5066        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5067$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5069$as_echo_n "checking for CMP... " >&6; }
5070        if test ! -x "$tool_specified"; then
5071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5072$as_echo "not found" >&6; }
5073          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5074        fi
5075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5076$as_echo "$tool_specified" >&6; }
5077      fi
5078    fi
5079  fi
5080
5081
5082
5083  if test "x$CMP" = x; then
5084    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5085  fi
5086
5087
5088
5089
5090
5091  # Publish this variable in the help.
5092
5093
5094  if test "x$COMM" = x; then
5095    # The variable is not set by user, try to locate tool using the code snippet
5096    for ac_prog in comm
5097do
5098  # Extract the first word of "$ac_prog", so it can be a program name with args.
5099set dummy $ac_prog; ac_word=$2
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101$as_echo_n "checking for $ac_word... " >&6; }
5102if ${ac_cv_path_COMM+:} false; then :
5103  $as_echo_n "(cached) " >&6
5104else
5105  case $COMM in
5106  [\\/]* | ?:[\\/]*)
5107  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5108  ;;
5109  *)
5110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111for as_dir in $PATH
5112do
5113  IFS=$as_save_IFS
5114  test -z "$as_dir" && as_dir=.
5115    for ac_exec_ext in '' $ac_executable_extensions; do
5116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119    break 2
5120  fi
5121done
5122  done
5123IFS=$as_save_IFS
5124
5125  ;;
5126esac
5127fi
5128COMM=$ac_cv_path_COMM
5129if test -n "$COMM"; then
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5131$as_echo "$COMM" >&6; }
5132else
5133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
5135fi
5136
5137
5138  test -n "$COMM" && break
5139done
5140
5141  else
5142    # The variable is set, but is it from the command line or the environment?
5143
5144    # Try to remove the string !COMM! from our list.
5145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5147      # If it failed, the variable was not from the command line. Ignore it,
5148      # but warn the user (except for BASH, which is always set by the calling BASH).
5149      if test "xCOMM" != xBASH; then
5150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5151$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5152      fi
5153      # Try to locate tool using the code snippet
5154      for ac_prog in comm
5155do
5156  # Extract the first word of "$ac_prog", so it can be a program name with args.
5157set dummy $ac_prog; ac_word=$2
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5159$as_echo_n "checking for $ac_word... " >&6; }
5160if ${ac_cv_path_COMM+:} false; then :
5161  $as_echo_n "(cached) " >&6
5162else
5163  case $COMM in
5164  [\\/]* | ?:[\\/]*)
5165  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5166  ;;
5167  *)
5168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5169for as_dir in $PATH
5170do
5171  IFS=$as_save_IFS
5172  test -z "$as_dir" && as_dir=.
5173    for ac_exec_ext in '' $ac_executable_extensions; do
5174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5175    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5177    break 2
5178  fi
5179done
5180  done
5181IFS=$as_save_IFS
5182
5183  ;;
5184esac
5185fi
5186COMM=$ac_cv_path_COMM
5187if test -n "$COMM"; then
5188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5189$as_echo "$COMM" >&6; }
5190else
5191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5192$as_echo "no" >&6; }
5193fi
5194
5195
5196  test -n "$COMM" && break
5197done
5198
5199    else
5200      # If it succeeded, then it was overridden by the user. We will use it
5201      # for the tool.
5202
5203      # First remove it from the list of overridden variables, so we can test
5204      # for unknown variables in the end.
5205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5206
5207      # Check if the provided tool contains a complete path.
5208      tool_specified="$COMM"
5209      tool_basename="${tool_specified##*/}"
5210      if test "x$tool_basename" = "x$tool_specified"; then
5211        # A command without a complete path is provided, search $PATH.
5212        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5213$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5214        # Extract the first word of "$tool_basename", so it can be a program name with args.
5215set dummy $tool_basename; ac_word=$2
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5217$as_echo_n "checking for $ac_word... " >&6; }
5218if ${ac_cv_path_COMM+:} false; then :
5219  $as_echo_n "(cached) " >&6
5220else
5221  case $COMM in
5222  [\\/]* | ?:[\\/]*)
5223  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5224  ;;
5225  *)
5226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229  IFS=$as_save_IFS
5230  test -z "$as_dir" && as_dir=.
5231    for ac_exec_ext in '' $ac_executable_extensions; do
5232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5233    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5235    break 2
5236  fi
5237done
5238  done
5239IFS=$as_save_IFS
5240
5241  ;;
5242esac
5243fi
5244COMM=$ac_cv_path_COMM
5245if test -n "$COMM"; then
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5247$as_echo "$COMM" >&6; }
5248else
5249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
5251fi
5252
5253
5254        if test "x$COMM" = x; then
5255          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5256        fi
5257      else
5258        # Otherwise we believe it is a complete path. Use it as it is.
5259        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5260$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5261        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5262$as_echo_n "checking for COMM... " >&6; }
5263        if test ! -x "$tool_specified"; then
5264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5265$as_echo "not found" >&6; }
5266          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5267        fi
5268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5269$as_echo "$tool_specified" >&6; }
5270      fi
5271    fi
5272  fi
5273
5274
5275
5276  if test "x$COMM" = x; then
5277    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5278  fi
5279
5280
5281
5282
5283
5284  # Publish this variable in the help.
5285
5286
5287  if test "x$CP" = x; then
5288    # The variable is not set by user, try to locate tool using the code snippet
5289    for ac_prog in cp
5290do
5291  # Extract the first word of "$ac_prog", so it can be a program name with args.
5292set dummy $ac_prog; ac_word=$2
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294$as_echo_n "checking for $ac_word... " >&6; }
5295if ${ac_cv_path_CP+:} false; then :
5296  $as_echo_n "(cached) " >&6
5297else
5298  case $CP in
5299  [\\/]* | ?:[\\/]*)
5300  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5301  ;;
5302  *)
5303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304for as_dir in $PATH
5305do
5306  IFS=$as_save_IFS
5307  test -z "$as_dir" && as_dir=.
5308    for ac_exec_ext in '' $ac_executable_extensions; do
5309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312    break 2
5313  fi
5314done
5315  done
5316IFS=$as_save_IFS
5317
5318  ;;
5319esac
5320fi
5321CP=$ac_cv_path_CP
5322if test -n "$CP"; then
5323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5324$as_echo "$CP" >&6; }
5325else
5326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327$as_echo "no" >&6; }
5328fi
5329
5330
5331  test -n "$CP" && break
5332done
5333
5334  else
5335    # The variable is set, but is it from the command line or the environment?
5336
5337    # Try to remove the string !CP! from our list.
5338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5340      # If it failed, the variable was not from the command line. Ignore it,
5341      # but warn the user (except for BASH, which is always set by the calling BASH).
5342      if test "xCP" != xBASH; then
5343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5344$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5345      fi
5346      # Try to locate tool using the code snippet
5347      for ac_prog in cp
5348do
5349  # Extract the first word of "$ac_prog", so it can be a program name with args.
5350set dummy $ac_prog; ac_word=$2
5351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5352$as_echo_n "checking for $ac_word... " >&6; }
5353if ${ac_cv_path_CP+:} false; then :
5354  $as_echo_n "(cached) " >&6
5355else
5356  case $CP in
5357  [\\/]* | ?:[\\/]*)
5358  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5359  ;;
5360  *)
5361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5362for as_dir in $PATH
5363do
5364  IFS=$as_save_IFS
5365  test -z "$as_dir" && as_dir=.
5366    for ac_exec_ext in '' $ac_executable_extensions; do
5367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5368    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5370    break 2
5371  fi
5372done
5373  done
5374IFS=$as_save_IFS
5375
5376  ;;
5377esac
5378fi
5379CP=$ac_cv_path_CP
5380if test -n "$CP"; then
5381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5382$as_echo "$CP" >&6; }
5383else
5384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387
5388
5389  test -n "$CP" && break
5390done
5391
5392    else
5393      # If it succeeded, then it was overridden by the user. We will use it
5394      # for the tool.
5395
5396      # First remove it from the list of overridden variables, so we can test
5397      # for unknown variables in the end.
5398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5399
5400      # Check if the provided tool contains a complete path.
5401      tool_specified="$CP"
5402      tool_basename="${tool_specified##*/}"
5403      if test "x$tool_basename" = "x$tool_specified"; then
5404        # A command without a complete path is provided, search $PATH.
5405        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5406$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5407        # Extract the first word of "$tool_basename", so it can be a program name with args.
5408set dummy $tool_basename; ac_word=$2
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5410$as_echo_n "checking for $ac_word... " >&6; }
5411if ${ac_cv_path_CP+:} false; then :
5412  $as_echo_n "(cached) " >&6
5413else
5414  case $CP in
5415  [\\/]* | ?:[\\/]*)
5416  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5417  ;;
5418  *)
5419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5420for as_dir in $PATH
5421do
5422  IFS=$as_save_IFS
5423  test -z "$as_dir" && as_dir=.
5424    for ac_exec_ext in '' $ac_executable_extensions; do
5425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5426    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5428    break 2
5429  fi
5430done
5431  done
5432IFS=$as_save_IFS
5433
5434  ;;
5435esac
5436fi
5437CP=$ac_cv_path_CP
5438if test -n "$CP"; then
5439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5440$as_echo "$CP" >&6; }
5441else
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5443$as_echo "no" >&6; }
5444fi
5445
5446
5447        if test "x$CP" = x; then
5448          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5449        fi
5450      else
5451        # Otherwise we believe it is a complete path. Use it as it is.
5452        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5453$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5455$as_echo_n "checking for CP... " >&6; }
5456        if test ! -x "$tool_specified"; then
5457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5458$as_echo "not found" >&6; }
5459          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5460        fi
5461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5462$as_echo "$tool_specified" >&6; }
5463      fi
5464    fi
5465  fi
5466
5467
5468
5469  if test "x$CP" = x; then
5470    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5471  fi
5472
5473
5474
5475
5476
5477  # Publish this variable in the help.
5478
5479
5480  if test "x$CPIO" = x; then
5481    # The variable is not set by user, try to locate tool using the code snippet
5482    for ac_prog in cpio
5483do
5484  # Extract the first word of "$ac_prog", so it can be a program name with args.
5485set dummy $ac_prog; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_CPIO+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $CPIO in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514CPIO=$ac_cv_path_CPIO
5515if test -n "$CPIO"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5517$as_echo "$CPIO" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524  test -n "$CPIO" && break
5525done
5526
5527  else
5528    # The variable is set, but is it from the command line or the environment?
5529
5530    # Try to remove the string !CPIO! from our list.
5531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5533      # If it failed, the variable was not from the command line. Ignore it,
5534      # but warn the user (except for BASH, which is always set by the calling BASH).
5535      if test "xCPIO" != xBASH; then
5536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5537$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5538      fi
5539      # Try to locate tool using the code snippet
5540      for ac_prog in cpio
5541do
5542  # Extract the first word of "$ac_prog", so it can be a program name with args.
5543set dummy $ac_prog; ac_word=$2
5544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5545$as_echo_n "checking for $ac_word... " >&6; }
5546if ${ac_cv_path_CPIO+:} false; then :
5547  $as_echo_n "(cached) " >&6
5548else
5549  case $CPIO in
5550  [\\/]* | ?:[\\/]*)
5551  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5552  ;;
5553  *)
5554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557  IFS=$as_save_IFS
5558  test -z "$as_dir" && as_dir=.
5559    for ac_exec_ext in '' $ac_executable_extensions; do
5560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5561    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5563    break 2
5564  fi
5565done
5566  done
5567IFS=$as_save_IFS
5568
5569  ;;
5570esac
5571fi
5572CPIO=$ac_cv_path_CPIO
5573if test -n "$CPIO"; then
5574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5575$as_echo "$CPIO" >&6; }
5576else
5577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5578$as_echo "no" >&6; }
5579fi
5580
5581
5582  test -n "$CPIO" && break
5583done
5584
5585    else
5586      # If it succeeded, then it was overridden by the user. We will use it
5587      # for the tool.
5588
5589      # First remove it from the list of overridden variables, so we can test
5590      # for unknown variables in the end.
5591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5592
5593      # Check if the provided tool contains a complete path.
5594      tool_specified="$CPIO"
5595      tool_basename="${tool_specified##*/}"
5596      if test "x$tool_basename" = "x$tool_specified"; then
5597        # A command without a complete path is provided, search $PATH.
5598        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5599$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5600        # Extract the first word of "$tool_basename", so it can be a program name with args.
5601set dummy $tool_basename; ac_word=$2
5602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5603$as_echo_n "checking for $ac_word... " >&6; }
5604if ${ac_cv_path_CPIO+:} false; then :
5605  $as_echo_n "(cached) " >&6
5606else
5607  case $CPIO in
5608  [\\/]* | ?:[\\/]*)
5609  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5610  ;;
5611  *)
5612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5613for as_dir in $PATH
5614do
5615  IFS=$as_save_IFS
5616  test -z "$as_dir" && as_dir=.
5617    for ac_exec_ext in '' $ac_executable_extensions; do
5618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5619    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5621    break 2
5622  fi
5623done
5624  done
5625IFS=$as_save_IFS
5626
5627  ;;
5628esac
5629fi
5630CPIO=$ac_cv_path_CPIO
5631if test -n "$CPIO"; then
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5633$as_echo "$CPIO" >&6; }
5634else
5635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5636$as_echo "no" >&6; }
5637fi
5638
5639
5640        if test "x$CPIO" = x; then
5641          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5642        fi
5643      else
5644        # Otherwise we believe it is a complete path. Use it as it is.
5645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5646$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5648$as_echo_n "checking for CPIO... " >&6; }
5649        if test ! -x "$tool_specified"; then
5650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5651$as_echo "not found" >&6; }
5652          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5653        fi
5654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5655$as_echo "$tool_specified" >&6; }
5656      fi
5657    fi
5658  fi
5659
5660
5661
5662  if test "x$CPIO" = x; then
5663    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5664  fi
5665
5666
5667
5668
5669
5670  # Publish this variable in the help.
5671
5672
5673  if test "x$CUT" = x; then
5674    # The variable is not set by user, try to locate tool using the code snippet
5675    for ac_prog in cut
5676do
5677  # Extract the first word of "$ac_prog", so it can be a program name with args.
5678set dummy $ac_prog; ac_word=$2
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5680$as_echo_n "checking for $ac_word... " >&6; }
5681if ${ac_cv_path_CUT+:} false; then :
5682  $as_echo_n "(cached) " >&6
5683else
5684  case $CUT in
5685  [\\/]* | ?:[\\/]*)
5686  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5687  ;;
5688  *)
5689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690for as_dir in $PATH
5691do
5692  IFS=$as_save_IFS
5693  test -z "$as_dir" && as_dir=.
5694    for ac_exec_ext in '' $ac_executable_extensions; do
5695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5696    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698    break 2
5699  fi
5700done
5701  done
5702IFS=$as_save_IFS
5703
5704  ;;
5705esac
5706fi
5707CUT=$ac_cv_path_CUT
5708if test -n "$CUT"; then
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5710$as_echo "$CUT" >&6; }
5711else
5712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5713$as_echo "no" >&6; }
5714fi
5715
5716
5717  test -n "$CUT" && break
5718done
5719
5720  else
5721    # The variable is set, but is it from the command line or the environment?
5722
5723    # Try to remove the string !CUT! from our list.
5724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5726      # If it failed, the variable was not from the command line. Ignore it,
5727      # but warn the user (except for BASH, which is always set by the calling BASH).
5728      if test "xCUT" != xBASH; then
5729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5730$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5731      fi
5732      # Try to locate tool using the code snippet
5733      for ac_prog in cut
5734do
5735  # Extract the first word of "$ac_prog", so it can be a program name with args.
5736set dummy $ac_prog; ac_word=$2
5737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
5739if ${ac_cv_path_CUT+:} false; then :
5740  $as_echo_n "(cached) " >&6
5741else
5742  case $CUT in
5743  [\\/]* | ?:[\\/]*)
5744  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5745  ;;
5746  *)
5747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750  IFS=$as_save_IFS
5751  test -z "$as_dir" && as_dir=.
5752    for ac_exec_ext in '' $ac_executable_extensions; do
5753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5754    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5756    break 2
5757  fi
5758done
5759  done
5760IFS=$as_save_IFS
5761
5762  ;;
5763esac
5764fi
5765CUT=$ac_cv_path_CUT
5766if test -n "$CUT"; then
5767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5768$as_echo "$CUT" >&6; }
5769else
5770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
5772fi
5773
5774
5775  test -n "$CUT" && break
5776done
5777
5778    else
5779      # If it succeeded, then it was overridden by the user. We will use it
5780      # for the tool.
5781
5782      # First remove it from the list of overridden variables, so we can test
5783      # for unknown variables in the end.
5784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5785
5786      # Check if the provided tool contains a complete path.
5787      tool_specified="$CUT"
5788      tool_basename="${tool_specified##*/}"
5789      if test "x$tool_basename" = "x$tool_specified"; then
5790        # A command without a complete path is provided, search $PATH.
5791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5792$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5793        # Extract the first word of "$tool_basename", so it can be a program name with args.
5794set dummy $tool_basename; 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_CUT+:} false; then :
5798  $as_echo_n "(cached) " >&6
5799else
5800  case $CUT in
5801  [\\/]* | ?:[\\/]*)
5802  ac_cv_path_CUT="$CUT" # 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_CUT="$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
5823CUT=$ac_cv_path_CUT
5824if test -n "$CUT"; then
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5826$as_echo "$CUT" >&6; }
5827else
5828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829$as_echo "no" >&6; }
5830fi
5831
5832
5833        if test "x$CUT" = x; then
5834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5835        fi
5836      else
5837        # Otherwise we believe it is a complete path. Use it as it is.
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5839$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5841$as_echo_n "checking for CUT... " >&6; }
5842        if test ! -x "$tool_specified"; then
5843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5844$as_echo "not found" >&6; }
5845          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5846        fi
5847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5848$as_echo "$tool_specified" >&6; }
5849      fi
5850    fi
5851  fi
5852
5853
5854
5855  if test "x$CUT" = x; then
5856    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5857  fi
5858
5859
5860
5861
5862
5863  # Publish this variable in the help.
5864
5865
5866  if test "x$DATE" = x; then
5867    # The variable is not set by user, try to locate tool using the code snippet
5868    for ac_prog in date
5869do
5870  # Extract the first word of "$ac_prog", so it can be a program name with args.
5871set dummy $ac_prog; ac_word=$2
5872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5873$as_echo_n "checking for $ac_word... " >&6; }
5874if ${ac_cv_path_DATE+:} false; then :
5875  $as_echo_n "(cached) " >&6
5876else
5877  case $DATE in
5878  [\\/]* | ?:[\\/]*)
5879  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5880  ;;
5881  *)
5882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5883for as_dir in $PATH
5884do
5885  IFS=$as_save_IFS
5886  test -z "$as_dir" && as_dir=.
5887    for ac_exec_ext in '' $ac_executable_extensions; do
5888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5889    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5891    break 2
5892  fi
5893done
5894  done
5895IFS=$as_save_IFS
5896
5897  ;;
5898esac
5899fi
5900DATE=$ac_cv_path_DATE
5901if test -n "$DATE"; then
5902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5903$as_echo "$DATE" >&6; }
5904else
5905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906$as_echo "no" >&6; }
5907fi
5908
5909
5910  test -n "$DATE" && break
5911done
5912
5913  else
5914    # The variable is set, but is it from the command line or the environment?
5915
5916    # Try to remove the string !DATE! from our list.
5917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5919      # If it failed, the variable was not from the command line. Ignore it,
5920      # but warn the user (except for BASH, which is always set by the calling BASH).
5921      if test "xDATE" != xBASH; then
5922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5923$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5924      fi
5925      # Try to locate tool using the code snippet
5926      for ac_prog in date
5927do
5928  # Extract the first word of "$ac_prog", so it can be a program name with args.
5929set dummy $ac_prog; ac_word=$2
5930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5931$as_echo_n "checking for $ac_word... " >&6; }
5932if ${ac_cv_path_DATE+:} false; then :
5933  $as_echo_n "(cached) " >&6
5934else
5935  case $DATE in
5936  [\\/]* | ?:[\\/]*)
5937  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5938  ;;
5939  *)
5940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943  IFS=$as_save_IFS
5944  test -z "$as_dir" && as_dir=.
5945    for ac_exec_ext in '' $ac_executable_extensions; do
5946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5947    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5949    break 2
5950  fi
5951done
5952  done
5953IFS=$as_save_IFS
5954
5955  ;;
5956esac
5957fi
5958DATE=$ac_cv_path_DATE
5959if test -n "$DATE"; then
5960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5961$as_echo "$DATE" >&6; }
5962else
5963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
5965fi
5966
5967
5968  test -n "$DATE" && break
5969done
5970
5971    else
5972      # If it succeeded, then it was overridden by the user. We will use it
5973      # for the tool.
5974
5975      # First remove it from the list of overridden variables, so we can test
5976      # for unknown variables in the end.
5977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5978
5979      # Check if the provided tool contains a complete path.
5980      tool_specified="$DATE"
5981      tool_basename="${tool_specified##*/}"
5982      if test "x$tool_basename" = "x$tool_specified"; then
5983        # A command without a complete path is provided, search $PATH.
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
5985$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
5986        # Extract the first word of "$tool_basename", so it can be a program name with args.
5987set dummy $tool_basename; ac_word=$2
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5989$as_echo_n "checking for $ac_word... " >&6; }
5990if ${ac_cv_path_DATE+:} false; then :
5991  $as_echo_n "(cached) " >&6
5992else
5993  case $DATE in
5994  [\\/]* | ?:[\\/]*)
5995  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5996  ;;
5997  *)
5998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5999for as_dir in $PATH
6000do
6001  IFS=$as_save_IFS
6002  test -z "$as_dir" && as_dir=.
6003    for ac_exec_ext in '' $ac_executable_extensions; do
6004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6005    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6007    break 2
6008  fi
6009done
6010  done
6011IFS=$as_save_IFS
6012
6013  ;;
6014esac
6015fi
6016DATE=$ac_cv_path_DATE
6017if test -n "$DATE"; then
6018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6019$as_echo "$DATE" >&6; }
6020else
6021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6022$as_echo "no" >&6; }
6023fi
6024
6025
6026        if test "x$DATE" = x; then
6027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6028        fi
6029      else
6030        # Otherwise we believe it is a complete path. Use it as it is.
6031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6032$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6034$as_echo_n "checking for DATE... " >&6; }
6035        if test ! -x "$tool_specified"; then
6036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6037$as_echo "not found" >&6; }
6038          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6039        fi
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6041$as_echo "$tool_specified" >&6; }
6042      fi
6043    fi
6044  fi
6045
6046
6047
6048  if test "x$DATE" = x; then
6049    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6050  fi
6051
6052
6053
6054
6055
6056  # Publish this variable in the help.
6057
6058
6059  if test "x$DIFF" = x; then
6060    # The variable is not set by user, try to locate tool using the code snippet
6061    for ac_prog in gdiff diff
6062do
6063  # Extract the first word of "$ac_prog", so it can be a program name with args.
6064set dummy $ac_prog; ac_word=$2
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066$as_echo_n "checking for $ac_word... " >&6; }
6067if ${ac_cv_path_DIFF+:} false; then :
6068  $as_echo_n "(cached) " >&6
6069else
6070  case $DIFF in
6071  [\\/]* | ?:[\\/]*)
6072  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6073  ;;
6074  *)
6075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078  IFS=$as_save_IFS
6079  test -z "$as_dir" && as_dir=.
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6082    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6084    break 2
6085  fi
6086done
6087  done
6088IFS=$as_save_IFS
6089
6090  ;;
6091esac
6092fi
6093DIFF=$ac_cv_path_DIFF
6094if test -n "$DIFF"; then
6095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6096$as_echo "$DIFF" >&6; }
6097else
6098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099$as_echo "no" >&6; }
6100fi
6101
6102
6103  test -n "$DIFF" && break
6104done
6105
6106  else
6107    # The variable is set, but is it from the command line or the environment?
6108
6109    # Try to remove the string !DIFF! from our list.
6110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6112      # If it failed, the variable was not from the command line. Ignore it,
6113      # but warn the user (except for BASH, which is always set by the calling BASH).
6114      if test "xDIFF" != xBASH; then
6115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6116$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6117      fi
6118      # Try to locate tool using the code snippet
6119      for ac_prog in gdiff diff
6120do
6121  # Extract the first word of "$ac_prog", so it can be a program name with args.
6122set dummy $ac_prog; ac_word=$2
6123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6124$as_echo_n "checking for $ac_word... " >&6; }
6125if ${ac_cv_path_DIFF+:} false; then :
6126  $as_echo_n "(cached) " >&6
6127else
6128  case $DIFF in
6129  [\\/]* | ?:[\\/]*)
6130  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6131  ;;
6132  *)
6133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136  IFS=$as_save_IFS
6137  test -z "$as_dir" && as_dir=.
6138    for ac_exec_ext in '' $ac_executable_extensions; do
6139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6140    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142    break 2
6143  fi
6144done
6145  done
6146IFS=$as_save_IFS
6147
6148  ;;
6149esac
6150fi
6151DIFF=$ac_cv_path_DIFF
6152if test -n "$DIFF"; then
6153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6154$as_echo "$DIFF" >&6; }
6155else
6156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157$as_echo "no" >&6; }
6158fi
6159
6160
6161  test -n "$DIFF" && break
6162done
6163
6164    else
6165      # If it succeeded, then it was overridden by the user. We will use it
6166      # for the tool.
6167
6168      # First remove it from the list of overridden variables, so we can test
6169      # for unknown variables in the end.
6170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6171
6172      # Check if the provided tool contains a complete path.
6173      tool_specified="$DIFF"
6174      tool_basename="${tool_specified##*/}"
6175      if test "x$tool_basename" = "x$tool_specified"; then
6176        # A command without a complete path is provided, search $PATH.
6177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6178$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6179        # Extract the first word of "$tool_basename", so it can be a program name with args.
6180set dummy $tool_basename; ac_word=$2
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6182$as_echo_n "checking for $ac_word... " >&6; }
6183if ${ac_cv_path_DIFF+:} false; then :
6184  $as_echo_n "(cached) " >&6
6185else
6186  case $DIFF in
6187  [\\/]* | ?:[\\/]*)
6188  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6189  ;;
6190  *)
6191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6192for as_dir in $PATH
6193do
6194  IFS=$as_save_IFS
6195  test -z "$as_dir" && as_dir=.
6196    for ac_exec_ext in '' $ac_executable_extensions; do
6197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6198    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6200    break 2
6201  fi
6202done
6203  done
6204IFS=$as_save_IFS
6205
6206  ;;
6207esac
6208fi
6209DIFF=$ac_cv_path_DIFF
6210if test -n "$DIFF"; then
6211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6212$as_echo "$DIFF" >&6; }
6213else
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215$as_echo "no" >&6; }
6216fi
6217
6218
6219        if test "x$DIFF" = x; then
6220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6221        fi
6222      else
6223        # Otherwise we believe it is a complete path. Use it as it is.
6224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6225$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6227$as_echo_n "checking for DIFF... " >&6; }
6228        if test ! -x "$tool_specified"; then
6229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6230$as_echo "not found" >&6; }
6231          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6232        fi
6233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6234$as_echo "$tool_specified" >&6; }
6235      fi
6236    fi
6237  fi
6238
6239
6240
6241  if test "x$DIFF" = x; then
6242    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6243  fi
6244
6245
6246
6247
6248
6249  # Publish this variable in the help.
6250
6251
6252  if test "x$DIRNAME" = x; then
6253    # The variable is not set by user, try to locate tool using the code snippet
6254    for ac_prog in dirname
6255do
6256  # Extract the first word of "$ac_prog", so it can be a program name with args.
6257set dummy $ac_prog; ac_word=$2
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6259$as_echo_n "checking for $ac_word... " >&6; }
6260if ${ac_cv_path_DIRNAME+:} false; then :
6261  $as_echo_n "(cached) " >&6
6262else
6263  case $DIRNAME in
6264  [\\/]* | ?:[\\/]*)
6265  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6266  ;;
6267  *)
6268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6269for as_dir in $PATH
6270do
6271  IFS=$as_save_IFS
6272  test -z "$as_dir" && as_dir=.
6273    for ac_exec_ext in '' $ac_executable_extensions; do
6274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6275    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6277    break 2
6278  fi
6279done
6280  done
6281IFS=$as_save_IFS
6282
6283  ;;
6284esac
6285fi
6286DIRNAME=$ac_cv_path_DIRNAME
6287if test -n "$DIRNAME"; then
6288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6289$as_echo "$DIRNAME" >&6; }
6290else
6291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6292$as_echo "no" >&6; }
6293fi
6294
6295
6296  test -n "$DIRNAME" && break
6297done
6298
6299  else
6300    # The variable is set, but is it from the command line or the environment?
6301
6302    # Try to remove the string !DIRNAME! from our list.
6303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6305      # If it failed, the variable was not from the command line. Ignore it,
6306      # but warn the user (except for BASH, which is always set by the calling BASH).
6307      if test "xDIRNAME" != xBASH; then
6308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6309$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6310      fi
6311      # Try to locate tool using the code snippet
6312      for ac_prog in dirname
6313do
6314  # Extract the first word of "$ac_prog", so it can be a program name with args.
6315set dummy $ac_prog; ac_word=$2
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6317$as_echo_n "checking for $ac_word... " >&6; }
6318if ${ac_cv_path_DIRNAME+:} false; then :
6319  $as_echo_n "(cached) " >&6
6320else
6321  case $DIRNAME in
6322  [\\/]* | ?:[\\/]*)
6323  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6324  ;;
6325  *)
6326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6327for as_dir in $PATH
6328do
6329  IFS=$as_save_IFS
6330  test -z "$as_dir" && as_dir=.
6331    for ac_exec_ext in '' $ac_executable_extensions; do
6332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6333    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6335    break 2
6336  fi
6337done
6338  done
6339IFS=$as_save_IFS
6340
6341  ;;
6342esac
6343fi
6344DIRNAME=$ac_cv_path_DIRNAME
6345if test -n "$DIRNAME"; then
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6347$as_echo "$DIRNAME" >&6; }
6348else
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
6353
6354  test -n "$DIRNAME" && break
6355done
6356
6357    else
6358      # If it succeeded, then it was overridden by the user. We will use it
6359      # for the tool.
6360
6361      # First remove it from the list of overridden variables, so we can test
6362      # for unknown variables in the end.
6363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6364
6365      # Check if the provided tool contains a complete path.
6366      tool_specified="$DIRNAME"
6367      tool_basename="${tool_specified##*/}"
6368      if test "x$tool_basename" = "x$tool_specified"; then
6369        # A command without a complete path is provided, search $PATH.
6370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6371$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6372        # Extract the first word of "$tool_basename", so it can be a program name with args.
6373set dummy $tool_basename; ac_word=$2
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6375$as_echo_n "checking for $ac_word... " >&6; }
6376if ${ac_cv_path_DIRNAME+:} false; then :
6377  $as_echo_n "(cached) " >&6
6378else
6379  case $DIRNAME in
6380  [\\/]* | ?:[\\/]*)
6381  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6382  ;;
6383  *)
6384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6385for as_dir in $PATH
6386do
6387  IFS=$as_save_IFS
6388  test -z "$as_dir" && as_dir=.
6389    for ac_exec_ext in '' $ac_executable_extensions; do
6390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6391    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6393    break 2
6394  fi
6395done
6396  done
6397IFS=$as_save_IFS
6398
6399  ;;
6400esac
6401fi
6402DIRNAME=$ac_cv_path_DIRNAME
6403if test -n "$DIRNAME"; then
6404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6405$as_echo "$DIRNAME" >&6; }
6406else
6407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6408$as_echo "no" >&6; }
6409fi
6410
6411
6412        if test "x$DIRNAME" = x; then
6413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6414        fi
6415      else
6416        # Otherwise we believe it is a complete path. Use it as it is.
6417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6418$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6420$as_echo_n "checking for DIRNAME... " >&6; }
6421        if test ! -x "$tool_specified"; then
6422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6423$as_echo "not found" >&6; }
6424          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6425        fi
6426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6427$as_echo "$tool_specified" >&6; }
6428      fi
6429    fi
6430  fi
6431
6432
6433
6434  if test "x$DIRNAME" = x; then
6435    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6436  fi
6437
6438
6439
6440
6441
6442  # Publish this variable in the help.
6443
6444
6445  if test "x$ECHO" = x; then
6446    # The variable is not set by user, try to locate tool using the code snippet
6447    for ac_prog in echo
6448do
6449  # Extract the first word of "$ac_prog", so it can be a program name with args.
6450set dummy $ac_prog; ac_word=$2
6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6452$as_echo_n "checking for $ac_word... " >&6; }
6453if ${ac_cv_path_ECHO+:} false; then :
6454  $as_echo_n "(cached) " >&6
6455else
6456  case $ECHO in
6457  [\\/]* | ?:[\\/]*)
6458  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6459  ;;
6460  *)
6461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6462for as_dir in $PATH
6463do
6464  IFS=$as_save_IFS
6465  test -z "$as_dir" && as_dir=.
6466    for ac_exec_ext in '' $ac_executable_extensions; do
6467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6468    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6470    break 2
6471  fi
6472done
6473  done
6474IFS=$as_save_IFS
6475
6476  ;;
6477esac
6478fi
6479ECHO=$ac_cv_path_ECHO
6480if test -n "$ECHO"; then
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6482$as_echo "$ECHO" >&6; }
6483else
6484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6485$as_echo "no" >&6; }
6486fi
6487
6488
6489  test -n "$ECHO" && break
6490done
6491
6492  else
6493    # The variable is set, but is it from the command line or the environment?
6494
6495    # Try to remove the string !ECHO! from our list.
6496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6498      # If it failed, the variable was not from the command line. Ignore it,
6499      # but warn the user (except for BASH, which is always set by the calling BASH).
6500      if test "xECHO" != xBASH; then
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6502$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6503      fi
6504      # Try to locate tool using the code snippet
6505      for ac_prog in echo
6506do
6507  # Extract the first word of "$ac_prog", so it can be a program name with args.
6508set dummy $ac_prog; ac_word=$2
6509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510$as_echo_n "checking for $ac_word... " >&6; }
6511if ${ac_cv_path_ECHO+:} false; then :
6512  $as_echo_n "(cached) " >&6
6513else
6514  case $ECHO in
6515  [\\/]* | ?:[\\/]*)
6516  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6517  ;;
6518  *)
6519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520for as_dir in $PATH
6521do
6522  IFS=$as_save_IFS
6523  test -z "$as_dir" && as_dir=.
6524    for ac_exec_ext in '' $ac_executable_extensions; do
6525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528    break 2
6529  fi
6530done
6531  done
6532IFS=$as_save_IFS
6533
6534  ;;
6535esac
6536fi
6537ECHO=$ac_cv_path_ECHO
6538if test -n "$ECHO"; then
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6540$as_echo "$ECHO" >&6; }
6541else
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543$as_echo "no" >&6; }
6544fi
6545
6546
6547  test -n "$ECHO" && break
6548done
6549
6550    else
6551      # If it succeeded, then it was overridden by the user. We will use it
6552      # for the tool.
6553
6554      # First remove it from the list of overridden variables, so we can test
6555      # for unknown variables in the end.
6556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6557
6558      # Check if the provided tool contains a complete path.
6559      tool_specified="$ECHO"
6560      tool_basename="${tool_specified##*/}"
6561      if test "x$tool_basename" = "x$tool_specified"; then
6562        # A command without a complete path is provided, search $PATH.
6563        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6564$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6565        # Extract the first word of "$tool_basename", so it can be a program name with args.
6566set dummy $tool_basename; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_path_ECHO+:} false; then :
6570  $as_echo_n "(cached) " >&6
6571else
6572  case $ECHO in
6573  [\\/]* | ?:[\\/]*)
6574  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6575  ;;
6576  *)
6577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578for as_dir in $PATH
6579do
6580  IFS=$as_save_IFS
6581  test -z "$as_dir" && as_dir=.
6582    for ac_exec_ext in '' $ac_executable_extensions; do
6583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586    break 2
6587  fi
6588done
6589  done
6590IFS=$as_save_IFS
6591
6592  ;;
6593esac
6594fi
6595ECHO=$ac_cv_path_ECHO
6596if test -n "$ECHO"; then
6597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6598$as_echo "$ECHO" >&6; }
6599else
6600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6601$as_echo "no" >&6; }
6602fi
6603
6604
6605        if test "x$ECHO" = x; then
6606          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6607        fi
6608      else
6609        # Otherwise we believe it is a complete path. Use it as it is.
6610        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6611$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6613$as_echo_n "checking for ECHO... " >&6; }
6614        if test ! -x "$tool_specified"; then
6615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6616$as_echo "not found" >&6; }
6617          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6618        fi
6619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6620$as_echo "$tool_specified" >&6; }
6621      fi
6622    fi
6623  fi
6624
6625
6626
6627  if test "x$ECHO" = x; then
6628    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6629  fi
6630
6631
6632
6633
6634
6635  # Publish this variable in the help.
6636
6637
6638  if test "x$EXPR" = x; then
6639    # The variable is not set by user, try to locate tool using the code snippet
6640    for ac_prog in expr
6641do
6642  # Extract the first word of "$ac_prog", so it can be a program name with args.
6643set dummy $ac_prog; ac_word=$2
6644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6645$as_echo_n "checking for $ac_word... " >&6; }
6646if ${ac_cv_path_EXPR+:} false; then :
6647  $as_echo_n "(cached) " >&6
6648else
6649  case $EXPR in
6650  [\\/]* | ?:[\\/]*)
6651  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6652  ;;
6653  *)
6654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6655for as_dir in $PATH
6656do
6657  IFS=$as_save_IFS
6658  test -z "$as_dir" && as_dir=.
6659    for ac_exec_ext in '' $ac_executable_extensions; do
6660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6661    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6663    break 2
6664  fi
6665done
6666  done
6667IFS=$as_save_IFS
6668
6669  ;;
6670esac
6671fi
6672EXPR=$ac_cv_path_EXPR
6673if test -n "$EXPR"; then
6674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6675$as_echo "$EXPR" >&6; }
6676else
6677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6678$as_echo "no" >&6; }
6679fi
6680
6681
6682  test -n "$EXPR" && break
6683done
6684
6685  else
6686    # The variable is set, but is it from the command line or the environment?
6687
6688    # Try to remove the string !EXPR! from our list.
6689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6691      # If it failed, the variable was not from the command line. Ignore it,
6692      # but warn the user (except for BASH, which is always set by the calling BASH).
6693      if test "xEXPR" != xBASH; then
6694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6695$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6696      fi
6697      # Try to locate tool using the code snippet
6698      for ac_prog in expr
6699do
6700  # Extract the first word of "$ac_prog", so it can be a program name with args.
6701set dummy $ac_prog; ac_word=$2
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6703$as_echo_n "checking for $ac_word... " >&6; }
6704if ${ac_cv_path_EXPR+:} false; then :
6705  $as_echo_n "(cached) " >&6
6706else
6707  case $EXPR in
6708  [\\/]* | ?:[\\/]*)
6709  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6710  ;;
6711  *)
6712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6713for as_dir in $PATH
6714do
6715  IFS=$as_save_IFS
6716  test -z "$as_dir" && as_dir=.
6717    for ac_exec_ext in '' $ac_executable_extensions; do
6718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6719    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6721    break 2
6722  fi
6723done
6724  done
6725IFS=$as_save_IFS
6726
6727  ;;
6728esac
6729fi
6730EXPR=$ac_cv_path_EXPR
6731if test -n "$EXPR"; then
6732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6733$as_echo "$EXPR" >&6; }
6734else
6735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6736$as_echo "no" >&6; }
6737fi
6738
6739
6740  test -n "$EXPR" && break
6741done
6742
6743    else
6744      # If it succeeded, then it was overridden by the user. We will use it
6745      # for the tool.
6746
6747      # First remove it from the list of overridden variables, so we can test
6748      # for unknown variables in the end.
6749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6750
6751      # Check if the provided tool contains a complete path.
6752      tool_specified="$EXPR"
6753      tool_basename="${tool_specified##*/}"
6754      if test "x$tool_basename" = "x$tool_specified"; then
6755        # A command without a complete path is provided, search $PATH.
6756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6757$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6758        # Extract the first word of "$tool_basename", so it can be a program name with args.
6759set dummy $tool_basename; ac_word=$2
6760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6761$as_echo_n "checking for $ac_word... " >&6; }
6762if ${ac_cv_path_EXPR+:} false; then :
6763  $as_echo_n "(cached) " >&6
6764else
6765  case $EXPR in
6766  [\\/]* | ?:[\\/]*)
6767  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6768  ;;
6769  *)
6770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6771for as_dir in $PATH
6772do
6773  IFS=$as_save_IFS
6774  test -z "$as_dir" && as_dir=.
6775    for ac_exec_ext in '' $ac_executable_extensions; do
6776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6777    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6779    break 2
6780  fi
6781done
6782  done
6783IFS=$as_save_IFS
6784
6785  ;;
6786esac
6787fi
6788EXPR=$ac_cv_path_EXPR
6789if test -n "$EXPR"; then
6790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6791$as_echo "$EXPR" >&6; }
6792else
6793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6794$as_echo "no" >&6; }
6795fi
6796
6797
6798        if test "x$EXPR" = x; then
6799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6800        fi
6801      else
6802        # Otherwise we believe it is a complete path. Use it as it is.
6803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6804$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6806$as_echo_n "checking for EXPR... " >&6; }
6807        if test ! -x "$tool_specified"; then
6808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6809$as_echo "not found" >&6; }
6810          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6811        fi
6812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6813$as_echo "$tool_specified" >&6; }
6814      fi
6815    fi
6816  fi
6817
6818
6819
6820  if test "x$EXPR" = x; then
6821    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6822  fi
6823
6824
6825
6826
6827
6828  # Publish this variable in the help.
6829
6830
6831  if test "x$FILE" = x; then
6832    # The variable is not set by user, try to locate tool using the code snippet
6833    for ac_prog in file
6834do
6835  # Extract the first word of "$ac_prog", so it can be a program name with args.
6836set dummy $ac_prog; ac_word=$2
6837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6838$as_echo_n "checking for $ac_word... " >&6; }
6839if ${ac_cv_path_FILE+:} false; then :
6840  $as_echo_n "(cached) " >&6
6841else
6842  case $FILE in
6843  [\\/]* | ?:[\\/]*)
6844  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6845  ;;
6846  *)
6847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6848for as_dir in $PATH
6849do
6850  IFS=$as_save_IFS
6851  test -z "$as_dir" && as_dir=.
6852    for ac_exec_ext in '' $ac_executable_extensions; do
6853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6854    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6856    break 2
6857  fi
6858done
6859  done
6860IFS=$as_save_IFS
6861
6862  ;;
6863esac
6864fi
6865FILE=$ac_cv_path_FILE
6866if test -n "$FILE"; then
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6868$as_echo "$FILE" >&6; }
6869else
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6871$as_echo "no" >&6; }
6872fi
6873
6874
6875  test -n "$FILE" && break
6876done
6877
6878  else
6879    # The variable is set, but is it from the command line or the environment?
6880
6881    # Try to remove the string !FILE! from our list.
6882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6884      # If it failed, the variable was not from the command line. Ignore it,
6885      # but warn the user (except for BASH, which is always set by the calling BASH).
6886      if test "xFILE" != xBASH; then
6887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6888$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6889      fi
6890      # Try to locate tool using the code snippet
6891      for ac_prog in file
6892do
6893  # Extract the first word of "$ac_prog", so it can be a program name with args.
6894set dummy $ac_prog; ac_word=$2
6895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6896$as_echo_n "checking for $ac_word... " >&6; }
6897if ${ac_cv_path_FILE+:} false; then :
6898  $as_echo_n "(cached) " >&6
6899else
6900  case $FILE in
6901  [\\/]* | ?:[\\/]*)
6902  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6903  ;;
6904  *)
6905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6906for as_dir in $PATH
6907do
6908  IFS=$as_save_IFS
6909  test -z "$as_dir" && as_dir=.
6910    for ac_exec_ext in '' $ac_executable_extensions; do
6911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6912    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6914    break 2
6915  fi
6916done
6917  done
6918IFS=$as_save_IFS
6919
6920  ;;
6921esac
6922fi
6923FILE=$ac_cv_path_FILE
6924if test -n "$FILE"; then
6925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6926$as_echo "$FILE" >&6; }
6927else
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6929$as_echo "no" >&6; }
6930fi
6931
6932
6933  test -n "$FILE" && break
6934done
6935
6936    else
6937      # If it succeeded, then it was overridden by the user. We will use it
6938      # for the tool.
6939
6940      # First remove it from the list of overridden variables, so we can test
6941      # for unknown variables in the end.
6942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6943
6944      # Check if the provided tool contains a complete path.
6945      tool_specified="$FILE"
6946      tool_basename="${tool_specified##*/}"
6947      if test "x$tool_basename" = "x$tool_specified"; then
6948        # A command without a complete path is provided, search $PATH.
6949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6950$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6951        # Extract the first word of "$tool_basename", so it can be a program name with args.
6952set dummy $tool_basename; ac_word=$2
6953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6954$as_echo_n "checking for $ac_word... " >&6; }
6955if ${ac_cv_path_FILE+:} false; then :
6956  $as_echo_n "(cached) " >&6
6957else
6958  case $FILE in
6959  [\\/]* | ?:[\\/]*)
6960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6961  ;;
6962  *)
6963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6964for as_dir in $PATH
6965do
6966  IFS=$as_save_IFS
6967  test -z "$as_dir" && as_dir=.
6968    for ac_exec_ext in '' $ac_executable_extensions; do
6969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6972    break 2
6973  fi
6974done
6975  done
6976IFS=$as_save_IFS
6977
6978  ;;
6979esac
6980fi
6981FILE=$ac_cv_path_FILE
6982if test -n "$FILE"; then
6983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6984$as_echo "$FILE" >&6; }
6985else
6986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6987$as_echo "no" >&6; }
6988fi
6989
6990
6991        if test "x$FILE" = x; then
6992          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6993        fi
6994      else
6995        # Otherwise we believe it is a complete path. Use it as it is.
6996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
6997$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
6998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
6999$as_echo_n "checking for FILE... " >&6; }
7000        if test ! -x "$tool_specified"; then
7001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7002$as_echo "not found" >&6; }
7003          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7004        fi
7005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7006$as_echo "$tool_specified" >&6; }
7007      fi
7008    fi
7009  fi
7010
7011
7012
7013  if test "x$FILE" = x; then
7014    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7015  fi
7016
7017
7018
7019
7020
7021  # Publish this variable in the help.
7022
7023
7024  if test "x$FIND" = x; then
7025    # The variable is not set by user, try to locate tool using the code snippet
7026    for ac_prog in find
7027do
7028  # Extract the first word of "$ac_prog", so it can be a program name with args.
7029set dummy $ac_prog; ac_word=$2
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7031$as_echo_n "checking for $ac_word... " >&6; }
7032if ${ac_cv_path_FIND+:} false; then :
7033  $as_echo_n "(cached) " >&6
7034else
7035  case $FIND in
7036  [\\/]* | ?:[\\/]*)
7037  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7038  ;;
7039  *)
7040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7041for as_dir in $PATH
7042do
7043  IFS=$as_save_IFS
7044  test -z "$as_dir" && as_dir=.
7045    for ac_exec_ext in '' $ac_executable_extensions; do
7046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7047    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7049    break 2
7050  fi
7051done
7052  done
7053IFS=$as_save_IFS
7054
7055  ;;
7056esac
7057fi
7058FIND=$ac_cv_path_FIND
7059if test -n "$FIND"; then
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7061$as_echo "$FIND" >&6; }
7062else
7063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7064$as_echo "no" >&6; }
7065fi
7066
7067
7068  test -n "$FIND" && break
7069done
7070
7071  else
7072    # The variable is set, but is it from the command line or the environment?
7073
7074    # Try to remove the string !FIND! from our list.
7075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7077      # If it failed, the variable was not from the command line. Ignore it,
7078      # but warn the user (except for BASH, which is always set by the calling BASH).
7079      if test "xFIND" != xBASH; then
7080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7081$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7082      fi
7083      # Try to locate tool using the code snippet
7084      for ac_prog in find
7085do
7086  # Extract the first word of "$ac_prog", so it can be a program name with args.
7087set dummy $ac_prog; ac_word=$2
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7089$as_echo_n "checking for $ac_word... " >&6; }
7090if ${ac_cv_path_FIND+:} false; then :
7091  $as_echo_n "(cached) " >&6
7092else
7093  case $FIND in
7094  [\\/]* | ?:[\\/]*)
7095  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7096  ;;
7097  *)
7098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7099for as_dir in $PATH
7100do
7101  IFS=$as_save_IFS
7102  test -z "$as_dir" && as_dir=.
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7105    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7107    break 2
7108  fi
7109done
7110  done
7111IFS=$as_save_IFS
7112
7113  ;;
7114esac
7115fi
7116FIND=$ac_cv_path_FIND
7117if test -n "$FIND"; then
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7119$as_echo "$FIND" >&6; }
7120else
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7122$as_echo "no" >&6; }
7123fi
7124
7125
7126  test -n "$FIND" && break
7127done
7128
7129    else
7130      # If it succeeded, then it was overridden by the user. We will use it
7131      # for the tool.
7132
7133      # First remove it from the list of overridden variables, so we can test
7134      # for unknown variables in the end.
7135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7136
7137      # Check if the provided tool contains a complete path.
7138      tool_specified="$FIND"
7139      tool_basename="${tool_specified##*/}"
7140      if test "x$tool_basename" = "x$tool_specified"; then
7141        # A command without a complete path is provided, search $PATH.
7142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7143$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7144        # Extract the first word of "$tool_basename", so it can be a program name with args.
7145set dummy $tool_basename; ac_word=$2
7146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7147$as_echo_n "checking for $ac_word... " >&6; }
7148if ${ac_cv_path_FIND+:} false; then :
7149  $as_echo_n "(cached) " >&6
7150else
7151  case $FIND in
7152  [\\/]* | ?:[\\/]*)
7153  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7154  ;;
7155  *)
7156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7157for as_dir in $PATH
7158do
7159  IFS=$as_save_IFS
7160  test -z "$as_dir" && as_dir=.
7161    for ac_exec_ext in '' $ac_executable_extensions; do
7162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7163    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7165    break 2
7166  fi
7167done
7168  done
7169IFS=$as_save_IFS
7170
7171  ;;
7172esac
7173fi
7174FIND=$ac_cv_path_FIND
7175if test -n "$FIND"; then
7176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7177$as_echo "$FIND" >&6; }
7178else
7179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7180$as_echo "no" >&6; }
7181fi
7182
7183
7184        if test "x$FIND" = x; then
7185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7186        fi
7187      else
7188        # Otherwise we believe it is a complete path. Use it as it is.
7189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7190$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7192$as_echo_n "checking for FIND... " >&6; }
7193        if test ! -x "$tool_specified"; then
7194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7195$as_echo "not found" >&6; }
7196          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7197        fi
7198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7199$as_echo "$tool_specified" >&6; }
7200      fi
7201    fi
7202  fi
7203
7204
7205
7206  if test "x$FIND" = x; then
7207    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7208  fi
7209
7210
7211
7212
7213
7214  # Publish this variable in the help.
7215
7216
7217  if test "x$HEAD" = x; then
7218    # The variable is not set by user, try to locate tool using the code snippet
7219    for ac_prog in head
7220do
7221  # Extract the first word of "$ac_prog", so it can be a program name with args.
7222set dummy $ac_prog; ac_word=$2
7223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7224$as_echo_n "checking for $ac_word... " >&6; }
7225if ${ac_cv_path_HEAD+:} false; then :
7226  $as_echo_n "(cached) " >&6
7227else
7228  case $HEAD in
7229  [\\/]* | ?:[\\/]*)
7230  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7231  ;;
7232  *)
7233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7234for as_dir in $PATH
7235do
7236  IFS=$as_save_IFS
7237  test -z "$as_dir" && as_dir=.
7238    for ac_exec_ext in '' $ac_executable_extensions; do
7239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7240    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7242    break 2
7243  fi
7244done
7245  done
7246IFS=$as_save_IFS
7247
7248  ;;
7249esac
7250fi
7251HEAD=$ac_cv_path_HEAD
7252if test -n "$HEAD"; then
7253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7254$as_echo "$HEAD" >&6; }
7255else
7256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257$as_echo "no" >&6; }
7258fi
7259
7260
7261  test -n "$HEAD" && break
7262done
7263
7264  else
7265    # The variable is set, but is it from the command line or the environment?
7266
7267    # Try to remove the string !HEAD! from our list.
7268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7270      # If it failed, the variable was not from the command line. Ignore it,
7271      # but warn the user (except for BASH, which is always set by the calling BASH).
7272      if test "xHEAD" != xBASH; then
7273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7274$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7275      fi
7276      # Try to locate tool using the code snippet
7277      for ac_prog in head
7278do
7279  # Extract the first word of "$ac_prog", so it can be a program name with args.
7280set dummy $ac_prog; ac_word=$2
7281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7282$as_echo_n "checking for $ac_word... " >&6; }
7283if ${ac_cv_path_HEAD+:} false; then :
7284  $as_echo_n "(cached) " >&6
7285else
7286  case $HEAD in
7287  [\\/]* | ?:[\\/]*)
7288  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7289  ;;
7290  *)
7291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7292for as_dir in $PATH
7293do
7294  IFS=$as_save_IFS
7295  test -z "$as_dir" && as_dir=.
7296    for ac_exec_ext in '' $ac_executable_extensions; do
7297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7298    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7300    break 2
7301  fi
7302done
7303  done
7304IFS=$as_save_IFS
7305
7306  ;;
7307esac
7308fi
7309HEAD=$ac_cv_path_HEAD
7310if test -n "$HEAD"; then
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7312$as_echo "$HEAD" >&6; }
7313else
7314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7315$as_echo "no" >&6; }
7316fi
7317
7318
7319  test -n "$HEAD" && break
7320done
7321
7322    else
7323      # If it succeeded, then it was overridden by the user. We will use it
7324      # for the tool.
7325
7326      # First remove it from the list of overridden variables, so we can test
7327      # for unknown variables in the end.
7328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7329
7330      # Check if the provided tool contains a complete path.
7331      tool_specified="$HEAD"
7332      tool_basename="${tool_specified##*/}"
7333      if test "x$tool_basename" = "x$tool_specified"; then
7334        # A command without a complete path is provided, search $PATH.
7335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7336$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7337        # Extract the first word of "$tool_basename", so it can be a program name with args.
7338set dummy $tool_basename; ac_word=$2
7339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7340$as_echo_n "checking for $ac_word... " >&6; }
7341if ${ac_cv_path_HEAD+:} false; then :
7342  $as_echo_n "(cached) " >&6
7343else
7344  case $HEAD in
7345  [\\/]* | ?:[\\/]*)
7346  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7347  ;;
7348  *)
7349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7350for as_dir in $PATH
7351do
7352  IFS=$as_save_IFS
7353  test -z "$as_dir" && as_dir=.
7354    for ac_exec_ext in '' $ac_executable_extensions; do
7355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7356    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7358    break 2
7359  fi
7360done
7361  done
7362IFS=$as_save_IFS
7363
7364  ;;
7365esac
7366fi
7367HEAD=$ac_cv_path_HEAD
7368if test -n "$HEAD"; then
7369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7370$as_echo "$HEAD" >&6; }
7371else
7372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7373$as_echo "no" >&6; }
7374fi
7375
7376
7377        if test "x$HEAD" = x; then
7378          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7379        fi
7380      else
7381        # Otherwise we believe it is a complete path. Use it as it is.
7382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7383$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7385$as_echo_n "checking for HEAD... " >&6; }
7386        if test ! -x "$tool_specified"; then
7387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7388$as_echo "not found" >&6; }
7389          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7390        fi
7391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7392$as_echo "$tool_specified" >&6; }
7393      fi
7394    fi
7395  fi
7396
7397
7398
7399  if test "x$HEAD" = x; then
7400    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7401  fi
7402
7403
7404
7405
7406
7407  # Publish this variable in the help.
7408
7409
7410  if test "x$LN" = x; then
7411    # The variable is not set by user, try to locate tool using the code snippet
7412    for ac_prog in ln
7413do
7414  # Extract the first word of "$ac_prog", so it can be a program name with args.
7415set dummy $ac_prog; ac_word=$2
7416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7417$as_echo_n "checking for $ac_word... " >&6; }
7418if ${ac_cv_path_LN+:} false; then :
7419  $as_echo_n "(cached) " >&6
7420else
7421  case $LN in
7422  [\\/]* | ?:[\\/]*)
7423  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7424  ;;
7425  *)
7426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7427for as_dir in $PATH
7428do
7429  IFS=$as_save_IFS
7430  test -z "$as_dir" && as_dir=.
7431    for ac_exec_ext in '' $ac_executable_extensions; do
7432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7433    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7435    break 2
7436  fi
7437done
7438  done
7439IFS=$as_save_IFS
7440
7441  ;;
7442esac
7443fi
7444LN=$ac_cv_path_LN
7445if test -n "$LN"; then
7446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7447$as_echo "$LN" >&6; }
7448else
7449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7450$as_echo "no" >&6; }
7451fi
7452
7453
7454  test -n "$LN" && break
7455done
7456
7457  else
7458    # The variable is set, but is it from the command line or the environment?
7459
7460    # Try to remove the string !LN! from our list.
7461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7463      # If it failed, the variable was not from the command line. Ignore it,
7464      # but warn the user (except for BASH, which is always set by the calling BASH).
7465      if test "xLN" != xBASH; then
7466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7467$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7468      fi
7469      # Try to locate tool using the code snippet
7470      for ac_prog in ln
7471do
7472  # Extract the first word of "$ac_prog", so it can be a program name with args.
7473set dummy $ac_prog; ac_word=$2
7474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7475$as_echo_n "checking for $ac_word... " >&6; }
7476if ${ac_cv_path_LN+:} false; then :
7477  $as_echo_n "(cached) " >&6
7478else
7479  case $LN in
7480  [\\/]* | ?:[\\/]*)
7481  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7482  ;;
7483  *)
7484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7485for as_dir in $PATH
7486do
7487  IFS=$as_save_IFS
7488  test -z "$as_dir" && as_dir=.
7489    for ac_exec_ext in '' $ac_executable_extensions; do
7490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7491    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7493    break 2
7494  fi
7495done
7496  done
7497IFS=$as_save_IFS
7498
7499  ;;
7500esac
7501fi
7502LN=$ac_cv_path_LN
7503if test -n "$LN"; then
7504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7505$as_echo "$LN" >&6; }
7506else
7507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7508$as_echo "no" >&6; }
7509fi
7510
7511
7512  test -n "$LN" && break
7513done
7514
7515    else
7516      # If it succeeded, then it was overridden by the user. We will use it
7517      # for the tool.
7518
7519      # First remove it from the list of overridden variables, so we can test
7520      # for unknown variables in the end.
7521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7522
7523      # Check if the provided tool contains a complete path.
7524      tool_specified="$LN"
7525      tool_basename="${tool_specified##*/}"
7526      if test "x$tool_basename" = "x$tool_specified"; then
7527        # A command without a complete path is provided, search $PATH.
7528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7529$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7530        # Extract the first word of "$tool_basename", so it can be a program name with args.
7531set dummy $tool_basename; ac_word=$2
7532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7533$as_echo_n "checking for $ac_word... " >&6; }
7534if ${ac_cv_path_LN+:} false; then :
7535  $as_echo_n "(cached) " >&6
7536else
7537  case $LN in
7538  [\\/]* | ?:[\\/]*)
7539  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7540  ;;
7541  *)
7542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7543for as_dir in $PATH
7544do
7545  IFS=$as_save_IFS
7546  test -z "$as_dir" && as_dir=.
7547    for ac_exec_ext in '' $ac_executable_extensions; do
7548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7549    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7551    break 2
7552  fi
7553done
7554  done
7555IFS=$as_save_IFS
7556
7557  ;;
7558esac
7559fi
7560LN=$ac_cv_path_LN
7561if test -n "$LN"; then
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7563$as_echo "$LN" >&6; }
7564else
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566$as_echo "no" >&6; }
7567fi
7568
7569
7570        if test "x$LN" = x; then
7571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7572        fi
7573      else
7574        # Otherwise we believe it is a complete path. Use it as it is.
7575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7576$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7578$as_echo_n "checking for LN... " >&6; }
7579        if test ! -x "$tool_specified"; then
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7581$as_echo "not found" >&6; }
7582          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7583        fi
7584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7585$as_echo "$tool_specified" >&6; }
7586      fi
7587    fi
7588  fi
7589
7590
7591
7592  if test "x$LN" = x; then
7593    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7594  fi
7595
7596
7597
7598
7599
7600  # Publish this variable in the help.
7601
7602
7603  if test "x$LS" = x; then
7604    # The variable is not set by user, try to locate tool using the code snippet
7605    for ac_prog in ls
7606do
7607  # Extract the first word of "$ac_prog", so it can be a program name with args.
7608set dummy $ac_prog; ac_word=$2
7609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610$as_echo_n "checking for $ac_word... " >&6; }
7611if ${ac_cv_path_LS+:} false; then :
7612  $as_echo_n "(cached) " >&6
7613else
7614  case $LS in
7615  [\\/]* | ?:[\\/]*)
7616  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7617  ;;
7618  *)
7619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7620for as_dir in $PATH
7621do
7622  IFS=$as_save_IFS
7623  test -z "$as_dir" && as_dir=.
7624    for ac_exec_ext in '' $ac_executable_extensions; do
7625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7626    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7628    break 2
7629  fi
7630done
7631  done
7632IFS=$as_save_IFS
7633
7634  ;;
7635esac
7636fi
7637LS=$ac_cv_path_LS
7638if test -n "$LS"; then
7639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7640$as_echo "$LS" >&6; }
7641else
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7643$as_echo "no" >&6; }
7644fi
7645
7646
7647  test -n "$LS" && break
7648done
7649
7650  else
7651    # The variable is set, but is it from the command line or the environment?
7652
7653    # Try to remove the string !LS! from our list.
7654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7656      # If it failed, the variable was not from the command line. Ignore it,
7657      # but warn the user (except for BASH, which is always set by the calling BASH).
7658      if test "xLS" != xBASH; then
7659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7660$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7661      fi
7662      # Try to locate tool using the code snippet
7663      for ac_prog in ls
7664do
7665  # Extract the first word of "$ac_prog", so it can be a program name with args.
7666set dummy $ac_prog; ac_word=$2
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7668$as_echo_n "checking for $ac_word... " >&6; }
7669if ${ac_cv_path_LS+:} false; then :
7670  $as_echo_n "(cached) " >&6
7671else
7672  case $LS in
7673  [\\/]* | ?:[\\/]*)
7674  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7675  ;;
7676  *)
7677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7678for as_dir in $PATH
7679do
7680  IFS=$as_save_IFS
7681  test -z "$as_dir" && as_dir=.
7682    for ac_exec_ext in '' $ac_executable_extensions; do
7683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7684    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7686    break 2
7687  fi
7688done
7689  done
7690IFS=$as_save_IFS
7691
7692  ;;
7693esac
7694fi
7695LS=$ac_cv_path_LS
7696if test -n "$LS"; then
7697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7698$as_echo "$LS" >&6; }
7699else
7700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7701$as_echo "no" >&6; }
7702fi
7703
7704
7705  test -n "$LS" && break
7706done
7707
7708    else
7709      # If it succeeded, then it was overridden by the user. We will use it
7710      # for the tool.
7711
7712      # First remove it from the list of overridden variables, so we can test
7713      # for unknown variables in the end.
7714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7715
7716      # Check if the provided tool contains a complete path.
7717      tool_specified="$LS"
7718      tool_basename="${tool_specified##*/}"
7719      if test "x$tool_basename" = "x$tool_specified"; then
7720        # A command without a complete path is provided, search $PATH.
7721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7722$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7723        # Extract the first word of "$tool_basename", so it can be a program name with args.
7724set dummy $tool_basename; ac_word=$2
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7726$as_echo_n "checking for $ac_word... " >&6; }
7727if ${ac_cv_path_LS+:} false; then :
7728  $as_echo_n "(cached) " >&6
7729else
7730  case $LS in
7731  [\\/]* | ?:[\\/]*)
7732  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7733  ;;
7734  *)
7735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7736for as_dir in $PATH
7737do
7738  IFS=$as_save_IFS
7739  test -z "$as_dir" && as_dir=.
7740    for ac_exec_ext in '' $ac_executable_extensions; do
7741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7742    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7744    break 2
7745  fi
7746done
7747  done
7748IFS=$as_save_IFS
7749
7750  ;;
7751esac
7752fi
7753LS=$ac_cv_path_LS
7754if test -n "$LS"; then
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7756$as_echo "$LS" >&6; }
7757else
7758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7759$as_echo "no" >&6; }
7760fi
7761
7762
7763        if test "x$LS" = x; then
7764          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7765        fi
7766      else
7767        # Otherwise we believe it is a complete path. Use it as it is.
7768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7769$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7771$as_echo_n "checking for LS... " >&6; }
7772        if test ! -x "$tool_specified"; then
7773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7774$as_echo "not found" >&6; }
7775          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7776        fi
7777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7778$as_echo "$tool_specified" >&6; }
7779      fi
7780    fi
7781  fi
7782
7783
7784
7785  if test "x$LS" = x; then
7786    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7787  fi
7788
7789
7790
7791
7792
7793  # Publish this variable in the help.
7794
7795
7796  if test "x$MKDIR" = x; then
7797    # The variable is not set by user, try to locate tool using the code snippet
7798    for ac_prog in mkdir
7799do
7800  # Extract the first word of "$ac_prog", so it can be a program name with args.
7801set dummy $ac_prog; ac_word=$2
7802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7803$as_echo_n "checking for $ac_word... " >&6; }
7804if ${ac_cv_path_MKDIR+:} false; then :
7805  $as_echo_n "(cached) " >&6
7806else
7807  case $MKDIR in
7808  [\\/]* | ?:[\\/]*)
7809  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7810  ;;
7811  *)
7812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7813for as_dir in $PATH
7814do
7815  IFS=$as_save_IFS
7816  test -z "$as_dir" && as_dir=.
7817    for ac_exec_ext in '' $ac_executable_extensions; do
7818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7819    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7821    break 2
7822  fi
7823done
7824  done
7825IFS=$as_save_IFS
7826
7827  ;;
7828esac
7829fi
7830MKDIR=$ac_cv_path_MKDIR
7831if test -n "$MKDIR"; then
7832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7833$as_echo "$MKDIR" >&6; }
7834else
7835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7836$as_echo "no" >&6; }
7837fi
7838
7839
7840  test -n "$MKDIR" && break
7841done
7842
7843  else
7844    # The variable is set, but is it from the command line or the environment?
7845
7846    # Try to remove the string !MKDIR! from our list.
7847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7849      # If it failed, the variable was not from the command line. Ignore it,
7850      # but warn the user (except for BASH, which is always set by the calling BASH).
7851      if test "xMKDIR" != xBASH; then
7852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7853$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7854      fi
7855      # Try to locate tool using the code snippet
7856      for ac_prog in mkdir
7857do
7858  # Extract the first word of "$ac_prog", so it can be a program name with args.
7859set dummy $ac_prog; ac_word=$2
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7861$as_echo_n "checking for $ac_word... " >&6; }
7862if ${ac_cv_path_MKDIR+:} false; then :
7863  $as_echo_n "(cached) " >&6
7864else
7865  case $MKDIR in
7866  [\\/]* | ?:[\\/]*)
7867  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7868  ;;
7869  *)
7870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7871for as_dir in $PATH
7872do
7873  IFS=$as_save_IFS
7874  test -z "$as_dir" && as_dir=.
7875    for ac_exec_ext in '' $ac_executable_extensions; do
7876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7877    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7879    break 2
7880  fi
7881done
7882  done
7883IFS=$as_save_IFS
7884
7885  ;;
7886esac
7887fi
7888MKDIR=$ac_cv_path_MKDIR
7889if test -n "$MKDIR"; then
7890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7891$as_echo "$MKDIR" >&6; }
7892else
7893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7894$as_echo "no" >&6; }
7895fi
7896
7897
7898  test -n "$MKDIR" && break
7899done
7900
7901    else
7902      # If it succeeded, then it was overridden by the user. We will use it
7903      # for the tool.
7904
7905      # First remove it from the list of overridden variables, so we can test
7906      # for unknown variables in the end.
7907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7908
7909      # Check if the provided tool contains a complete path.
7910      tool_specified="$MKDIR"
7911      tool_basename="${tool_specified##*/}"
7912      if test "x$tool_basename" = "x$tool_specified"; then
7913        # A command without a complete path is provided, search $PATH.
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7915$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7916        # Extract the first word of "$tool_basename", so it can be a program name with args.
7917set dummy $tool_basename; ac_word=$2
7918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7919$as_echo_n "checking for $ac_word... " >&6; }
7920if ${ac_cv_path_MKDIR+:} false; then :
7921  $as_echo_n "(cached) " >&6
7922else
7923  case $MKDIR in
7924  [\\/]* | ?:[\\/]*)
7925  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7926  ;;
7927  *)
7928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7929for as_dir in $PATH
7930do
7931  IFS=$as_save_IFS
7932  test -z "$as_dir" && as_dir=.
7933    for ac_exec_ext in '' $ac_executable_extensions; do
7934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7935    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7937    break 2
7938  fi
7939done
7940  done
7941IFS=$as_save_IFS
7942
7943  ;;
7944esac
7945fi
7946MKDIR=$ac_cv_path_MKDIR
7947if test -n "$MKDIR"; then
7948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7949$as_echo "$MKDIR" >&6; }
7950else
7951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7952$as_echo "no" >&6; }
7953fi
7954
7955
7956        if test "x$MKDIR" = x; then
7957          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7958        fi
7959      else
7960        # Otherwise we believe it is a complete path. Use it as it is.
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
7962$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
7963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
7964$as_echo_n "checking for MKDIR... " >&6; }
7965        if test ! -x "$tool_specified"; then
7966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7967$as_echo "not found" >&6; }
7968          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
7969        fi
7970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7971$as_echo "$tool_specified" >&6; }
7972      fi
7973    fi
7974  fi
7975
7976
7977
7978  if test "x$MKDIR" = x; then
7979    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
7980  fi
7981
7982
7983
7984
7985
7986  # Publish this variable in the help.
7987
7988
7989  if test "x$MKTEMP" = x; then
7990    # The variable is not set by user, try to locate tool using the code snippet
7991    for ac_prog in mktemp
7992do
7993  # Extract the first word of "$ac_prog", so it can be a program name with args.
7994set dummy $ac_prog; ac_word=$2
7995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7996$as_echo_n "checking for $ac_word... " >&6; }
7997if ${ac_cv_path_MKTEMP+:} false; then :
7998  $as_echo_n "(cached) " >&6
7999else
8000  case $MKTEMP in
8001  [\\/]* | ?:[\\/]*)
8002  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8003  ;;
8004  *)
8005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8006for as_dir in $PATH
8007do
8008  IFS=$as_save_IFS
8009  test -z "$as_dir" && as_dir=.
8010    for ac_exec_ext in '' $ac_executable_extensions; do
8011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8012    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8014    break 2
8015  fi
8016done
8017  done
8018IFS=$as_save_IFS
8019
8020  ;;
8021esac
8022fi
8023MKTEMP=$ac_cv_path_MKTEMP
8024if test -n "$MKTEMP"; then
8025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8026$as_echo "$MKTEMP" >&6; }
8027else
8028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029$as_echo "no" >&6; }
8030fi
8031
8032
8033  test -n "$MKTEMP" && break
8034done
8035
8036  else
8037    # The variable is set, but is it from the command line or the environment?
8038
8039    # Try to remove the string !MKTEMP! from our list.
8040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8042      # If it failed, the variable was not from the command line. Ignore it,
8043      # but warn the user (except for BASH, which is always set by the calling BASH).
8044      if test "xMKTEMP" != xBASH; then
8045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8046$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8047      fi
8048      # Try to locate tool using the code snippet
8049      for ac_prog in mktemp
8050do
8051  # Extract the first word of "$ac_prog", so it can be a program name with args.
8052set dummy $ac_prog; ac_word=$2
8053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8054$as_echo_n "checking for $ac_word... " >&6; }
8055if ${ac_cv_path_MKTEMP+:} false; then :
8056  $as_echo_n "(cached) " >&6
8057else
8058  case $MKTEMP in
8059  [\\/]* | ?:[\\/]*)
8060  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8061  ;;
8062  *)
8063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8064for as_dir in $PATH
8065do
8066  IFS=$as_save_IFS
8067  test -z "$as_dir" && as_dir=.
8068    for ac_exec_ext in '' $ac_executable_extensions; do
8069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8070    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8072    break 2
8073  fi
8074done
8075  done
8076IFS=$as_save_IFS
8077
8078  ;;
8079esac
8080fi
8081MKTEMP=$ac_cv_path_MKTEMP
8082if test -n "$MKTEMP"; then
8083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8084$as_echo "$MKTEMP" >&6; }
8085else
8086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087$as_echo "no" >&6; }
8088fi
8089
8090
8091  test -n "$MKTEMP" && break
8092done
8093
8094    else
8095      # If it succeeded, then it was overridden by the user. We will use it
8096      # for the tool.
8097
8098      # First remove it from the list of overridden variables, so we can test
8099      # for unknown variables in the end.
8100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8101
8102      # Check if the provided tool contains a complete path.
8103      tool_specified="$MKTEMP"
8104      tool_basename="${tool_specified##*/}"
8105      if test "x$tool_basename" = "x$tool_specified"; then
8106        # A command without a complete path is provided, search $PATH.
8107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8108$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8109        # Extract the first word of "$tool_basename", so it can be a program name with args.
8110set dummy $tool_basename; ac_word=$2
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8112$as_echo_n "checking for $ac_word... " >&6; }
8113if ${ac_cv_path_MKTEMP+:} false; then :
8114  $as_echo_n "(cached) " >&6
8115else
8116  case $MKTEMP in
8117  [\\/]* | ?:[\\/]*)
8118  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8119  ;;
8120  *)
8121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8122for as_dir in $PATH
8123do
8124  IFS=$as_save_IFS
8125  test -z "$as_dir" && as_dir=.
8126    for ac_exec_ext in '' $ac_executable_extensions; do
8127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8128    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8130    break 2
8131  fi
8132done
8133  done
8134IFS=$as_save_IFS
8135
8136  ;;
8137esac
8138fi
8139MKTEMP=$ac_cv_path_MKTEMP
8140if test -n "$MKTEMP"; then
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8142$as_echo "$MKTEMP" >&6; }
8143else
8144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8145$as_echo "no" >&6; }
8146fi
8147
8148
8149        if test "x$MKTEMP" = x; then
8150          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8151        fi
8152      else
8153        # Otherwise we believe it is a complete path. Use it as it is.
8154        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8155$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8157$as_echo_n "checking for MKTEMP... " >&6; }
8158        if test ! -x "$tool_specified"; then
8159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8160$as_echo "not found" >&6; }
8161          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8162        fi
8163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8164$as_echo "$tool_specified" >&6; }
8165      fi
8166    fi
8167  fi
8168
8169
8170
8171  if test "x$MKTEMP" = x; then
8172    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8173  fi
8174
8175
8176
8177
8178
8179  # Publish this variable in the help.
8180
8181
8182  if test "x$MV" = x; then
8183    # The variable is not set by user, try to locate tool using the code snippet
8184    for ac_prog in mv
8185do
8186  # Extract the first word of "$ac_prog", so it can be a program name with args.
8187set dummy $ac_prog; ac_word=$2
8188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8189$as_echo_n "checking for $ac_word... " >&6; }
8190if ${ac_cv_path_MV+:} false; then :
8191  $as_echo_n "(cached) " >&6
8192else
8193  case $MV in
8194  [\\/]* | ?:[\\/]*)
8195  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8196  ;;
8197  *)
8198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8199for as_dir in $PATH
8200do
8201  IFS=$as_save_IFS
8202  test -z "$as_dir" && as_dir=.
8203    for ac_exec_ext in '' $ac_executable_extensions; do
8204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8205    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8207    break 2
8208  fi
8209done
8210  done
8211IFS=$as_save_IFS
8212
8213  ;;
8214esac
8215fi
8216MV=$ac_cv_path_MV
8217if test -n "$MV"; then
8218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8219$as_echo "$MV" >&6; }
8220else
8221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
8223fi
8224
8225
8226  test -n "$MV" && break
8227done
8228
8229  else
8230    # The variable is set, but is it from the command line or the environment?
8231
8232    # Try to remove the string !MV! from our list.
8233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8235      # If it failed, the variable was not from the command line. Ignore it,
8236      # but warn the user (except for BASH, which is always set by the calling BASH).
8237      if test "xMV" != xBASH; then
8238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8239$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8240      fi
8241      # Try to locate tool using the code snippet
8242      for ac_prog in mv
8243do
8244  # Extract the first word of "$ac_prog", so it can be a program name with args.
8245set dummy $ac_prog; ac_word=$2
8246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8247$as_echo_n "checking for $ac_word... " >&6; }
8248if ${ac_cv_path_MV+:} false; then :
8249  $as_echo_n "(cached) " >&6
8250else
8251  case $MV in
8252  [\\/]* | ?:[\\/]*)
8253  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8254  ;;
8255  *)
8256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8257for as_dir in $PATH
8258do
8259  IFS=$as_save_IFS
8260  test -z "$as_dir" && as_dir=.
8261    for ac_exec_ext in '' $ac_executable_extensions; do
8262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8263    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8265    break 2
8266  fi
8267done
8268  done
8269IFS=$as_save_IFS
8270
8271  ;;
8272esac
8273fi
8274MV=$ac_cv_path_MV
8275if test -n "$MV"; then
8276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8277$as_echo "$MV" >&6; }
8278else
8279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8280$as_echo "no" >&6; }
8281fi
8282
8283
8284  test -n "$MV" && break
8285done
8286
8287    else
8288      # If it succeeded, then it was overridden by the user. We will use it
8289      # for the tool.
8290
8291      # First remove it from the list of overridden variables, so we can test
8292      # for unknown variables in the end.
8293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8294
8295      # Check if the provided tool contains a complete path.
8296      tool_specified="$MV"
8297      tool_basename="${tool_specified##*/}"
8298      if test "x$tool_basename" = "x$tool_specified"; then
8299        # A command without a complete path is provided, search $PATH.
8300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8301$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8302        # Extract the first word of "$tool_basename", so it can be a program name with args.
8303set dummy $tool_basename; ac_word=$2
8304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8305$as_echo_n "checking for $ac_word... " >&6; }
8306if ${ac_cv_path_MV+:} false; then :
8307  $as_echo_n "(cached) " >&6
8308else
8309  case $MV in
8310  [\\/]* | ?:[\\/]*)
8311  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8312  ;;
8313  *)
8314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8315for as_dir in $PATH
8316do
8317  IFS=$as_save_IFS
8318  test -z "$as_dir" && as_dir=.
8319    for ac_exec_ext in '' $ac_executable_extensions; do
8320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8321    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8323    break 2
8324  fi
8325done
8326  done
8327IFS=$as_save_IFS
8328
8329  ;;
8330esac
8331fi
8332MV=$ac_cv_path_MV
8333if test -n "$MV"; then
8334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8335$as_echo "$MV" >&6; }
8336else
8337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8338$as_echo "no" >&6; }
8339fi
8340
8341
8342        if test "x$MV" = x; then
8343          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8344        fi
8345      else
8346        # Otherwise we believe it is a complete path. Use it as it is.
8347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8348$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8350$as_echo_n "checking for MV... " >&6; }
8351        if test ! -x "$tool_specified"; then
8352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8353$as_echo "not found" >&6; }
8354          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8355        fi
8356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8357$as_echo "$tool_specified" >&6; }
8358      fi
8359    fi
8360  fi
8361
8362
8363
8364  if test "x$MV" = x; then
8365    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8366  fi
8367
8368
8369
8370
8371
8372  # Publish this variable in the help.
8373
8374
8375  if test "x$NAWK" = x; then
8376    # The variable is not set by user, try to locate tool using the code snippet
8377    for ac_prog in nawk gawk awk
8378do
8379  # Extract the first word of "$ac_prog", so it can be a program name with args.
8380set dummy $ac_prog; ac_word=$2
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8382$as_echo_n "checking for $ac_word... " >&6; }
8383if ${ac_cv_path_NAWK+:} false; then :
8384  $as_echo_n "(cached) " >&6
8385else
8386  case $NAWK in
8387  [\\/]* | ?:[\\/]*)
8388  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8389  ;;
8390  *)
8391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392for as_dir in $PATH
8393do
8394  IFS=$as_save_IFS
8395  test -z "$as_dir" && as_dir=.
8396    for ac_exec_ext in '' $ac_executable_extensions; do
8397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400    break 2
8401  fi
8402done
8403  done
8404IFS=$as_save_IFS
8405
8406  ;;
8407esac
8408fi
8409NAWK=$ac_cv_path_NAWK
8410if test -n "$NAWK"; then
8411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8412$as_echo "$NAWK" >&6; }
8413else
8414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415$as_echo "no" >&6; }
8416fi
8417
8418
8419  test -n "$NAWK" && break
8420done
8421
8422  else
8423    # The variable is set, but is it from the command line or the environment?
8424
8425    # Try to remove the string !NAWK! from our list.
8426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8428      # If it failed, the variable was not from the command line. Ignore it,
8429      # but warn the user (except for BASH, which is always set by the calling BASH).
8430      if test "xNAWK" != xBASH; then
8431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8432$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8433      fi
8434      # Try to locate tool using the code snippet
8435      for ac_prog in nawk gawk awk
8436do
8437  # Extract the first word of "$ac_prog", so it can be a program name with args.
8438set dummy $ac_prog; ac_word=$2
8439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8440$as_echo_n "checking for $ac_word... " >&6; }
8441if ${ac_cv_path_NAWK+:} false; then :
8442  $as_echo_n "(cached) " >&6
8443else
8444  case $NAWK in
8445  [\\/]* | ?:[\\/]*)
8446  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8447  ;;
8448  *)
8449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8450for as_dir in $PATH
8451do
8452  IFS=$as_save_IFS
8453  test -z "$as_dir" && as_dir=.
8454    for ac_exec_ext in '' $ac_executable_extensions; do
8455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8456    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8458    break 2
8459  fi
8460done
8461  done
8462IFS=$as_save_IFS
8463
8464  ;;
8465esac
8466fi
8467NAWK=$ac_cv_path_NAWK
8468if test -n "$NAWK"; then
8469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8470$as_echo "$NAWK" >&6; }
8471else
8472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8473$as_echo "no" >&6; }
8474fi
8475
8476
8477  test -n "$NAWK" && break
8478done
8479
8480    else
8481      # If it succeeded, then it was overridden by the user. We will use it
8482      # for the tool.
8483
8484      # First remove it from the list of overridden variables, so we can test
8485      # for unknown variables in the end.
8486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8487
8488      # Check if the provided tool contains a complete path.
8489      tool_specified="$NAWK"
8490      tool_basename="${tool_specified##*/}"
8491      if test "x$tool_basename" = "x$tool_specified"; then
8492        # A command without a complete path is provided, search $PATH.
8493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8494$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8495        # Extract the first word of "$tool_basename", so it can be a program name with args.
8496set dummy $tool_basename; ac_word=$2
8497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8498$as_echo_n "checking for $ac_word... " >&6; }
8499if ${ac_cv_path_NAWK+:} false; then :
8500  $as_echo_n "(cached) " >&6
8501else
8502  case $NAWK in
8503  [\\/]* | ?:[\\/]*)
8504  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8505  ;;
8506  *)
8507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8508for as_dir in $PATH
8509do
8510  IFS=$as_save_IFS
8511  test -z "$as_dir" && as_dir=.
8512    for ac_exec_ext in '' $ac_executable_extensions; do
8513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8514    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8516    break 2
8517  fi
8518done
8519  done
8520IFS=$as_save_IFS
8521
8522  ;;
8523esac
8524fi
8525NAWK=$ac_cv_path_NAWK
8526if test -n "$NAWK"; then
8527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8528$as_echo "$NAWK" >&6; }
8529else
8530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8531$as_echo "no" >&6; }
8532fi
8533
8534
8535        if test "x$NAWK" = x; then
8536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8537        fi
8538      else
8539        # Otherwise we believe it is a complete path. Use it as it is.
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8541$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8543$as_echo_n "checking for NAWK... " >&6; }
8544        if test ! -x "$tool_specified"; then
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8546$as_echo "not found" >&6; }
8547          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8548        fi
8549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8550$as_echo "$tool_specified" >&6; }
8551      fi
8552    fi
8553  fi
8554
8555
8556
8557  if test "x$NAWK" = x; then
8558    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8559  fi
8560
8561
8562
8563
8564
8565  # Publish this variable in the help.
8566
8567
8568  if test "x$PRINTF" = x; then
8569    # The variable is not set by user, try to locate tool using the code snippet
8570    for ac_prog in printf
8571do
8572  # Extract the first word of "$ac_prog", so it can be a program name with args.
8573set dummy $ac_prog; ac_word=$2
8574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8575$as_echo_n "checking for $ac_word... " >&6; }
8576if ${ac_cv_path_PRINTF+:} false; then :
8577  $as_echo_n "(cached) " >&6
8578else
8579  case $PRINTF in
8580  [\\/]* | ?:[\\/]*)
8581  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8582  ;;
8583  *)
8584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8585for as_dir in $PATH
8586do
8587  IFS=$as_save_IFS
8588  test -z "$as_dir" && as_dir=.
8589    for ac_exec_ext in '' $ac_executable_extensions; do
8590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8591    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8593    break 2
8594  fi
8595done
8596  done
8597IFS=$as_save_IFS
8598
8599  ;;
8600esac
8601fi
8602PRINTF=$ac_cv_path_PRINTF
8603if test -n "$PRINTF"; then
8604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8605$as_echo "$PRINTF" >&6; }
8606else
8607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8608$as_echo "no" >&6; }
8609fi
8610
8611
8612  test -n "$PRINTF" && break
8613done
8614
8615  else
8616    # The variable is set, but is it from the command line or the environment?
8617
8618    # Try to remove the string !PRINTF! from our list.
8619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8621      # If it failed, the variable was not from the command line. Ignore it,
8622      # but warn the user (except for BASH, which is always set by the calling BASH).
8623      if test "xPRINTF" != xBASH; then
8624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8625$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8626      fi
8627      # Try to locate tool using the code snippet
8628      for ac_prog in printf
8629do
8630  # Extract the first word of "$ac_prog", so it can be a program name with args.
8631set dummy $ac_prog; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_PRINTF+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $PRINTF in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660PRINTF=$ac_cv_path_PRINTF
8661if test -n "$PRINTF"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8663$as_echo "$PRINTF" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670  test -n "$PRINTF" && break
8671done
8672
8673    else
8674      # If it succeeded, then it was overridden by the user. We will use it
8675      # for the tool.
8676
8677      # First remove it from the list of overridden variables, so we can test
8678      # for unknown variables in the end.
8679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8680
8681      # Check if the provided tool contains a complete path.
8682      tool_specified="$PRINTF"
8683      tool_basename="${tool_specified##*/}"
8684      if test "x$tool_basename" = "x$tool_specified"; then
8685        # A command without a complete path is provided, search $PATH.
8686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8687$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8688        # Extract the first word of "$tool_basename", so it can be a program name with args.
8689set dummy $tool_basename; ac_word=$2
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691$as_echo_n "checking for $ac_word... " >&6; }
8692if ${ac_cv_path_PRINTF+:} false; then :
8693  $as_echo_n "(cached) " >&6
8694else
8695  case $PRINTF in
8696  [\\/]* | ?:[\\/]*)
8697  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8698  ;;
8699  *)
8700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8701for as_dir in $PATH
8702do
8703  IFS=$as_save_IFS
8704  test -z "$as_dir" && as_dir=.
8705    for ac_exec_ext in '' $ac_executable_extensions; do
8706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8707    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8709    break 2
8710  fi
8711done
8712  done
8713IFS=$as_save_IFS
8714
8715  ;;
8716esac
8717fi
8718PRINTF=$ac_cv_path_PRINTF
8719if test -n "$PRINTF"; then
8720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8721$as_echo "$PRINTF" >&6; }
8722else
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8724$as_echo "no" >&6; }
8725fi
8726
8727
8728        if test "x$PRINTF" = x; then
8729          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8730        fi
8731      else
8732        # Otherwise we believe it is a complete path. Use it as it is.
8733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8734$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8735        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8736$as_echo_n "checking for PRINTF... " >&6; }
8737        if test ! -x "$tool_specified"; then
8738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8739$as_echo "not found" >&6; }
8740          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8741        fi
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8743$as_echo "$tool_specified" >&6; }
8744      fi
8745    fi
8746  fi
8747
8748
8749
8750  if test "x$PRINTF" = x; then
8751    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8752  fi
8753
8754
8755
8756
8757
8758  # Publish this variable in the help.
8759
8760
8761  if test "x$RM" = x; then
8762    # The variable is not set by user, try to locate tool using the code snippet
8763    for ac_prog in rm
8764do
8765  # Extract the first word of "$ac_prog", so it can be a program name with args.
8766set dummy $ac_prog; ac_word=$2
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8768$as_echo_n "checking for $ac_word... " >&6; }
8769if ${ac_cv_path_RM+:} false; then :
8770  $as_echo_n "(cached) " >&6
8771else
8772  case $RM in
8773  [\\/]* | ?:[\\/]*)
8774  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8775  ;;
8776  *)
8777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8778for as_dir in $PATH
8779do
8780  IFS=$as_save_IFS
8781  test -z "$as_dir" && as_dir=.
8782    for ac_exec_ext in '' $ac_executable_extensions; do
8783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8784    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8786    break 2
8787  fi
8788done
8789  done
8790IFS=$as_save_IFS
8791
8792  ;;
8793esac
8794fi
8795RM=$ac_cv_path_RM
8796if test -n "$RM"; then
8797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8798$as_echo "$RM" >&6; }
8799else
8800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8801$as_echo "no" >&6; }
8802fi
8803
8804
8805  test -n "$RM" && break
8806done
8807
8808  else
8809    # The variable is set, but is it from the command line or the environment?
8810
8811    # Try to remove the string !RM! from our list.
8812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8814      # If it failed, the variable was not from the command line. Ignore it,
8815      # but warn the user (except for BASH, which is always set by the calling BASH).
8816      if test "xRM" != xBASH; then
8817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8818$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8819      fi
8820      # Try to locate tool using the code snippet
8821      for ac_prog in rm
8822do
8823  # Extract the first word of "$ac_prog", so it can be a program name with args.
8824set dummy $ac_prog; ac_word=$2
8825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8826$as_echo_n "checking for $ac_word... " >&6; }
8827if ${ac_cv_path_RM+:} false; then :
8828  $as_echo_n "(cached) " >&6
8829else
8830  case $RM in
8831  [\\/]* | ?:[\\/]*)
8832  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8833  ;;
8834  *)
8835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8836for as_dir in $PATH
8837do
8838  IFS=$as_save_IFS
8839  test -z "$as_dir" && as_dir=.
8840    for ac_exec_ext in '' $ac_executable_extensions; do
8841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8842    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8844    break 2
8845  fi
8846done
8847  done
8848IFS=$as_save_IFS
8849
8850  ;;
8851esac
8852fi
8853RM=$ac_cv_path_RM
8854if test -n "$RM"; then
8855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8856$as_echo "$RM" >&6; }
8857else
8858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8859$as_echo "no" >&6; }
8860fi
8861
8862
8863  test -n "$RM" && break
8864done
8865
8866    else
8867      # If it succeeded, then it was overridden by the user. We will use it
8868      # for the tool.
8869
8870      # First remove it from the list of overridden variables, so we can test
8871      # for unknown variables in the end.
8872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8873
8874      # Check if the provided tool contains a complete path.
8875      tool_specified="$RM"
8876      tool_basename="${tool_specified##*/}"
8877      if test "x$tool_basename" = "x$tool_specified"; then
8878        # A command without a complete path is provided, search $PATH.
8879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8880$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8881        # Extract the first word of "$tool_basename", so it can be a program name with args.
8882set dummy $tool_basename; ac_word=$2
8883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8884$as_echo_n "checking for $ac_word... " >&6; }
8885if ${ac_cv_path_RM+:} false; then :
8886  $as_echo_n "(cached) " >&6
8887else
8888  case $RM in
8889  [\\/]* | ?:[\\/]*)
8890  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8891  ;;
8892  *)
8893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8894for as_dir in $PATH
8895do
8896  IFS=$as_save_IFS
8897  test -z "$as_dir" && as_dir=.
8898    for ac_exec_ext in '' $ac_executable_extensions; do
8899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8900    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8902    break 2
8903  fi
8904done
8905  done
8906IFS=$as_save_IFS
8907
8908  ;;
8909esac
8910fi
8911RM=$ac_cv_path_RM
8912if test -n "$RM"; then
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8914$as_echo "$RM" >&6; }
8915else
8916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8917$as_echo "no" >&6; }
8918fi
8919
8920
8921        if test "x$RM" = x; then
8922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8923        fi
8924      else
8925        # Otherwise we believe it is a complete path. Use it as it is.
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8927$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8929$as_echo_n "checking for RM... " >&6; }
8930        if test ! -x "$tool_specified"; then
8931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8932$as_echo "not found" >&6; }
8933          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8934        fi
8935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8936$as_echo "$tool_specified" >&6; }
8937      fi
8938    fi
8939  fi
8940
8941
8942
8943  if test "x$RM" = x; then
8944    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8945  fi
8946
8947
8948
8949
8950
8951  # Publish this variable in the help.
8952
8953
8954  if test "x$SH" = x; then
8955    # The variable is not set by user, try to locate tool using the code snippet
8956    for ac_prog in sh
8957do
8958  # Extract the first word of "$ac_prog", so it can be a program name with args.
8959set dummy $ac_prog; ac_word=$2
8960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961$as_echo_n "checking for $ac_word... " >&6; }
8962if ${ac_cv_path_SH+:} false; then :
8963  $as_echo_n "(cached) " >&6
8964else
8965  case $SH in
8966  [\\/]* | ?:[\\/]*)
8967  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8968  ;;
8969  *)
8970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971for as_dir in $PATH
8972do
8973  IFS=$as_save_IFS
8974  test -z "$as_dir" && as_dir=.
8975    for ac_exec_ext in '' $ac_executable_extensions; do
8976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979    break 2
8980  fi
8981done
8982  done
8983IFS=$as_save_IFS
8984
8985  ;;
8986esac
8987fi
8988SH=$ac_cv_path_SH
8989if test -n "$SH"; then
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8991$as_echo "$SH" >&6; }
8992else
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8994$as_echo "no" >&6; }
8995fi
8996
8997
8998  test -n "$SH" && break
8999done
9000
9001  else
9002    # The variable is set, but is it from the command line or the environment?
9003
9004    # Try to remove the string !SH! from our list.
9005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9007      # If it failed, the variable was not from the command line. Ignore it,
9008      # but warn the user (except for BASH, which is always set by the calling BASH).
9009      if test "xSH" != xBASH; then
9010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9011$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9012      fi
9013      # Try to locate tool using the code snippet
9014      for ac_prog in sh
9015do
9016  # Extract the first word of "$ac_prog", so it can be a program name with args.
9017set dummy $ac_prog; ac_word=$2
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019$as_echo_n "checking for $ac_word... " >&6; }
9020if ${ac_cv_path_SH+:} false; then :
9021  $as_echo_n "(cached) " >&6
9022else
9023  case $SH in
9024  [\\/]* | ?:[\\/]*)
9025  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9026  ;;
9027  *)
9028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029for as_dir in $PATH
9030do
9031  IFS=$as_save_IFS
9032  test -z "$as_dir" && as_dir=.
9033    for ac_exec_ext in '' $ac_executable_extensions; do
9034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037    break 2
9038  fi
9039done
9040  done
9041IFS=$as_save_IFS
9042
9043  ;;
9044esac
9045fi
9046SH=$ac_cv_path_SH
9047if test -n "$SH"; then
9048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9049$as_echo "$SH" >&6; }
9050else
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052$as_echo "no" >&6; }
9053fi
9054
9055
9056  test -n "$SH" && break
9057done
9058
9059    else
9060      # If it succeeded, then it was overridden by the user. We will use it
9061      # for the tool.
9062
9063      # First remove it from the list of overridden variables, so we can test
9064      # for unknown variables in the end.
9065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9066
9067      # Check if the provided tool contains a complete path.
9068      tool_specified="$SH"
9069      tool_basename="${tool_specified##*/}"
9070      if test "x$tool_basename" = "x$tool_specified"; then
9071        # A command without a complete path is provided, search $PATH.
9072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9073$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9074        # Extract the first word of "$tool_basename", so it can be a program name with args.
9075set dummy $tool_basename; ac_word=$2
9076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9077$as_echo_n "checking for $ac_word... " >&6; }
9078if ${ac_cv_path_SH+:} false; then :
9079  $as_echo_n "(cached) " >&6
9080else
9081  case $SH in
9082  [\\/]* | ?:[\\/]*)
9083  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9084  ;;
9085  *)
9086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9087for as_dir in $PATH
9088do
9089  IFS=$as_save_IFS
9090  test -z "$as_dir" && as_dir=.
9091    for ac_exec_ext in '' $ac_executable_extensions; do
9092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9093    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9095    break 2
9096  fi
9097done
9098  done
9099IFS=$as_save_IFS
9100
9101  ;;
9102esac
9103fi
9104SH=$ac_cv_path_SH
9105if test -n "$SH"; then
9106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9107$as_echo "$SH" >&6; }
9108else
9109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
9111fi
9112
9113
9114        if test "x$SH" = x; then
9115          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9116        fi
9117      else
9118        # Otherwise we believe it is a complete path. Use it as it is.
9119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9120$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9122$as_echo_n "checking for SH... " >&6; }
9123        if test ! -x "$tool_specified"; then
9124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9125$as_echo "not found" >&6; }
9126          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9127        fi
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9129$as_echo "$tool_specified" >&6; }
9130      fi
9131    fi
9132  fi
9133
9134
9135
9136  if test "x$SH" = x; then
9137    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9138  fi
9139
9140
9141
9142
9143
9144  # Publish this variable in the help.
9145
9146
9147  if test "x$SORT" = x; then
9148    # The variable is not set by user, try to locate tool using the code snippet
9149    for ac_prog in sort
9150do
9151  # Extract the first word of "$ac_prog", so it can be a program name with args.
9152set dummy $ac_prog; ac_word=$2
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9154$as_echo_n "checking for $ac_word... " >&6; }
9155if ${ac_cv_path_SORT+:} false; then :
9156  $as_echo_n "(cached) " >&6
9157else
9158  case $SORT in
9159  [\\/]* | ?:[\\/]*)
9160  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9161  ;;
9162  *)
9163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9164for as_dir in $PATH
9165do
9166  IFS=$as_save_IFS
9167  test -z "$as_dir" && as_dir=.
9168    for ac_exec_ext in '' $ac_executable_extensions; do
9169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9170    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9172    break 2
9173  fi
9174done
9175  done
9176IFS=$as_save_IFS
9177
9178  ;;
9179esac
9180fi
9181SORT=$ac_cv_path_SORT
9182if test -n "$SORT"; then
9183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9184$as_echo "$SORT" >&6; }
9185else
9186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9187$as_echo "no" >&6; }
9188fi
9189
9190
9191  test -n "$SORT" && break
9192done
9193
9194  else
9195    # The variable is set, but is it from the command line or the environment?
9196
9197    # Try to remove the string !SORT! from our list.
9198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9200      # If it failed, the variable was not from the command line. Ignore it,
9201      # but warn the user (except for BASH, which is always set by the calling BASH).
9202      if test "xSORT" != xBASH; then
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9204$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9205      fi
9206      # Try to locate tool using the code snippet
9207      for ac_prog in sort
9208do
9209  # Extract the first word of "$ac_prog", so it can be a program name with args.
9210set dummy $ac_prog; ac_word=$2
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9212$as_echo_n "checking for $ac_word... " >&6; }
9213if ${ac_cv_path_SORT+:} false; then :
9214  $as_echo_n "(cached) " >&6
9215else
9216  case $SORT in
9217  [\\/]* | ?:[\\/]*)
9218  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9219  ;;
9220  *)
9221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9222for as_dir in $PATH
9223do
9224  IFS=$as_save_IFS
9225  test -z "$as_dir" && as_dir=.
9226    for ac_exec_ext in '' $ac_executable_extensions; do
9227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9228    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9230    break 2
9231  fi
9232done
9233  done
9234IFS=$as_save_IFS
9235
9236  ;;
9237esac
9238fi
9239SORT=$ac_cv_path_SORT
9240if test -n "$SORT"; then
9241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9242$as_echo "$SORT" >&6; }
9243else
9244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9245$as_echo "no" >&6; }
9246fi
9247
9248
9249  test -n "$SORT" && break
9250done
9251
9252    else
9253      # If it succeeded, then it was overridden by the user. We will use it
9254      # for the tool.
9255
9256      # First remove it from the list of overridden variables, so we can test
9257      # for unknown variables in the end.
9258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9259
9260      # Check if the provided tool contains a complete path.
9261      tool_specified="$SORT"
9262      tool_basename="${tool_specified##*/}"
9263      if test "x$tool_basename" = "x$tool_specified"; then
9264        # A command without a complete path is provided, search $PATH.
9265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9266$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9267        # Extract the first word of "$tool_basename", so it can be a program name with args.
9268set dummy $tool_basename; ac_word=$2
9269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9270$as_echo_n "checking for $ac_word... " >&6; }
9271if ${ac_cv_path_SORT+:} false; then :
9272  $as_echo_n "(cached) " >&6
9273else
9274  case $SORT in
9275  [\\/]* | ?:[\\/]*)
9276  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9277  ;;
9278  *)
9279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9280for as_dir in $PATH
9281do
9282  IFS=$as_save_IFS
9283  test -z "$as_dir" && as_dir=.
9284    for ac_exec_ext in '' $ac_executable_extensions; do
9285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9286    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9288    break 2
9289  fi
9290done
9291  done
9292IFS=$as_save_IFS
9293
9294  ;;
9295esac
9296fi
9297SORT=$ac_cv_path_SORT
9298if test -n "$SORT"; then
9299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9300$as_echo "$SORT" >&6; }
9301else
9302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303$as_echo "no" >&6; }
9304fi
9305
9306
9307        if test "x$SORT" = x; then
9308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9309        fi
9310      else
9311        # Otherwise we believe it is a complete path. Use it as it is.
9312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9313$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9315$as_echo_n "checking for SORT... " >&6; }
9316        if test ! -x "$tool_specified"; then
9317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9318$as_echo "not found" >&6; }
9319          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9320        fi
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9322$as_echo "$tool_specified" >&6; }
9323      fi
9324    fi
9325  fi
9326
9327
9328
9329  if test "x$SORT" = x; then
9330    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9331  fi
9332
9333
9334
9335
9336
9337  # Publish this variable in the help.
9338
9339
9340  if test "x$TAIL" = x; then
9341    # The variable is not set by user, try to locate tool using the code snippet
9342    for ac_prog in tail
9343do
9344  # Extract the first word of "$ac_prog", so it can be a program name with args.
9345set dummy $ac_prog; ac_word=$2
9346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9347$as_echo_n "checking for $ac_word... " >&6; }
9348if ${ac_cv_path_TAIL+:} false; then :
9349  $as_echo_n "(cached) " >&6
9350else
9351  case $TAIL in
9352  [\\/]* | ?:[\\/]*)
9353  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9354  ;;
9355  *)
9356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9357for as_dir in $PATH
9358do
9359  IFS=$as_save_IFS
9360  test -z "$as_dir" && as_dir=.
9361    for ac_exec_ext in '' $ac_executable_extensions; do
9362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9363    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9365    break 2
9366  fi
9367done
9368  done
9369IFS=$as_save_IFS
9370
9371  ;;
9372esac
9373fi
9374TAIL=$ac_cv_path_TAIL
9375if test -n "$TAIL"; then
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9377$as_echo "$TAIL" >&6; }
9378else
9379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
9381fi
9382
9383
9384  test -n "$TAIL" && break
9385done
9386
9387  else
9388    # The variable is set, but is it from the command line or the environment?
9389
9390    # Try to remove the string !TAIL! from our list.
9391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9393      # If it failed, the variable was not from the command line. Ignore it,
9394      # but warn the user (except for BASH, which is always set by the calling BASH).
9395      if test "xTAIL" != xBASH; then
9396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9397$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9398      fi
9399      # Try to locate tool using the code snippet
9400      for ac_prog in tail
9401do
9402  # Extract the first word of "$ac_prog", so it can be a program name with args.
9403set dummy $ac_prog; ac_word=$2
9404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9405$as_echo_n "checking for $ac_word... " >&6; }
9406if ${ac_cv_path_TAIL+:} false; then :
9407  $as_echo_n "(cached) " >&6
9408else
9409  case $TAIL in
9410  [\\/]* | ?:[\\/]*)
9411  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9412  ;;
9413  *)
9414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9415for as_dir in $PATH
9416do
9417  IFS=$as_save_IFS
9418  test -z "$as_dir" && as_dir=.
9419    for ac_exec_ext in '' $ac_executable_extensions; do
9420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9421    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9423    break 2
9424  fi
9425done
9426  done
9427IFS=$as_save_IFS
9428
9429  ;;
9430esac
9431fi
9432TAIL=$ac_cv_path_TAIL
9433if test -n "$TAIL"; then
9434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9435$as_echo "$TAIL" >&6; }
9436else
9437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9438$as_echo "no" >&6; }
9439fi
9440
9441
9442  test -n "$TAIL" && break
9443done
9444
9445    else
9446      # If it succeeded, then it was overridden by the user. We will use it
9447      # for the tool.
9448
9449      # First remove it from the list of overridden variables, so we can test
9450      # for unknown variables in the end.
9451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9452
9453      # Check if the provided tool contains a complete path.
9454      tool_specified="$TAIL"
9455      tool_basename="${tool_specified##*/}"
9456      if test "x$tool_basename" = "x$tool_specified"; then
9457        # A command without a complete path is provided, search $PATH.
9458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9459$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9460        # Extract the first word of "$tool_basename", so it can be a program name with args.
9461set dummy $tool_basename; ac_word=$2
9462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9463$as_echo_n "checking for $ac_word... " >&6; }
9464if ${ac_cv_path_TAIL+:} false; then :
9465  $as_echo_n "(cached) " >&6
9466else
9467  case $TAIL in
9468  [\\/]* | ?:[\\/]*)
9469  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9470  ;;
9471  *)
9472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9473for as_dir in $PATH
9474do
9475  IFS=$as_save_IFS
9476  test -z "$as_dir" && as_dir=.
9477    for ac_exec_ext in '' $ac_executable_extensions; do
9478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9479    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9481    break 2
9482  fi
9483done
9484  done
9485IFS=$as_save_IFS
9486
9487  ;;
9488esac
9489fi
9490TAIL=$ac_cv_path_TAIL
9491if test -n "$TAIL"; then
9492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9493$as_echo "$TAIL" >&6; }
9494else
9495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9496$as_echo "no" >&6; }
9497fi
9498
9499
9500        if test "x$TAIL" = x; then
9501          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9502        fi
9503      else
9504        # Otherwise we believe it is a complete path. Use it as it is.
9505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9506$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9508$as_echo_n "checking for TAIL... " >&6; }
9509        if test ! -x "$tool_specified"; then
9510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9511$as_echo "not found" >&6; }
9512          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9513        fi
9514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9515$as_echo "$tool_specified" >&6; }
9516      fi
9517    fi
9518  fi
9519
9520
9521
9522  if test "x$TAIL" = x; then
9523    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9524  fi
9525
9526
9527
9528
9529
9530  # Publish this variable in the help.
9531
9532
9533  if test "x$TAR" = x; then
9534    # The variable is not set by user, try to locate tool using the code snippet
9535    for ac_prog in tar
9536do
9537  # Extract the first word of "$ac_prog", so it can be a program name with args.
9538set dummy $ac_prog; ac_word=$2
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9540$as_echo_n "checking for $ac_word... " >&6; }
9541if ${ac_cv_path_TAR+:} false; then :
9542  $as_echo_n "(cached) " >&6
9543else
9544  case $TAR in
9545  [\\/]* | ?:[\\/]*)
9546  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9547  ;;
9548  *)
9549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9550for as_dir in $PATH
9551do
9552  IFS=$as_save_IFS
9553  test -z "$as_dir" && as_dir=.
9554    for ac_exec_ext in '' $ac_executable_extensions; do
9555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9556    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9558    break 2
9559  fi
9560done
9561  done
9562IFS=$as_save_IFS
9563
9564  ;;
9565esac
9566fi
9567TAR=$ac_cv_path_TAR
9568if test -n "$TAR"; then
9569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9570$as_echo "$TAR" >&6; }
9571else
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9573$as_echo "no" >&6; }
9574fi
9575
9576
9577  test -n "$TAR" && break
9578done
9579
9580  else
9581    # The variable is set, but is it from the command line or the environment?
9582
9583    # Try to remove the string !TAR! from our list.
9584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9586      # If it failed, the variable was not from the command line. Ignore it,
9587      # but warn the user (except for BASH, which is always set by the calling BASH).
9588      if test "xTAR" != xBASH; then
9589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9590$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9591      fi
9592      # Try to locate tool using the code snippet
9593      for ac_prog in tar
9594do
9595  # Extract the first word of "$ac_prog", so it can be a program name with args.
9596set dummy $ac_prog; ac_word=$2
9597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9598$as_echo_n "checking for $ac_word... " >&6; }
9599if ${ac_cv_path_TAR+:} false; then :
9600  $as_echo_n "(cached) " >&6
9601else
9602  case $TAR in
9603  [\\/]* | ?:[\\/]*)
9604  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9605  ;;
9606  *)
9607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9608for as_dir in $PATH
9609do
9610  IFS=$as_save_IFS
9611  test -z "$as_dir" && as_dir=.
9612    for ac_exec_ext in '' $ac_executable_extensions; do
9613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9614    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9616    break 2
9617  fi
9618done
9619  done
9620IFS=$as_save_IFS
9621
9622  ;;
9623esac
9624fi
9625TAR=$ac_cv_path_TAR
9626if test -n "$TAR"; then
9627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9628$as_echo "$TAR" >&6; }
9629else
9630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9631$as_echo "no" >&6; }
9632fi
9633
9634
9635  test -n "$TAR" && break
9636done
9637
9638    else
9639      # If it succeeded, then it was overridden by the user. We will use it
9640      # for the tool.
9641
9642      # First remove it from the list of overridden variables, so we can test
9643      # for unknown variables in the end.
9644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9645
9646      # Check if the provided tool contains a complete path.
9647      tool_specified="$TAR"
9648      tool_basename="${tool_specified##*/}"
9649      if test "x$tool_basename" = "x$tool_specified"; then
9650        # A command without a complete path is provided, search $PATH.
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9652$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9653        # Extract the first word of "$tool_basename", so it can be a program name with args.
9654set dummy $tool_basename; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_TAR+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $TAR in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683TAR=$ac_cv_path_TAR
9684if test -n "$TAR"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9686$as_echo "$TAR" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693        if test "x$TAR" = x; then
9694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9695        fi
9696      else
9697        # Otherwise we believe it is a complete path. Use it as it is.
9698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9699$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9701$as_echo_n "checking for TAR... " >&6; }
9702        if test ! -x "$tool_specified"; then
9703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9704$as_echo "not found" >&6; }
9705          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9706        fi
9707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9708$as_echo "$tool_specified" >&6; }
9709      fi
9710    fi
9711  fi
9712
9713
9714
9715  if test "x$TAR" = x; then
9716    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9717  fi
9718
9719
9720
9721
9722
9723  # Publish this variable in the help.
9724
9725
9726  if test "x$TEE" = x; then
9727    # The variable is not set by user, try to locate tool using the code snippet
9728    for ac_prog in tee
9729do
9730  # Extract the first word of "$ac_prog", so it can be a program name with args.
9731set dummy $ac_prog; ac_word=$2
9732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9733$as_echo_n "checking for $ac_word... " >&6; }
9734if ${ac_cv_path_TEE+:} false; then :
9735  $as_echo_n "(cached) " >&6
9736else
9737  case $TEE in
9738  [\\/]* | ?:[\\/]*)
9739  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9740  ;;
9741  *)
9742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9743for as_dir in $PATH
9744do
9745  IFS=$as_save_IFS
9746  test -z "$as_dir" && as_dir=.
9747    for ac_exec_ext in '' $ac_executable_extensions; do
9748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9749    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9751    break 2
9752  fi
9753done
9754  done
9755IFS=$as_save_IFS
9756
9757  ;;
9758esac
9759fi
9760TEE=$ac_cv_path_TEE
9761if test -n "$TEE"; then
9762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9763$as_echo "$TEE" >&6; }
9764else
9765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9766$as_echo "no" >&6; }
9767fi
9768
9769
9770  test -n "$TEE" && break
9771done
9772
9773  else
9774    # The variable is set, but is it from the command line or the environment?
9775
9776    # Try to remove the string !TEE! from our list.
9777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9779      # If it failed, the variable was not from the command line. Ignore it,
9780      # but warn the user (except for BASH, which is always set by the calling BASH).
9781      if test "xTEE" != xBASH; then
9782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9783$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9784      fi
9785      # Try to locate tool using the code snippet
9786      for ac_prog in tee
9787do
9788  # Extract the first word of "$ac_prog", so it can be a program name with args.
9789set dummy $ac_prog; ac_word=$2
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9791$as_echo_n "checking for $ac_word... " >&6; }
9792if ${ac_cv_path_TEE+:} false; then :
9793  $as_echo_n "(cached) " >&6
9794else
9795  case $TEE in
9796  [\\/]* | ?:[\\/]*)
9797  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9798  ;;
9799  *)
9800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9801for as_dir in $PATH
9802do
9803  IFS=$as_save_IFS
9804  test -z "$as_dir" && as_dir=.
9805    for ac_exec_ext in '' $ac_executable_extensions; do
9806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9807    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9809    break 2
9810  fi
9811done
9812  done
9813IFS=$as_save_IFS
9814
9815  ;;
9816esac
9817fi
9818TEE=$ac_cv_path_TEE
9819if test -n "$TEE"; then
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9821$as_echo "$TEE" >&6; }
9822else
9823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9824$as_echo "no" >&6; }
9825fi
9826
9827
9828  test -n "$TEE" && break
9829done
9830
9831    else
9832      # If it succeeded, then it was overridden by the user. We will use it
9833      # for the tool.
9834
9835      # First remove it from the list of overridden variables, so we can test
9836      # for unknown variables in the end.
9837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9838
9839      # Check if the provided tool contains a complete path.
9840      tool_specified="$TEE"
9841      tool_basename="${tool_specified##*/}"
9842      if test "x$tool_basename" = "x$tool_specified"; then
9843        # A command without a complete path is provided, search $PATH.
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9845$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9846        # Extract the first word of "$tool_basename", so it can be a program name with args.
9847set dummy $tool_basename; ac_word=$2
9848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9849$as_echo_n "checking for $ac_word... " >&6; }
9850if ${ac_cv_path_TEE+:} false; then :
9851  $as_echo_n "(cached) " >&6
9852else
9853  case $TEE in
9854  [\\/]* | ?:[\\/]*)
9855  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9856  ;;
9857  *)
9858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9859for as_dir in $PATH
9860do
9861  IFS=$as_save_IFS
9862  test -z "$as_dir" && as_dir=.
9863    for ac_exec_ext in '' $ac_executable_extensions; do
9864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9865    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9867    break 2
9868  fi
9869done
9870  done
9871IFS=$as_save_IFS
9872
9873  ;;
9874esac
9875fi
9876TEE=$ac_cv_path_TEE
9877if test -n "$TEE"; then
9878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9879$as_echo "$TEE" >&6; }
9880else
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9882$as_echo "no" >&6; }
9883fi
9884
9885
9886        if test "x$TEE" = x; then
9887          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9888        fi
9889      else
9890        # Otherwise we believe it is a complete path. Use it as it is.
9891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9892$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9894$as_echo_n "checking for TEE... " >&6; }
9895        if test ! -x "$tool_specified"; then
9896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9897$as_echo "not found" >&6; }
9898          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9899        fi
9900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9901$as_echo "$tool_specified" >&6; }
9902      fi
9903    fi
9904  fi
9905
9906
9907
9908  if test "x$TEE" = x; then
9909    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9910  fi
9911
9912
9913
9914
9915
9916  # Publish this variable in the help.
9917
9918
9919  if test "x$TOUCH" = x; then
9920    # The variable is not set by user, try to locate tool using the code snippet
9921    for ac_prog in touch
9922do
9923  # Extract the first word of "$ac_prog", so it can be a program name with args.
9924set dummy $ac_prog; ac_word=$2
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9926$as_echo_n "checking for $ac_word... " >&6; }
9927if ${ac_cv_path_TOUCH+:} false; then :
9928  $as_echo_n "(cached) " >&6
9929else
9930  case $TOUCH in
9931  [\\/]* | ?:[\\/]*)
9932  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9933  ;;
9934  *)
9935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9936for as_dir in $PATH
9937do
9938  IFS=$as_save_IFS
9939  test -z "$as_dir" && as_dir=.
9940    for ac_exec_ext in '' $ac_executable_extensions; do
9941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9942    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9944    break 2
9945  fi
9946done
9947  done
9948IFS=$as_save_IFS
9949
9950  ;;
9951esac
9952fi
9953TOUCH=$ac_cv_path_TOUCH
9954if test -n "$TOUCH"; then
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9956$as_echo "$TOUCH" >&6; }
9957else
9958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9959$as_echo "no" >&6; }
9960fi
9961
9962
9963  test -n "$TOUCH" && break
9964done
9965
9966  else
9967    # The variable is set, but is it from the command line or the environment?
9968
9969    # Try to remove the string !TOUCH! from our list.
9970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
9971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9972      # If it failed, the variable was not from the command line. Ignore it,
9973      # but warn the user (except for BASH, which is always set by the calling BASH).
9974      if test "xTOUCH" != xBASH; then
9975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
9976$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
9977      fi
9978      # Try to locate tool using the code snippet
9979      for ac_prog in touch
9980do
9981  # Extract the first word of "$ac_prog", so it can be a program name with args.
9982set dummy $ac_prog; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_TOUCH+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $TOUCH in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011TOUCH=$ac_cv_path_TOUCH
10012if test -n "$TOUCH"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10014$as_echo "$TOUCH" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021  test -n "$TOUCH" && break
10022done
10023
10024    else
10025      # If it succeeded, then it was overridden by the user. We will use it
10026      # for the tool.
10027
10028      # First remove it from the list of overridden variables, so we can test
10029      # for unknown variables in the end.
10030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10031
10032      # Check if the provided tool contains a complete path.
10033      tool_specified="$TOUCH"
10034      tool_basename="${tool_specified##*/}"
10035      if test "x$tool_basename" = "x$tool_specified"; then
10036        # A command without a complete path is provided, search $PATH.
10037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10038$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10039        # Extract the first word of "$tool_basename", so it can be a program name with args.
10040set dummy $tool_basename; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_TOUCH+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $TOUCH in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069TOUCH=$ac_cv_path_TOUCH
10070if test -n "$TOUCH"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10072$as_echo "$TOUCH" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079        if test "x$TOUCH" = x; then
10080          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10081        fi
10082      else
10083        # Otherwise we believe it is a complete path. Use it as it is.
10084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10085$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10087$as_echo_n "checking for TOUCH... " >&6; }
10088        if test ! -x "$tool_specified"; then
10089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10090$as_echo "not found" >&6; }
10091          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10092        fi
10093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10094$as_echo "$tool_specified" >&6; }
10095      fi
10096    fi
10097  fi
10098
10099
10100
10101  if test "x$TOUCH" = x; then
10102    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10103  fi
10104
10105
10106
10107
10108
10109  # Publish this variable in the help.
10110
10111
10112  if test "x$TR" = x; then
10113    # The variable is not set by user, try to locate tool using the code snippet
10114    for ac_prog in tr
10115do
10116  # Extract the first word of "$ac_prog", so it can be a program name with args.
10117set dummy $ac_prog; ac_word=$2
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10119$as_echo_n "checking for $ac_word... " >&6; }
10120if ${ac_cv_path_TR+:} false; then :
10121  $as_echo_n "(cached) " >&6
10122else
10123  case $TR in
10124  [\\/]* | ?:[\\/]*)
10125  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10126  ;;
10127  *)
10128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10129for as_dir in $PATH
10130do
10131  IFS=$as_save_IFS
10132  test -z "$as_dir" && as_dir=.
10133    for ac_exec_ext in '' $ac_executable_extensions; do
10134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10135    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10137    break 2
10138  fi
10139done
10140  done
10141IFS=$as_save_IFS
10142
10143  ;;
10144esac
10145fi
10146TR=$ac_cv_path_TR
10147if test -n "$TR"; then
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10149$as_echo "$TR" >&6; }
10150else
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10152$as_echo "no" >&6; }
10153fi
10154
10155
10156  test -n "$TR" && break
10157done
10158
10159  else
10160    # The variable is set, but is it from the command line or the environment?
10161
10162    # Try to remove the string !TR! from our list.
10163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10165      # If it failed, the variable was not from the command line. Ignore it,
10166      # but warn the user (except for BASH, which is always set by the calling BASH).
10167      if test "xTR" != xBASH; then
10168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10169$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10170      fi
10171      # Try to locate tool using the code snippet
10172      for ac_prog in tr
10173do
10174  # Extract the first word of "$ac_prog", so it can be a program name with args.
10175set dummy $ac_prog; ac_word=$2
10176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10177$as_echo_n "checking for $ac_word... " >&6; }
10178if ${ac_cv_path_TR+:} false; then :
10179  $as_echo_n "(cached) " >&6
10180else
10181  case $TR in
10182  [\\/]* | ?:[\\/]*)
10183  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10184  ;;
10185  *)
10186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10187for as_dir in $PATH
10188do
10189  IFS=$as_save_IFS
10190  test -z "$as_dir" && as_dir=.
10191    for ac_exec_ext in '' $ac_executable_extensions; do
10192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10193    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10195    break 2
10196  fi
10197done
10198  done
10199IFS=$as_save_IFS
10200
10201  ;;
10202esac
10203fi
10204TR=$ac_cv_path_TR
10205if test -n "$TR"; then
10206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10207$as_echo "$TR" >&6; }
10208else
10209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10210$as_echo "no" >&6; }
10211fi
10212
10213
10214  test -n "$TR" && break
10215done
10216
10217    else
10218      # If it succeeded, then it was overridden by the user. We will use it
10219      # for the tool.
10220
10221      # First remove it from the list of overridden variables, so we can test
10222      # for unknown variables in the end.
10223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10224
10225      # Check if the provided tool contains a complete path.
10226      tool_specified="$TR"
10227      tool_basename="${tool_specified##*/}"
10228      if test "x$tool_basename" = "x$tool_specified"; then
10229        # A command without a complete path is provided, search $PATH.
10230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10231$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10232        # Extract the first word of "$tool_basename", so it can be a program name with args.
10233set dummy $tool_basename; ac_word=$2
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235$as_echo_n "checking for $ac_word... " >&6; }
10236if ${ac_cv_path_TR+:} false; then :
10237  $as_echo_n "(cached) " >&6
10238else
10239  case $TR in
10240  [\\/]* | ?:[\\/]*)
10241  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10242  ;;
10243  *)
10244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245for as_dir in $PATH
10246do
10247  IFS=$as_save_IFS
10248  test -z "$as_dir" && as_dir=.
10249    for ac_exec_ext in '' $ac_executable_extensions; do
10250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10251    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253    break 2
10254  fi
10255done
10256  done
10257IFS=$as_save_IFS
10258
10259  ;;
10260esac
10261fi
10262TR=$ac_cv_path_TR
10263if test -n "$TR"; then
10264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10265$as_echo "$TR" >&6; }
10266else
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
10269fi
10270
10271
10272        if test "x$TR" = x; then
10273          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10274        fi
10275      else
10276        # Otherwise we believe it is a complete path. Use it as it is.
10277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10278$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10280$as_echo_n "checking for TR... " >&6; }
10281        if test ! -x "$tool_specified"; then
10282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10283$as_echo "not found" >&6; }
10284          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10285        fi
10286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10287$as_echo "$tool_specified" >&6; }
10288      fi
10289    fi
10290  fi
10291
10292
10293
10294  if test "x$TR" = x; then
10295    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10296  fi
10297
10298
10299
10300
10301
10302  # Publish this variable in the help.
10303
10304
10305  if test "x$UNAME" = x; then
10306    # The variable is not set by user, try to locate tool using the code snippet
10307    for ac_prog in uname
10308do
10309  # Extract the first word of "$ac_prog", so it can be a program name with args.
10310set dummy $ac_prog; ac_word=$2
10311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10312$as_echo_n "checking for $ac_word... " >&6; }
10313if ${ac_cv_path_UNAME+:} false; then :
10314  $as_echo_n "(cached) " >&6
10315else
10316  case $UNAME in
10317  [\\/]* | ?:[\\/]*)
10318  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10319  ;;
10320  *)
10321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10322for as_dir in $PATH
10323do
10324  IFS=$as_save_IFS
10325  test -z "$as_dir" && as_dir=.
10326    for ac_exec_ext in '' $ac_executable_extensions; do
10327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10328    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10330    break 2
10331  fi
10332done
10333  done
10334IFS=$as_save_IFS
10335
10336  ;;
10337esac
10338fi
10339UNAME=$ac_cv_path_UNAME
10340if test -n "$UNAME"; then
10341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10342$as_echo "$UNAME" >&6; }
10343else
10344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345$as_echo "no" >&6; }
10346fi
10347
10348
10349  test -n "$UNAME" && break
10350done
10351
10352  else
10353    # The variable is set, but is it from the command line or the environment?
10354
10355    # Try to remove the string !UNAME! from our list.
10356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10358      # If it failed, the variable was not from the command line. Ignore it,
10359      # but warn the user (except for BASH, which is always set by the calling BASH).
10360      if test "xUNAME" != xBASH; then
10361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10362$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10363      fi
10364      # Try to locate tool using the code snippet
10365      for ac_prog in uname
10366do
10367  # Extract the first word of "$ac_prog", so it can be a program name with args.
10368set dummy $ac_prog; ac_word=$2
10369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10370$as_echo_n "checking for $ac_word... " >&6; }
10371if ${ac_cv_path_UNAME+:} false; then :
10372  $as_echo_n "(cached) " >&6
10373else
10374  case $UNAME in
10375  [\\/]* | ?:[\\/]*)
10376  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10377  ;;
10378  *)
10379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10380for as_dir in $PATH
10381do
10382  IFS=$as_save_IFS
10383  test -z "$as_dir" && as_dir=.
10384    for ac_exec_ext in '' $ac_executable_extensions; do
10385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10386    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10388    break 2
10389  fi
10390done
10391  done
10392IFS=$as_save_IFS
10393
10394  ;;
10395esac
10396fi
10397UNAME=$ac_cv_path_UNAME
10398if test -n "$UNAME"; then
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10400$as_echo "$UNAME" >&6; }
10401else
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10403$as_echo "no" >&6; }
10404fi
10405
10406
10407  test -n "$UNAME" && break
10408done
10409
10410    else
10411      # If it succeeded, then it was overridden by the user. We will use it
10412      # for the tool.
10413
10414      # First remove it from the list of overridden variables, so we can test
10415      # for unknown variables in the end.
10416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10417
10418      # Check if the provided tool contains a complete path.
10419      tool_specified="$UNAME"
10420      tool_basename="${tool_specified##*/}"
10421      if test "x$tool_basename" = "x$tool_specified"; then
10422        # A command without a complete path is provided, search $PATH.
10423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10424$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10425        # Extract the first word of "$tool_basename", so it can be a program name with args.
10426set dummy $tool_basename; ac_word=$2
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10428$as_echo_n "checking for $ac_word... " >&6; }
10429if ${ac_cv_path_UNAME+:} false; then :
10430  $as_echo_n "(cached) " >&6
10431else
10432  case $UNAME in
10433  [\\/]* | ?:[\\/]*)
10434  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10435  ;;
10436  *)
10437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10438for as_dir in $PATH
10439do
10440  IFS=$as_save_IFS
10441  test -z "$as_dir" && as_dir=.
10442    for ac_exec_ext in '' $ac_executable_extensions; do
10443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10444    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10446    break 2
10447  fi
10448done
10449  done
10450IFS=$as_save_IFS
10451
10452  ;;
10453esac
10454fi
10455UNAME=$ac_cv_path_UNAME
10456if test -n "$UNAME"; then
10457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10458$as_echo "$UNAME" >&6; }
10459else
10460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10461$as_echo "no" >&6; }
10462fi
10463
10464
10465        if test "x$UNAME" = x; then
10466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10467        fi
10468      else
10469        # Otherwise we believe it is a complete path. Use it as it is.
10470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10471$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10473$as_echo_n "checking for UNAME... " >&6; }
10474        if test ! -x "$tool_specified"; then
10475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10476$as_echo "not found" >&6; }
10477          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10478        fi
10479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10480$as_echo "$tool_specified" >&6; }
10481      fi
10482    fi
10483  fi
10484
10485
10486
10487  if test "x$UNAME" = x; then
10488    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10489  fi
10490
10491
10492
10493
10494
10495  # Publish this variable in the help.
10496
10497
10498  if test "x$UNIQ" = x; then
10499    # The variable is not set by user, try to locate tool using the code snippet
10500    for ac_prog in uniq
10501do
10502  # Extract the first word of "$ac_prog", so it can be a program name with args.
10503set dummy $ac_prog; ac_word=$2
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10505$as_echo_n "checking for $ac_word... " >&6; }
10506if ${ac_cv_path_UNIQ+:} false; then :
10507  $as_echo_n "(cached) " >&6
10508else
10509  case $UNIQ in
10510  [\\/]* | ?:[\\/]*)
10511  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10512  ;;
10513  *)
10514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10515for as_dir in $PATH
10516do
10517  IFS=$as_save_IFS
10518  test -z "$as_dir" && as_dir=.
10519    for ac_exec_ext in '' $ac_executable_extensions; do
10520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10521    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10523    break 2
10524  fi
10525done
10526  done
10527IFS=$as_save_IFS
10528
10529  ;;
10530esac
10531fi
10532UNIQ=$ac_cv_path_UNIQ
10533if test -n "$UNIQ"; then
10534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10535$as_echo "$UNIQ" >&6; }
10536else
10537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538$as_echo "no" >&6; }
10539fi
10540
10541
10542  test -n "$UNIQ" && break
10543done
10544
10545  else
10546    # The variable is set, but is it from the command line or the environment?
10547
10548    # Try to remove the string !UNIQ! from our list.
10549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10551      # If it failed, the variable was not from the command line. Ignore it,
10552      # but warn the user (except for BASH, which is always set by the calling BASH).
10553      if test "xUNIQ" != xBASH; then
10554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10555$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10556      fi
10557      # Try to locate tool using the code snippet
10558      for ac_prog in uniq
10559do
10560  # Extract the first word of "$ac_prog", so it can be a program name with args.
10561set dummy $ac_prog; ac_word=$2
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10563$as_echo_n "checking for $ac_word... " >&6; }
10564if ${ac_cv_path_UNIQ+:} false; then :
10565  $as_echo_n "(cached) " >&6
10566else
10567  case $UNIQ in
10568  [\\/]* | ?:[\\/]*)
10569  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10570  ;;
10571  *)
10572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10573for as_dir in $PATH
10574do
10575  IFS=$as_save_IFS
10576  test -z "$as_dir" && as_dir=.
10577    for ac_exec_ext in '' $ac_executable_extensions; do
10578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10579    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10581    break 2
10582  fi
10583done
10584  done
10585IFS=$as_save_IFS
10586
10587  ;;
10588esac
10589fi
10590UNIQ=$ac_cv_path_UNIQ
10591if test -n "$UNIQ"; then
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10593$as_echo "$UNIQ" >&6; }
10594else
10595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
10597fi
10598
10599
10600  test -n "$UNIQ" && break
10601done
10602
10603    else
10604      # If it succeeded, then it was overridden by the user. We will use it
10605      # for the tool.
10606
10607      # First remove it from the list of overridden variables, so we can test
10608      # for unknown variables in the end.
10609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10610
10611      # Check if the provided tool contains a complete path.
10612      tool_specified="$UNIQ"
10613      tool_basename="${tool_specified##*/}"
10614      if test "x$tool_basename" = "x$tool_specified"; then
10615        # A command without a complete path is provided, search $PATH.
10616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10617$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10618        # Extract the first word of "$tool_basename", so it can be a program name with args.
10619set dummy $tool_basename; ac_word=$2
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10621$as_echo_n "checking for $ac_word... " >&6; }
10622if ${ac_cv_path_UNIQ+:} false; then :
10623  $as_echo_n "(cached) " >&6
10624else
10625  case $UNIQ in
10626  [\\/]* | ?:[\\/]*)
10627  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10628  ;;
10629  *)
10630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10631for as_dir in $PATH
10632do
10633  IFS=$as_save_IFS
10634  test -z "$as_dir" && as_dir=.
10635    for ac_exec_ext in '' $ac_executable_extensions; do
10636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10637    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10639    break 2
10640  fi
10641done
10642  done
10643IFS=$as_save_IFS
10644
10645  ;;
10646esac
10647fi
10648UNIQ=$ac_cv_path_UNIQ
10649if test -n "$UNIQ"; then
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10651$as_echo "$UNIQ" >&6; }
10652else
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
10655fi
10656
10657
10658        if test "x$UNIQ" = x; then
10659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10660        fi
10661      else
10662        # Otherwise we believe it is a complete path. Use it as it is.
10663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10664$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10666$as_echo_n "checking for UNIQ... " >&6; }
10667        if test ! -x "$tool_specified"; then
10668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10669$as_echo "not found" >&6; }
10670          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10671        fi
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10673$as_echo "$tool_specified" >&6; }
10674      fi
10675    fi
10676  fi
10677
10678
10679
10680  if test "x$UNIQ" = x; then
10681    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10682  fi
10683
10684
10685
10686
10687
10688  # Publish this variable in the help.
10689
10690
10691  if test "x$WC" = x; then
10692    # The variable is not set by user, try to locate tool using the code snippet
10693    for ac_prog in wc
10694do
10695  # Extract the first word of "$ac_prog", so it can be a program name with args.
10696set dummy $ac_prog; ac_word=$2
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10698$as_echo_n "checking for $ac_word... " >&6; }
10699if ${ac_cv_path_WC+:} false; then :
10700  $as_echo_n "(cached) " >&6
10701else
10702  case $WC in
10703  [\\/]* | ?:[\\/]*)
10704  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10705  ;;
10706  *)
10707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10708for as_dir in $PATH
10709do
10710  IFS=$as_save_IFS
10711  test -z "$as_dir" && as_dir=.
10712    for ac_exec_ext in '' $ac_executable_extensions; do
10713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10714    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10716    break 2
10717  fi
10718done
10719  done
10720IFS=$as_save_IFS
10721
10722  ;;
10723esac
10724fi
10725WC=$ac_cv_path_WC
10726if test -n "$WC"; then
10727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10728$as_echo "$WC" >&6; }
10729else
10730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10731$as_echo "no" >&6; }
10732fi
10733
10734
10735  test -n "$WC" && break
10736done
10737
10738  else
10739    # The variable is set, but is it from the command line or the environment?
10740
10741    # Try to remove the string !WC! from our list.
10742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10744      # If it failed, the variable was not from the command line. Ignore it,
10745      # but warn the user (except for BASH, which is always set by the calling BASH).
10746      if test "xWC" != xBASH; then
10747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10748$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10749      fi
10750      # Try to locate tool using the code snippet
10751      for ac_prog in wc
10752do
10753  # Extract the first word of "$ac_prog", so it can be a program name with args.
10754set dummy $ac_prog; ac_word=$2
10755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10756$as_echo_n "checking for $ac_word... " >&6; }
10757if ${ac_cv_path_WC+:} false; then :
10758  $as_echo_n "(cached) " >&6
10759else
10760  case $WC in
10761  [\\/]* | ?:[\\/]*)
10762  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10763  ;;
10764  *)
10765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10766for as_dir in $PATH
10767do
10768  IFS=$as_save_IFS
10769  test -z "$as_dir" && as_dir=.
10770    for ac_exec_ext in '' $ac_executable_extensions; do
10771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10772    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10774    break 2
10775  fi
10776done
10777  done
10778IFS=$as_save_IFS
10779
10780  ;;
10781esac
10782fi
10783WC=$ac_cv_path_WC
10784if test -n "$WC"; then
10785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10786$as_echo "$WC" >&6; }
10787else
10788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10789$as_echo "no" >&6; }
10790fi
10791
10792
10793  test -n "$WC" && break
10794done
10795
10796    else
10797      # If it succeeded, then it was overridden by the user. We will use it
10798      # for the tool.
10799
10800      # First remove it from the list of overridden variables, so we can test
10801      # for unknown variables in the end.
10802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10803
10804      # Check if the provided tool contains a complete path.
10805      tool_specified="$WC"
10806      tool_basename="${tool_specified##*/}"
10807      if test "x$tool_basename" = "x$tool_specified"; then
10808        # A command without a complete path is provided, search $PATH.
10809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10810$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10811        # Extract the first word of "$tool_basename", so it can be a program name with args.
10812set dummy $tool_basename; ac_word=$2
10813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10814$as_echo_n "checking for $ac_word... " >&6; }
10815if ${ac_cv_path_WC+:} false; then :
10816  $as_echo_n "(cached) " >&6
10817else
10818  case $WC in
10819  [\\/]* | ?:[\\/]*)
10820  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10821  ;;
10822  *)
10823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10824for as_dir in $PATH
10825do
10826  IFS=$as_save_IFS
10827  test -z "$as_dir" && as_dir=.
10828    for ac_exec_ext in '' $ac_executable_extensions; do
10829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10830    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10832    break 2
10833  fi
10834done
10835  done
10836IFS=$as_save_IFS
10837
10838  ;;
10839esac
10840fi
10841WC=$ac_cv_path_WC
10842if test -n "$WC"; then
10843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10844$as_echo "$WC" >&6; }
10845else
10846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847$as_echo "no" >&6; }
10848fi
10849
10850
10851        if test "x$WC" = x; then
10852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10853        fi
10854      else
10855        # Otherwise we believe it is a complete path. Use it as it is.
10856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10857$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10859$as_echo_n "checking for WC... " >&6; }
10860        if test ! -x "$tool_specified"; then
10861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10862$as_echo "not found" >&6; }
10863          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10864        fi
10865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10866$as_echo "$tool_specified" >&6; }
10867      fi
10868    fi
10869  fi
10870
10871
10872
10873  if test "x$WC" = x; then
10874    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10875  fi
10876
10877
10878
10879
10880
10881  # Publish this variable in the help.
10882
10883
10884  if test "x$WHICH" = x; then
10885    # The variable is not set by user, try to locate tool using the code snippet
10886    for ac_prog in which
10887do
10888  # Extract the first word of "$ac_prog", so it can be a program name with args.
10889set dummy $ac_prog; ac_word=$2
10890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10891$as_echo_n "checking for $ac_word... " >&6; }
10892if ${ac_cv_path_WHICH+:} false; then :
10893  $as_echo_n "(cached) " >&6
10894else
10895  case $WHICH in
10896  [\\/]* | ?:[\\/]*)
10897  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10898  ;;
10899  *)
10900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10901for as_dir in $PATH
10902do
10903  IFS=$as_save_IFS
10904  test -z "$as_dir" && as_dir=.
10905    for ac_exec_ext in '' $ac_executable_extensions; do
10906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10907    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10909    break 2
10910  fi
10911done
10912  done
10913IFS=$as_save_IFS
10914
10915  ;;
10916esac
10917fi
10918WHICH=$ac_cv_path_WHICH
10919if test -n "$WHICH"; then
10920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10921$as_echo "$WHICH" >&6; }
10922else
10923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10924$as_echo "no" >&6; }
10925fi
10926
10927
10928  test -n "$WHICH" && break
10929done
10930
10931  else
10932    # The variable is set, but is it from the command line or the environment?
10933
10934    # Try to remove the string !WHICH! from our list.
10935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10937      # If it failed, the variable was not from the command line. Ignore it,
10938      # but warn the user (except for BASH, which is always set by the calling BASH).
10939      if test "xWHICH" != xBASH; then
10940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10941$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10942      fi
10943      # Try to locate tool using the code snippet
10944      for ac_prog in which
10945do
10946  # Extract the first word of "$ac_prog", so it can be a program name with args.
10947set dummy $ac_prog; ac_word=$2
10948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10949$as_echo_n "checking for $ac_word... " >&6; }
10950if ${ac_cv_path_WHICH+:} false; then :
10951  $as_echo_n "(cached) " >&6
10952else
10953  case $WHICH in
10954  [\\/]* | ?:[\\/]*)
10955  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10956  ;;
10957  *)
10958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10959for as_dir in $PATH
10960do
10961  IFS=$as_save_IFS
10962  test -z "$as_dir" && as_dir=.
10963    for ac_exec_ext in '' $ac_executable_extensions; do
10964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10965    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10967    break 2
10968  fi
10969done
10970  done
10971IFS=$as_save_IFS
10972
10973  ;;
10974esac
10975fi
10976WHICH=$ac_cv_path_WHICH
10977if test -n "$WHICH"; then
10978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10979$as_echo "$WHICH" >&6; }
10980else
10981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10982$as_echo "no" >&6; }
10983fi
10984
10985
10986  test -n "$WHICH" && break
10987done
10988
10989    else
10990      # If it succeeded, then it was overridden by the user. We will use it
10991      # for the tool.
10992
10993      # First remove it from the list of overridden variables, so we can test
10994      # for unknown variables in the end.
10995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10996
10997      # Check if the provided tool contains a complete path.
10998      tool_specified="$WHICH"
10999      tool_basename="${tool_specified##*/}"
11000      if test "x$tool_basename" = "x$tool_specified"; then
11001        # A command without a complete path is provided, search $PATH.
11002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11003$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11004        # Extract the first word of "$tool_basename", so it can be a program name with args.
11005set dummy $tool_basename; ac_word=$2
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11007$as_echo_n "checking for $ac_word... " >&6; }
11008if ${ac_cv_path_WHICH+:} false; then :
11009  $as_echo_n "(cached) " >&6
11010else
11011  case $WHICH in
11012  [\\/]* | ?:[\\/]*)
11013  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11014  ;;
11015  *)
11016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11017for as_dir in $PATH
11018do
11019  IFS=$as_save_IFS
11020  test -z "$as_dir" && as_dir=.
11021    for ac_exec_ext in '' $ac_executable_extensions; do
11022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11023    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11025    break 2
11026  fi
11027done
11028  done
11029IFS=$as_save_IFS
11030
11031  ;;
11032esac
11033fi
11034WHICH=$ac_cv_path_WHICH
11035if test -n "$WHICH"; then
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11037$as_echo "$WHICH" >&6; }
11038else
11039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11040$as_echo "no" >&6; }
11041fi
11042
11043
11044        if test "x$WHICH" = x; then
11045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11046        fi
11047      else
11048        # Otherwise we believe it is a complete path. Use it as it is.
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11050$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11052$as_echo_n "checking for WHICH... " >&6; }
11053        if test ! -x "$tool_specified"; then
11054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11055$as_echo "not found" >&6; }
11056          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11057        fi
11058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11059$as_echo "$tool_specified" >&6; }
11060      fi
11061    fi
11062  fi
11063
11064
11065
11066  if test "x$WHICH" = x; then
11067    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11068  fi
11069
11070
11071
11072
11073
11074  # Publish this variable in the help.
11075
11076
11077  if test "x$XARGS" = x; then
11078    # The variable is not set by user, try to locate tool using the code snippet
11079    for ac_prog in xargs
11080do
11081  # Extract the first word of "$ac_prog", so it can be a program name with args.
11082set dummy $ac_prog; ac_word=$2
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084$as_echo_n "checking for $ac_word... " >&6; }
11085if ${ac_cv_path_XARGS+:} false; then :
11086  $as_echo_n "(cached) " >&6
11087else
11088  case $XARGS in
11089  [\\/]* | ?:[\\/]*)
11090  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11091  ;;
11092  *)
11093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098    for ac_exec_ext in '' $ac_executable_extensions; do
11099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102    break 2
11103  fi
11104done
11105  done
11106IFS=$as_save_IFS
11107
11108  ;;
11109esac
11110fi
11111XARGS=$ac_cv_path_XARGS
11112if test -n "$XARGS"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11114$as_echo "$XARGS" >&6; }
11115else
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
11118fi
11119
11120
11121  test -n "$XARGS" && break
11122done
11123
11124  else
11125    # The variable is set, but is it from the command line or the environment?
11126
11127    # Try to remove the string !XARGS! from our list.
11128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11130      # If it failed, the variable was not from the command line. Ignore it,
11131      # but warn the user (except for BASH, which is always set by the calling BASH).
11132      if test "xXARGS" != xBASH; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11134$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11135      fi
11136      # Try to locate tool using the code snippet
11137      for ac_prog in xargs
11138do
11139  # Extract the first word of "$ac_prog", so it can be a program name with args.
11140set dummy $ac_prog; ac_word=$2
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11142$as_echo_n "checking for $ac_word... " >&6; }
11143if ${ac_cv_path_XARGS+:} false; then :
11144  $as_echo_n "(cached) " >&6
11145else
11146  case $XARGS in
11147  [\\/]* | ?:[\\/]*)
11148  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11149  ;;
11150  *)
11151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11152for as_dir in $PATH
11153do
11154  IFS=$as_save_IFS
11155  test -z "$as_dir" && as_dir=.
11156    for ac_exec_ext in '' $ac_executable_extensions; do
11157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11158    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11160    break 2
11161  fi
11162done
11163  done
11164IFS=$as_save_IFS
11165
11166  ;;
11167esac
11168fi
11169XARGS=$ac_cv_path_XARGS
11170if test -n "$XARGS"; then
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11172$as_echo "$XARGS" >&6; }
11173else
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176fi
11177
11178
11179  test -n "$XARGS" && break
11180done
11181
11182    else
11183      # If it succeeded, then it was overridden by the user. We will use it
11184      # for the tool.
11185
11186      # First remove it from the list of overridden variables, so we can test
11187      # for unknown variables in the end.
11188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11189
11190      # Check if the provided tool contains a complete path.
11191      tool_specified="$XARGS"
11192      tool_basename="${tool_specified##*/}"
11193      if test "x$tool_basename" = "x$tool_specified"; then
11194        # A command without a complete path is provided, search $PATH.
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11196$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11197        # Extract the first word of "$tool_basename", so it can be a program name with args.
11198set dummy $tool_basename; ac_word=$2
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11200$as_echo_n "checking for $ac_word... " >&6; }
11201if ${ac_cv_path_XARGS+:} false; then :
11202  $as_echo_n "(cached) " >&6
11203else
11204  case $XARGS in
11205  [\\/]* | ?:[\\/]*)
11206  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11207  ;;
11208  *)
11209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11210for as_dir in $PATH
11211do
11212  IFS=$as_save_IFS
11213  test -z "$as_dir" && as_dir=.
11214    for ac_exec_ext in '' $ac_executable_extensions; do
11215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11216    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11218    break 2
11219  fi
11220done
11221  done
11222IFS=$as_save_IFS
11223
11224  ;;
11225esac
11226fi
11227XARGS=$ac_cv_path_XARGS
11228if test -n "$XARGS"; then
11229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11230$as_echo "$XARGS" >&6; }
11231else
11232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
11234fi
11235
11236
11237        if test "x$XARGS" = x; then
11238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11239        fi
11240      else
11241        # Otherwise we believe it is a complete path. Use it as it is.
11242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11243$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11245$as_echo_n "checking for XARGS... " >&6; }
11246        if test ! -x "$tool_specified"; then
11247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11248$as_echo "not found" >&6; }
11249          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11250        fi
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11252$as_echo "$tool_specified" >&6; }
11253      fi
11254    fi
11255  fi
11256
11257
11258
11259  if test "x$XARGS" = x; then
11260    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11261  fi
11262
11263
11264
11265  # Then required tools that require some special treatment.
11266
11267
11268  # Publish this variable in the help.
11269
11270
11271  if test "x$AWK" = x; then
11272    # The variable is not set by user, try to locate tool using the code snippet
11273    for ac_prog in gawk mawk nawk awk
11274do
11275  # Extract the first word of "$ac_prog", so it can be a program name with args.
11276set dummy $ac_prog; ac_word=$2
11277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11278$as_echo_n "checking for $ac_word... " >&6; }
11279if ${ac_cv_prog_AWK+:} false; then :
11280  $as_echo_n "(cached) " >&6
11281else
11282  if test -n "$AWK"; then
11283  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11284else
11285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11286for as_dir in $PATH
11287do
11288  IFS=$as_save_IFS
11289  test -z "$as_dir" && as_dir=.
11290    for ac_exec_ext in '' $ac_executable_extensions; do
11291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11292    ac_cv_prog_AWK="$ac_prog"
11293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11294    break 2
11295  fi
11296done
11297  done
11298IFS=$as_save_IFS
11299
11300fi
11301fi
11302AWK=$ac_cv_prog_AWK
11303if test -n "$AWK"; then
11304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11305$as_echo "$AWK" >&6; }
11306else
11307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308$as_echo "no" >&6; }
11309fi
11310
11311
11312  test -n "$AWK" && break
11313done
11314
11315  else
11316    # The variable is set, but is it from the command line or the environment?
11317
11318    # Try to remove the string !AWK! from our list.
11319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11321      # If it failed, the variable was not from the command line. Ignore it,
11322      # but warn the user (except for BASH, which is always set by the calling BASH).
11323      if test "xAWK" != xBASH; then
11324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11325$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11326      fi
11327      # Try to locate tool using the code snippet
11328      for ac_prog in gawk mawk nawk awk
11329do
11330  # Extract the first word of "$ac_prog", so it can be a program name with args.
11331set dummy $ac_prog; ac_word=$2
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11333$as_echo_n "checking for $ac_word... " >&6; }
11334if ${ac_cv_prog_AWK+:} false; then :
11335  $as_echo_n "(cached) " >&6
11336else
11337  if test -n "$AWK"; then
11338  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11339else
11340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11341for as_dir in $PATH
11342do
11343  IFS=$as_save_IFS
11344  test -z "$as_dir" && as_dir=.
11345    for ac_exec_ext in '' $ac_executable_extensions; do
11346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11347    ac_cv_prog_AWK="$ac_prog"
11348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11349    break 2
11350  fi
11351done
11352  done
11353IFS=$as_save_IFS
11354
11355fi
11356fi
11357AWK=$ac_cv_prog_AWK
11358if test -n "$AWK"; then
11359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11360$as_echo "$AWK" >&6; }
11361else
11362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363$as_echo "no" >&6; }
11364fi
11365
11366
11367  test -n "$AWK" && break
11368done
11369
11370    else
11371      # If it succeeded, then it was overridden by the user. We will use it
11372      # for the tool.
11373
11374      # First remove it from the list of overridden variables, so we can test
11375      # for unknown variables in the end.
11376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11377
11378      # Check if the provided tool contains a complete path.
11379      tool_specified="$AWK"
11380      tool_basename="${tool_specified##*/}"
11381      if test "x$tool_basename" = "x$tool_specified"; then
11382        # A command without a complete path is provided, search $PATH.
11383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11384$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11385        # Extract the first word of "$tool_basename", so it can be a program name with args.
11386set dummy $tool_basename; ac_word=$2
11387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11388$as_echo_n "checking for $ac_word... " >&6; }
11389if ${ac_cv_path_AWK+:} false; then :
11390  $as_echo_n "(cached) " >&6
11391else
11392  case $AWK in
11393  [\\/]* | ?:[\\/]*)
11394  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11395  ;;
11396  *)
11397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11398for as_dir in $PATH
11399do
11400  IFS=$as_save_IFS
11401  test -z "$as_dir" && as_dir=.
11402    for ac_exec_ext in '' $ac_executable_extensions; do
11403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11404    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11406    break 2
11407  fi
11408done
11409  done
11410IFS=$as_save_IFS
11411
11412  ;;
11413esac
11414fi
11415AWK=$ac_cv_path_AWK
11416if test -n "$AWK"; then
11417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11418$as_echo "$AWK" >&6; }
11419else
11420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11421$as_echo "no" >&6; }
11422fi
11423
11424
11425        if test "x$AWK" = x; then
11426          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11427        fi
11428      else
11429        # Otherwise we believe it is a complete path. Use it as it is.
11430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11431$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11433$as_echo_n "checking for AWK... " >&6; }
11434        if test ! -x "$tool_specified"; then
11435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11436$as_echo "not found" >&6; }
11437          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11438        fi
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11440$as_echo "$tool_specified" >&6; }
11441      fi
11442    fi
11443  fi
11444
11445
11446  if test "x$AWK" = x; then
11447    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11448  fi
11449
11450
11451
11452
11453  # Publish this variable in the help.
11454
11455
11456  if test "x$GREP" = x; then
11457    # The variable is not set by user, try to locate tool using the code snippet
11458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11459$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11460if ${ac_cv_path_GREP+:} false; then :
11461  $as_echo_n "(cached) " >&6
11462else
11463  if test -z "$GREP"; then
11464  ac_path_GREP_found=false
11465  # Loop through the user's path and test for each of PROGNAME-LIST
11466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11467for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11468do
11469  IFS=$as_save_IFS
11470  test -z "$as_dir" && as_dir=.
11471    for ac_prog in grep ggrep; do
11472    for ac_exec_ext in '' $ac_executable_extensions; do
11473      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11474      as_fn_executable_p "$ac_path_GREP" || continue
11475# Check for GNU ac_path_GREP and select it if it is found.
11476  # Check for GNU $ac_path_GREP
11477case `"$ac_path_GREP" --version 2>&1` in
11478*GNU*)
11479  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11480*)
11481  ac_count=0
11482  $as_echo_n 0123456789 >"conftest.in"
11483  while :
11484  do
11485    cat "conftest.in" "conftest.in" >"conftest.tmp"
11486    mv "conftest.tmp" "conftest.in"
11487    cp "conftest.in" "conftest.nl"
11488    $as_echo 'GREP' >> "conftest.nl"
11489    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11490    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11491    as_fn_arith $ac_count + 1 && ac_count=$as_val
11492    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11493      # Best one so far, save it but keep looking for a better one
11494      ac_cv_path_GREP="$ac_path_GREP"
11495      ac_path_GREP_max=$ac_count
11496    fi
11497    # 10*(2^10) chars as input seems more than enough
11498    test $ac_count -gt 10 && break
11499  done
11500  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11501esac
11502
11503      $ac_path_GREP_found && break 3
11504    done
11505  done
11506  done
11507IFS=$as_save_IFS
11508  if test -z "$ac_cv_path_GREP"; then
11509    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11510  fi
11511else
11512  ac_cv_path_GREP=$GREP
11513fi
11514
11515fi
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11517$as_echo "$ac_cv_path_GREP" >&6; }
11518 GREP="$ac_cv_path_GREP"
11519
11520
11521  else
11522    # The variable is set, but is it from the command line or the environment?
11523
11524    # Try to remove the string !GREP! from our list.
11525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11527      # If it failed, the variable was not from the command line. Ignore it,
11528      # but warn the user (except for BASH, which is always set by the calling BASH).
11529      if test "xGREP" != xBASH; then
11530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11531$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11532      fi
11533      # Try to locate tool using the code snippet
11534      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11535$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11536if ${ac_cv_path_GREP+:} false; then :
11537  $as_echo_n "(cached) " >&6
11538else
11539  if test -z "$GREP"; then
11540  ac_path_GREP_found=false
11541  # Loop through the user's path and test for each of PROGNAME-LIST
11542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11543for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11544do
11545  IFS=$as_save_IFS
11546  test -z "$as_dir" && as_dir=.
11547    for ac_prog in grep ggrep; do
11548    for ac_exec_ext in '' $ac_executable_extensions; do
11549      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11550      as_fn_executable_p "$ac_path_GREP" || continue
11551# Check for GNU ac_path_GREP and select it if it is found.
11552  # Check for GNU $ac_path_GREP
11553case `"$ac_path_GREP" --version 2>&1` in
11554*GNU*)
11555  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11556*)
11557  ac_count=0
11558  $as_echo_n 0123456789 >"conftest.in"
11559  while :
11560  do
11561    cat "conftest.in" "conftest.in" >"conftest.tmp"
11562    mv "conftest.tmp" "conftest.in"
11563    cp "conftest.in" "conftest.nl"
11564    $as_echo 'GREP' >> "conftest.nl"
11565    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11566    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11567    as_fn_arith $ac_count + 1 && ac_count=$as_val
11568    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11569      # Best one so far, save it but keep looking for a better one
11570      ac_cv_path_GREP="$ac_path_GREP"
11571      ac_path_GREP_max=$ac_count
11572    fi
11573    # 10*(2^10) chars as input seems more than enough
11574    test $ac_count -gt 10 && break
11575  done
11576  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11577esac
11578
11579      $ac_path_GREP_found && break 3
11580    done
11581  done
11582  done
11583IFS=$as_save_IFS
11584  if test -z "$ac_cv_path_GREP"; then
11585    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11586  fi
11587else
11588  ac_cv_path_GREP=$GREP
11589fi
11590
11591fi
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11593$as_echo "$ac_cv_path_GREP" >&6; }
11594 GREP="$ac_cv_path_GREP"
11595
11596
11597    else
11598      # If it succeeded, then it was overridden by the user. We will use it
11599      # for the tool.
11600
11601      # First remove it from the list of overridden variables, so we can test
11602      # for unknown variables in the end.
11603      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11604
11605      # Check if the provided tool contains a complete path.
11606      tool_specified="$GREP"
11607      tool_basename="${tool_specified##*/}"
11608      if test "x$tool_basename" = "x$tool_specified"; then
11609        # A command without a complete path is provided, search $PATH.
11610        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11611$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11612        # Extract the first word of "$tool_basename", so it can be a program name with args.
11613set dummy $tool_basename; ac_word=$2
11614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11615$as_echo_n "checking for $ac_word... " >&6; }
11616if ${ac_cv_path_GREP+:} false; then :
11617  $as_echo_n "(cached) " >&6
11618else
11619  case $GREP in
11620  [\\/]* | ?:[\\/]*)
11621  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11622  ;;
11623  *)
11624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11625for as_dir in $PATH
11626do
11627  IFS=$as_save_IFS
11628  test -z "$as_dir" && as_dir=.
11629    for ac_exec_ext in '' $ac_executable_extensions; do
11630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11631    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11633    break 2
11634  fi
11635done
11636  done
11637IFS=$as_save_IFS
11638
11639  ;;
11640esac
11641fi
11642GREP=$ac_cv_path_GREP
11643if test -n "$GREP"; then
11644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11645$as_echo "$GREP" >&6; }
11646else
11647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648$as_echo "no" >&6; }
11649fi
11650
11651
11652        if test "x$GREP" = x; then
11653          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11654        fi
11655      else
11656        # Otherwise we believe it is a complete path. Use it as it is.
11657        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11658$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11660$as_echo_n "checking for GREP... " >&6; }
11661        if test ! -x "$tool_specified"; then
11662          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11663$as_echo "not found" >&6; }
11664          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11665        fi
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11667$as_echo "$tool_specified" >&6; }
11668      fi
11669    fi
11670  fi
11671
11672
11673  if test "x$GREP" = x; then
11674    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11675  fi
11676
11677
11678
11679
11680  # Publish this variable in the help.
11681
11682
11683  if test "x$EGREP" = x; then
11684    # The variable is not set by user, try to locate tool using the code snippet
11685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11686$as_echo_n "checking for egrep... " >&6; }
11687if ${ac_cv_path_EGREP+:} false; then :
11688  $as_echo_n "(cached) " >&6
11689else
11690  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11691   then ac_cv_path_EGREP="$GREP -E"
11692   else
11693     if test -z "$EGREP"; then
11694  ac_path_EGREP_found=false
11695  # Loop through the user's path and test for each of PROGNAME-LIST
11696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11697for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11698do
11699  IFS=$as_save_IFS
11700  test -z "$as_dir" && as_dir=.
11701    for ac_prog in egrep; do
11702    for ac_exec_ext in '' $ac_executable_extensions; do
11703      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11704      as_fn_executable_p "$ac_path_EGREP" || continue
11705# Check for GNU ac_path_EGREP and select it if it is found.
11706  # Check for GNU $ac_path_EGREP
11707case `"$ac_path_EGREP" --version 2>&1` in
11708*GNU*)
11709  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11710*)
11711  ac_count=0
11712  $as_echo_n 0123456789 >"conftest.in"
11713  while :
11714  do
11715    cat "conftest.in" "conftest.in" >"conftest.tmp"
11716    mv "conftest.tmp" "conftest.in"
11717    cp "conftest.in" "conftest.nl"
11718    $as_echo 'EGREP' >> "conftest.nl"
11719    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11720    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11721    as_fn_arith $ac_count + 1 && ac_count=$as_val
11722    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11723      # Best one so far, save it but keep looking for a better one
11724      ac_cv_path_EGREP="$ac_path_EGREP"
11725      ac_path_EGREP_max=$ac_count
11726    fi
11727    # 10*(2^10) chars as input seems more than enough
11728    test $ac_count -gt 10 && break
11729  done
11730  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11731esac
11732
11733      $ac_path_EGREP_found && break 3
11734    done
11735  done
11736  done
11737IFS=$as_save_IFS
11738  if test -z "$ac_cv_path_EGREP"; then
11739    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11740  fi
11741else
11742  ac_cv_path_EGREP=$EGREP
11743fi
11744
11745   fi
11746fi
11747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11748$as_echo "$ac_cv_path_EGREP" >&6; }
11749 EGREP="$ac_cv_path_EGREP"
11750
11751
11752  else
11753    # The variable is set, but is it from the command line or the environment?
11754
11755    # Try to remove the string !EGREP! from our list.
11756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11758      # If it failed, the variable was not from the command line. Ignore it,
11759      # but warn the user (except for BASH, which is always set by the calling BASH).
11760      if test "xEGREP" != xBASH; then
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11762$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11763      fi
11764      # Try to locate tool using the code snippet
11765      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11766$as_echo_n "checking for egrep... " >&6; }
11767if ${ac_cv_path_EGREP+:} false; then :
11768  $as_echo_n "(cached) " >&6
11769else
11770  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11771   then ac_cv_path_EGREP="$GREP -E"
11772   else
11773     if test -z "$EGREP"; then
11774  ac_path_EGREP_found=false
11775  # Loop through the user's path and test for each of PROGNAME-LIST
11776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11777for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11778do
11779  IFS=$as_save_IFS
11780  test -z "$as_dir" && as_dir=.
11781    for ac_prog in egrep; do
11782    for ac_exec_ext in '' $ac_executable_extensions; do
11783      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11784      as_fn_executable_p "$ac_path_EGREP" || continue
11785# Check for GNU ac_path_EGREP and select it if it is found.
11786  # Check for GNU $ac_path_EGREP
11787case `"$ac_path_EGREP" --version 2>&1` in
11788*GNU*)
11789  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11790*)
11791  ac_count=0
11792  $as_echo_n 0123456789 >"conftest.in"
11793  while :
11794  do
11795    cat "conftest.in" "conftest.in" >"conftest.tmp"
11796    mv "conftest.tmp" "conftest.in"
11797    cp "conftest.in" "conftest.nl"
11798    $as_echo 'EGREP' >> "conftest.nl"
11799    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11800    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11801    as_fn_arith $ac_count + 1 && ac_count=$as_val
11802    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11803      # Best one so far, save it but keep looking for a better one
11804      ac_cv_path_EGREP="$ac_path_EGREP"
11805      ac_path_EGREP_max=$ac_count
11806    fi
11807    # 10*(2^10) chars as input seems more than enough
11808    test $ac_count -gt 10 && break
11809  done
11810  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11811esac
11812
11813      $ac_path_EGREP_found && break 3
11814    done
11815  done
11816  done
11817IFS=$as_save_IFS
11818  if test -z "$ac_cv_path_EGREP"; then
11819    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11820  fi
11821else
11822  ac_cv_path_EGREP=$EGREP
11823fi
11824
11825   fi
11826fi
11827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11828$as_echo "$ac_cv_path_EGREP" >&6; }
11829 EGREP="$ac_cv_path_EGREP"
11830
11831
11832    else
11833      # If it succeeded, then it was overridden by the user. We will use it
11834      # for the tool.
11835
11836      # First remove it from the list of overridden variables, so we can test
11837      # for unknown variables in the end.
11838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11839
11840      # Check if the provided tool contains a complete path.
11841      tool_specified="$EGREP"
11842      tool_basename="${tool_specified##*/}"
11843      if test "x$tool_basename" = "x$tool_specified"; then
11844        # A command without a complete path is provided, search $PATH.
11845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11846$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11847        # Extract the first word of "$tool_basename", so it can be a program name with args.
11848set dummy $tool_basename; ac_word=$2
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11850$as_echo_n "checking for $ac_word... " >&6; }
11851if ${ac_cv_path_EGREP+:} false; then :
11852  $as_echo_n "(cached) " >&6
11853else
11854  case $EGREP in
11855  [\\/]* | ?:[\\/]*)
11856  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11857  ;;
11858  *)
11859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11860for as_dir in $PATH
11861do
11862  IFS=$as_save_IFS
11863  test -z "$as_dir" && as_dir=.
11864    for ac_exec_ext in '' $ac_executable_extensions; do
11865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11866    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11868    break 2
11869  fi
11870done
11871  done
11872IFS=$as_save_IFS
11873
11874  ;;
11875esac
11876fi
11877EGREP=$ac_cv_path_EGREP
11878if test -n "$EGREP"; then
11879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11880$as_echo "$EGREP" >&6; }
11881else
11882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11883$as_echo "no" >&6; }
11884fi
11885
11886
11887        if test "x$EGREP" = x; then
11888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11889        fi
11890      else
11891        # Otherwise we believe it is a complete path. Use it as it is.
11892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11893$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11895$as_echo_n "checking for EGREP... " >&6; }
11896        if test ! -x "$tool_specified"; then
11897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11898$as_echo "not found" >&6; }
11899          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11900        fi
11901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11902$as_echo "$tool_specified" >&6; }
11903      fi
11904    fi
11905  fi
11906
11907
11908  if test "x$EGREP" = x; then
11909    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11910  fi
11911
11912
11913
11914
11915  # Publish this variable in the help.
11916
11917
11918  if test "x$FGREP" = x; then
11919    # The variable is not set by user, try to locate tool using the code snippet
11920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11921$as_echo_n "checking for fgrep... " >&6; }
11922if ${ac_cv_path_FGREP+:} false; then :
11923  $as_echo_n "(cached) " >&6
11924else
11925  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11926   then ac_cv_path_FGREP="$GREP -F"
11927   else
11928     if test -z "$FGREP"; then
11929  ac_path_FGREP_found=false
11930  # Loop through the user's path and test for each of PROGNAME-LIST
11931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11932for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11933do
11934  IFS=$as_save_IFS
11935  test -z "$as_dir" && as_dir=.
11936    for ac_prog in fgrep; do
11937    for ac_exec_ext in '' $ac_executable_extensions; do
11938      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11939      as_fn_executable_p "$ac_path_FGREP" || continue
11940# Check for GNU ac_path_FGREP and select it if it is found.
11941  # Check for GNU $ac_path_FGREP
11942case `"$ac_path_FGREP" --version 2>&1` in
11943*GNU*)
11944  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11945*)
11946  ac_count=0
11947  $as_echo_n 0123456789 >"conftest.in"
11948  while :
11949  do
11950    cat "conftest.in" "conftest.in" >"conftest.tmp"
11951    mv "conftest.tmp" "conftest.in"
11952    cp "conftest.in" "conftest.nl"
11953    $as_echo 'FGREP' >> "conftest.nl"
11954    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11955    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11956    as_fn_arith $ac_count + 1 && ac_count=$as_val
11957    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11958      # Best one so far, save it but keep looking for a better one
11959      ac_cv_path_FGREP="$ac_path_FGREP"
11960      ac_path_FGREP_max=$ac_count
11961    fi
11962    # 10*(2^10) chars as input seems more than enough
11963    test $ac_count -gt 10 && break
11964  done
11965  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11966esac
11967
11968      $ac_path_FGREP_found && break 3
11969    done
11970  done
11971  done
11972IFS=$as_save_IFS
11973  if test -z "$ac_cv_path_FGREP"; then
11974    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11975  fi
11976else
11977  ac_cv_path_FGREP=$FGREP
11978fi
11979
11980   fi
11981fi
11982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11983$as_echo "$ac_cv_path_FGREP" >&6; }
11984 FGREP="$ac_cv_path_FGREP"
11985
11986
11987  else
11988    # The variable is set, but is it from the command line or the environment?
11989
11990    # Try to remove the string !FGREP! from our list.
11991    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
11992    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11993      # If it failed, the variable was not from the command line. Ignore it,
11994      # but warn the user (except for BASH, which is always set by the calling BASH).
11995      if test "xFGREP" != xBASH; then
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
11997$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
11998      fi
11999      # Try to locate tool using the code snippet
12000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12001$as_echo_n "checking for fgrep... " >&6; }
12002if ${ac_cv_path_FGREP+:} false; then :
12003  $as_echo_n "(cached) " >&6
12004else
12005  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12006   then ac_cv_path_FGREP="$GREP -F"
12007   else
12008     if test -z "$FGREP"; then
12009  ac_path_FGREP_found=false
12010  # Loop through the user's path and test for each of PROGNAME-LIST
12011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12012for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12013do
12014  IFS=$as_save_IFS
12015  test -z "$as_dir" && as_dir=.
12016    for ac_prog in fgrep; do
12017    for ac_exec_ext in '' $ac_executable_extensions; do
12018      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12019      as_fn_executable_p "$ac_path_FGREP" || continue
12020# Check for GNU ac_path_FGREP and select it if it is found.
12021  # Check for GNU $ac_path_FGREP
12022case `"$ac_path_FGREP" --version 2>&1` in
12023*GNU*)
12024  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12025*)
12026  ac_count=0
12027  $as_echo_n 0123456789 >"conftest.in"
12028  while :
12029  do
12030    cat "conftest.in" "conftest.in" >"conftest.tmp"
12031    mv "conftest.tmp" "conftest.in"
12032    cp "conftest.in" "conftest.nl"
12033    $as_echo 'FGREP' >> "conftest.nl"
12034    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12035    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12036    as_fn_arith $ac_count + 1 && ac_count=$as_val
12037    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12038      # Best one so far, save it but keep looking for a better one
12039      ac_cv_path_FGREP="$ac_path_FGREP"
12040      ac_path_FGREP_max=$ac_count
12041    fi
12042    # 10*(2^10) chars as input seems more than enough
12043    test $ac_count -gt 10 && break
12044  done
12045  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12046esac
12047
12048      $ac_path_FGREP_found && break 3
12049    done
12050  done
12051  done
12052IFS=$as_save_IFS
12053  if test -z "$ac_cv_path_FGREP"; then
12054    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12055  fi
12056else
12057  ac_cv_path_FGREP=$FGREP
12058fi
12059
12060   fi
12061fi
12062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12063$as_echo "$ac_cv_path_FGREP" >&6; }
12064 FGREP="$ac_cv_path_FGREP"
12065
12066
12067    else
12068      # If it succeeded, then it was overridden by the user. We will use it
12069      # for the tool.
12070
12071      # First remove it from the list of overridden variables, so we can test
12072      # for unknown variables in the end.
12073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12074
12075      # Check if the provided tool contains a complete path.
12076      tool_specified="$FGREP"
12077      tool_basename="${tool_specified##*/}"
12078      if test "x$tool_basename" = "x$tool_specified"; then
12079        # A command without a complete path is provided, search $PATH.
12080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12081$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12082        # Extract the first word of "$tool_basename", so it can be a program name with args.
12083set dummy $tool_basename; ac_word=$2
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12085$as_echo_n "checking for $ac_word... " >&6; }
12086if ${ac_cv_path_FGREP+:} false; then :
12087  $as_echo_n "(cached) " >&6
12088else
12089  case $FGREP in
12090  [\\/]* | ?:[\\/]*)
12091  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12092  ;;
12093  *)
12094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12095for as_dir in $PATH
12096do
12097  IFS=$as_save_IFS
12098  test -z "$as_dir" && as_dir=.
12099    for ac_exec_ext in '' $ac_executable_extensions; do
12100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12101    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12103    break 2
12104  fi
12105done
12106  done
12107IFS=$as_save_IFS
12108
12109  ;;
12110esac
12111fi
12112FGREP=$ac_cv_path_FGREP
12113if test -n "$FGREP"; then
12114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12115$as_echo "$FGREP" >&6; }
12116else
12117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12118$as_echo "no" >&6; }
12119fi
12120
12121
12122        if test "x$FGREP" = x; then
12123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12124        fi
12125      else
12126        # Otherwise we believe it is a complete path. Use it as it is.
12127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12128$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12130$as_echo_n "checking for FGREP... " >&6; }
12131        if test ! -x "$tool_specified"; then
12132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12133$as_echo "not found" >&6; }
12134          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12135        fi
12136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12137$as_echo "$tool_specified" >&6; }
12138      fi
12139    fi
12140  fi
12141
12142
12143  if test "x$FGREP" = x; then
12144    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12145  fi
12146
12147
12148
12149
12150  # Publish this variable in the help.
12151
12152
12153  if test "x$SED" = x; then
12154    # The variable is not set by user, try to locate tool using the code snippet
12155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12156$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12157if ${ac_cv_path_SED+:} false; then :
12158  $as_echo_n "(cached) " >&6
12159else
12160            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12161     for ac_i in 1 2 3 4 5 6 7; do
12162       ac_script="$ac_script$as_nl$ac_script"
12163     done
12164     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12165     { ac_script=; unset ac_script;}
12166     if test -z "$SED"; then
12167  ac_path_SED_found=false
12168  # Loop through the user's path and test for each of PROGNAME-LIST
12169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12170for as_dir in $PATH
12171do
12172  IFS=$as_save_IFS
12173  test -z "$as_dir" && as_dir=.
12174    for ac_prog in sed gsed; do
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12177      as_fn_executable_p "$ac_path_SED" || continue
12178# Check for GNU ac_path_SED and select it if it is found.
12179  # Check for GNU $ac_path_SED
12180case `"$ac_path_SED" --version 2>&1` in
12181*GNU*)
12182  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12183*)
12184  ac_count=0
12185  $as_echo_n 0123456789 >"conftest.in"
12186  while :
12187  do
12188    cat "conftest.in" "conftest.in" >"conftest.tmp"
12189    mv "conftest.tmp" "conftest.in"
12190    cp "conftest.in" "conftest.nl"
12191    $as_echo '' >> "conftest.nl"
12192    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12193    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12194    as_fn_arith $ac_count + 1 && ac_count=$as_val
12195    if test $ac_count -gt ${ac_path_SED_max-0}; then
12196      # Best one so far, save it but keep looking for a better one
12197      ac_cv_path_SED="$ac_path_SED"
12198      ac_path_SED_max=$ac_count
12199    fi
12200    # 10*(2^10) chars as input seems more than enough
12201    test $ac_count -gt 10 && break
12202  done
12203  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12204esac
12205
12206      $ac_path_SED_found && break 3
12207    done
12208  done
12209  done
12210IFS=$as_save_IFS
12211  if test -z "$ac_cv_path_SED"; then
12212    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12213  fi
12214else
12215  ac_cv_path_SED=$SED
12216fi
12217
12218fi
12219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12220$as_echo "$ac_cv_path_SED" >&6; }
12221 SED="$ac_cv_path_SED"
12222  rm -f conftest.sed
12223
12224  else
12225    # The variable is set, but is it from the command line or the environment?
12226
12227    # Try to remove the string !SED! from our list.
12228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12230      # If it failed, the variable was not from the command line. Ignore it,
12231      # but warn the user (except for BASH, which is always set by the calling BASH).
12232      if test "xSED" != xBASH; then
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12234$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12235      fi
12236      # Try to locate tool using the code snippet
12237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12238$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12239if ${ac_cv_path_SED+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12243     for ac_i in 1 2 3 4 5 6 7; do
12244       ac_script="$ac_script$as_nl$ac_script"
12245     done
12246     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12247     { ac_script=; unset ac_script;}
12248     if test -z "$SED"; then
12249  ac_path_SED_found=false
12250  # Loop through the user's path and test for each of PROGNAME-LIST
12251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12252for as_dir in $PATH
12253do
12254  IFS=$as_save_IFS
12255  test -z "$as_dir" && as_dir=.
12256    for ac_prog in sed gsed; do
12257    for ac_exec_ext in '' $ac_executable_extensions; do
12258      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12259      as_fn_executable_p "$ac_path_SED" || continue
12260# Check for GNU ac_path_SED and select it if it is found.
12261  # Check for GNU $ac_path_SED
12262case `"$ac_path_SED" --version 2>&1` in
12263*GNU*)
12264  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12265*)
12266  ac_count=0
12267  $as_echo_n 0123456789 >"conftest.in"
12268  while :
12269  do
12270    cat "conftest.in" "conftest.in" >"conftest.tmp"
12271    mv "conftest.tmp" "conftest.in"
12272    cp "conftest.in" "conftest.nl"
12273    $as_echo '' >> "conftest.nl"
12274    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12275    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12276    as_fn_arith $ac_count + 1 && ac_count=$as_val
12277    if test $ac_count -gt ${ac_path_SED_max-0}; then
12278      # Best one so far, save it but keep looking for a better one
12279      ac_cv_path_SED="$ac_path_SED"
12280      ac_path_SED_max=$ac_count
12281    fi
12282    # 10*(2^10) chars as input seems more than enough
12283    test $ac_count -gt 10 && break
12284  done
12285  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12286esac
12287
12288      $ac_path_SED_found && break 3
12289    done
12290  done
12291  done
12292IFS=$as_save_IFS
12293  if test -z "$ac_cv_path_SED"; then
12294    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12295  fi
12296else
12297  ac_cv_path_SED=$SED
12298fi
12299
12300fi
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12302$as_echo "$ac_cv_path_SED" >&6; }
12303 SED="$ac_cv_path_SED"
12304  rm -f conftest.sed
12305
12306    else
12307      # If it succeeded, then it was overridden by the user. We will use it
12308      # for the tool.
12309
12310      # First remove it from the list of overridden variables, so we can test
12311      # for unknown variables in the end.
12312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12313
12314      # Check if the provided tool contains a complete path.
12315      tool_specified="$SED"
12316      tool_basename="${tool_specified##*/}"
12317      if test "x$tool_basename" = "x$tool_specified"; then
12318        # A command without a complete path is provided, search $PATH.
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12320$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12321        # Extract the first word of "$tool_basename", so it can be a program name with args.
12322set dummy $tool_basename; ac_word=$2
12323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12324$as_echo_n "checking for $ac_word... " >&6; }
12325if ${ac_cv_path_SED+:} false; then :
12326  $as_echo_n "(cached) " >&6
12327else
12328  case $SED in
12329  [\\/]* | ?:[\\/]*)
12330  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12331  ;;
12332  *)
12333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12334for as_dir in $PATH
12335do
12336  IFS=$as_save_IFS
12337  test -z "$as_dir" && as_dir=.
12338    for ac_exec_ext in '' $ac_executable_extensions; do
12339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12340    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12342    break 2
12343  fi
12344done
12345  done
12346IFS=$as_save_IFS
12347
12348  ;;
12349esac
12350fi
12351SED=$ac_cv_path_SED
12352if test -n "$SED"; then
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12354$as_echo "$SED" >&6; }
12355else
12356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12357$as_echo "no" >&6; }
12358fi
12359
12360
12361        if test "x$SED" = x; then
12362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12363        fi
12364      else
12365        # Otherwise we believe it is a complete path. Use it as it is.
12366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12367$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12369$as_echo_n "checking for SED... " >&6; }
12370        if test ! -x "$tool_specified"; then
12371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12372$as_echo "not found" >&6; }
12373          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12374        fi
12375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12376$as_echo "$tool_specified" >&6; }
12377      fi
12378    fi
12379  fi
12380
12381
12382  if test "x$SED" = x; then
12383    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12384  fi
12385
12386
12387
12388  # Always force rm.
12389  RM="$RM -f"
12390
12391  # pwd behaves differently on various platforms and some don't support the -L flag.
12392  # Always use the bash builtin pwd to get uniform behavior.
12393  THEPWDCMD=pwd
12394
12395  # These are not required on all platforms
12396
12397
12398  # Publish this variable in the help.
12399
12400
12401  if test "x$CYGPATH" = x; then
12402    # The variable is not set by user, try to locate tool using the code snippet
12403    for ac_prog in cygpath
12404do
12405  # Extract the first word of "$ac_prog", so it can be a program name with args.
12406set dummy $ac_prog; ac_word=$2
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12408$as_echo_n "checking for $ac_word... " >&6; }
12409if ${ac_cv_path_CYGPATH+:} false; then :
12410  $as_echo_n "(cached) " >&6
12411else
12412  case $CYGPATH in
12413  [\\/]* | ?:[\\/]*)
12414  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12415  ;;
12416  *)
12417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12418for as_dir in $PATH
12419do
12420  IFS=$as_save_IFS
12421  test -z "$as_dir" && as_dir=.
12422    for ac_exec_ext in '' $ac_executable_extensions; do
12423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12424    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12426    break 2
12427  fi
12428done
12429  done
12430IFS=$as_save_IFS
12431
12432  ;;
12433esac
12434fi
12435CYGPATH=$ac_cv_path_CYGPATH
12436if test -n "$CYGPATH"; then
12437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12438$as_echo "$CYGPATH" >&6; }
12439else
12440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12441$as_echo "no" >&6; }
12442fi
12443
12444
12445  test -n "$CYGPATH" && break
12446done
12447
12448  else
12449    # The variable is set, but is it from the command line or the environment?
12450
12451    # Try to remove the string !CYGPATH! from our list.
12452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12454      # If it failed, the variable was not from the command line. Ignore it,
12455      # but warn the user (except for BASH, which is always set by the calling BASH).
12456      if test "xCYGPATH" != xBASH; then
12457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12458$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12459      fi
12460      # Try to locate tool using the code snippet
12461      for ac_prog in cygpath
12462do
12463  # Extract the first word of "$ac_prog", so it can be a program name with args.
12464set dummy $ac_prog; ac_word=$2
12465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12466$as_echo_n "checking for $ac_word... " >&6; }
12467if ${ac_cv_path_CYGPATH+:} false; then :
12468  $as_echo_n "(cached) " >&6
12469else
12470  case $CYGPATH in
12471  [\\/]* | ?:[\\/]*)
12472  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12473  ;;
12474  *)
12475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12476for as_dir in $PATH
12477do
12478  IFS=$as_save_IFS
12479  test -z "$as_dir" && as_dir=.
12480    for ac_exec_ext in '' $ac_executable_extensions; do
12481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12482    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12484    break 2
12485  fi
12486done
12487  done
12488IFS=$as_save_IFS
12489
12490  ;;
12491esac
12492fi
12493CYGPATH=$ac_cv_path_CYGPATH
12494if test -n "$CYGPATH"; then
12495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12496$as_echo "$CYGPATH" >&6; }
12497else
12498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12499$as_echo "no" >&6; }
12500fi
12501
12502
12503  test -n "$CYGPATH" && break
12504done
12505
12506    else
12507      # If it succeeded, then it was overridden by the user. We will use it
12508      # for the tool.
12509
12510      # First remove it from the list of overridden variables, so we can test
12511      # for unknown variables in the end.
12512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12513
12514      # Check if the provided tool contains a complete path.
12515      tool_specified="$CYGPATH"
12516      tool_basename="${tool_specified##*/}"
12517      if test "x$tool_basename" = "x$tool_specified"; then
12518        # A command without a complete path is provided, search $PATH.
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12520$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12521        # Extract the first word of "$tool_basename", so it can be a program name with args.
12522set dummy $tool_basename; ac_word=$2
12523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12524$as_echo_n "checking for $ac_word... " >&6; }
12525if ${ac_cv_path_CYGPATH+:} false; then :
12526  $as_echo_n "(cached) " >&6
12527else
12528  case $CYGPATH in
12529  [\\/]* | ?:[\\/]*)
12530  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12531  ;;
12532  *)
12533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12534for as_dir in $PATH
12535do
12536  IFS=$as_save_IFS
12537  test -z "$as_dir" && as_dir=.
12538    for ac_exec_ext in '' $ac_executable_extensions; do
12539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12540    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12542    break 2
12543  fi
12544done
12545  done
12546IFS=$as_save_IFS
12547
12548  ;;
12549esac
12550fi
12551CYGPATH=$ac_cv_path_CYGPATH
12552if test -n "$CYGPATH"; then
12553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12554$as_echo "$CYGPATH" >&6; }
12555else
12556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12557$as_echo "no" >&6; }
12558fi
12559
12560
12561        if test "x$CYGPATH" = x; then
12562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12563        fi
12564      else
12565        # Otherwise we believe it is a complete path. Use it as it is.
12566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12567$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12569$as_echo_n "checking for CYGPATH... " >&6; }
12570        if test ! -x "$tool_specified"; then
12571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12572$as_echo "not found" >&6; }
12573          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12574        fi
12575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12576$as_echo "$tool_specified" >&6; }
12577      fi
12578    fi
12579  fi
12580
12581
12582
12583
12584  # Publish this variable in the help.
12585
12586
12587  if test "x$READLINK" = x; then
12588    # The variable is not set by user, try to locate tool using the code snippet
12589    for ac_prog in greadlink readlink
12590do
12591  # Extract the first word of "$ac_prog", so it can be a program name with args.
12592set dummy $ac_prog; ac_word=$2
12593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12594$as_echo_n "checking for $ac_word... " >&6; }
12595if ${ac_cv_path_READLINK+:} false; then :
12596  $as_echo_n "(cached) " >&6
12597else
12598  case $READLINK in
12599  [\\/]* | ?:[\\/]*)
12600  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12601  ;;
12602  *)
12603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12604for as_dir in $PATH
12605do
12606  IFS=$as_save_IFS
12607  test -z "$as_dir" && as_dir=.
12608    for ac_exec_ext in '' $ac_executable_extensions; do
12609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12610    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12612    break 2
12613  fi
12614done
12615  done
12616IFS=$as_save_IFS
12617
12618  ;;
12619esac
12620fi
12621READLINK=$ac_cv_path_READLINK
12622if test -n "$READLINK"; then
12623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12624$as_echo "$READLINK" >&6; }
12625else
12626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12627$as_echo "no" >&6; }
12628fi
12629
12630
12631  test -n "$READLINK" && break
12632done
12633
12634  else
12635    # The variable is set, but is it from the command line or the environment?
12636
12637    # Try to remove the string !READLINK! from our list.
12638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12640      # If it failed, the variable was not from the command line. Ignore it,
12641      # but warn the user (except for BASH, which is always set by the calling BASH).
12642      if test "xREADLINK" != xBASH; then
12643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12644$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12645      fi
12646      # Try to locate tool using the code snippet
12647      for ac_prog in greadlink readlink
12648do
12649  # Extract the first word of "$ac_prog", so it can be a program name with args.
12650set dummy $ac_prog; ac_word=$2
12651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12652$as_echo_n "checking for $ac_word... " >&6; }
12653if ${ac_cv_path_READLINK+:} false; then :
12654  $as_echo_n "(cached) " >&6
12655else
12656  case $READLINK in
12657  [\\/]* | ?:[\\/]*)
12658  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12659  ;;
12660  *)
12661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12662for as_dir in $PATH
12663do
12664  IFS=$as_save_IFS
12665  test -z "$as_dir" && as_dir=.
12666    for ac_exec_ext in '' $ac_executable_extensions; do
12667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12668    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12670    break 2
12671  fi
12672done
12673  done
12674IFS=$as_save_IFS
12675
12676  ;;
12677esac
12678fi
12679READLINK=$ac_cv_path_READLINK
12680if test -n "$READLINK"; then
12681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12682$as_echo "$READLINK" >&6; }
12683else
12684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685$as_echo "no" >&6; }
12686fi
12687
12688
12689  test -n "$READLINK" && break
12690done
12691
12692    else
12693      # If it succeeded, then it was overridden by the user. We will use it
12694      # for the tool.
12695
12696      # First remove it from the list of overridden variables, so we can test
12697      # for unknown variables in the end.
12698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12699
12700      # Check if the provided tool contains a complete path.
12701      tool_specified="$READLINK"
12702      tool_basename="${tool_specified##*/}"
12703      if test "x$tool_basename" = "x$tool_specified"; then
12704        # A command without a complete path is provided, search $PATH.
12705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12706$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12707        # Extract the first word of "$tool_basename", so it can be a program name with args.
12708set dummy $tool_basename; ac_word=$2
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12710$as_echo_n "checking for $ac_word... " >&6; }
12711if ${ac_cv_path_READLINK+:} false; then :
12712  $as_echo_n "(cached) " >&6
12713else
12714  case $READLINK in
12715  [\\/]* | ?:[\\/]*)
12716  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12717  ;;
12718  *)
12719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12720for as_dir in $PATH
12721do
12722  IFS=$as_save_IFS
12723  test -z "$as_dir" && as_dir=.
12724    for ac_exec_ext in '' $ac_executable_extensions; do
12725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12726    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12728    break 2
12729  fi
12730done
12731  done
12732IFS=$as_save_IFS
12733
12734  ;;
12735esac
12736fi
12737READLINK=$ac_cv_path_READLINK
12738if test -n "$READLINK"; then
12739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12740$as_echo "$READLINK" >&6; }
12741else
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12743$as_echo "no" >&6; }
12744fi
12745
12746
12747        if test "x$READLINK" = x; then
12748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12749        fi
12750      else
12751        # Otherwise we believe it is a complete path. Use it as it is.
12752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12753$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12755$as_echo_n "checking for READLINK... " >&6; }
12756        if test ! -x "$tool_specified"; then
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12758$as_echo "not found" >&6; }
12759          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12760        fi
12761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12762$as_echo "$tool_specified" >&6; }
12763      fi
12764    fi
12765  fi
12766
12767
12768
12769
12770  # Publish this variable in the help.
12771
12772
12773  if test "x$DF" = x; then
12774    # The variable is not set by user, try to locate tool using the code snippet
12775    for ac_prog in df
12776do
12777  # Extract the first word of "$ac_prog", so it can be a program name with args.
12778set dummy $ac_prog; ac_word=$2
12779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12780$as_echo_n "checking for $ac_word... " >&6; }
12781if ${ac_cv_path_DF+:} false; then :
12782  $as_echo_n "(cached) " >&6
12783else
12784  case $DF in
12785  [\\/]* | ?:[\\/]*)
12786  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12787  ;;
12788  *)
12789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12790for as_dir in $PATH
12791do
12792  IFS=$as_save_IFS
12793  test -z "$as_dir" && as_dir=.
12794    for ac_exec_ext in '' $ac_executable_extensions; do
12795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12796    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12798    break 2
12799  fi
12800done
12801  done
12802IFS=$as_save_IFS
12803
12804  ;;
12805esac
12806fi
12807DF=$ac_cv_path_DF
12808if test -n "$DF"; then
12809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12810$as_echo "$DF" >&6; }
12811else
12812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12813$as_echo "no" >&6; }
12814fi
12815
12816
12817  test -n "$DF" && break
12818done
12819
12820  else
12821    # The variable is set, but is it from the command line or the environment?
12822
12823    # Try to remove the string !DF! from our list.
12824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12826      # If it failed, the variable was not from the command line. Ignore it,
12827      # but warn the user (except for BASH, which is always set by the calling BASH).
12828      if test "xDF" != xBASH; then
12829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12830$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12831      fi
12832      # Try to locate tool using the code snippet
12833      for ac_prog in df
12834do
12835  # Extract the first word of "$ac_prog", so it can be a program name with args.
12836set dummy $ac_prog; ac_word=$2
12837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12838$as_echo_n "checking for $ac_word... " >&6; }
12839if ${ac_cv_path_DF+:} false; then :
12840  $as_echo_n "(cached) " >&6
12841else
12842  case $DF in
12843  [\\/]* | ?:[\\/]*)
12844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12845  ;;
12846  *)
12847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12848for as_dir in $PATH
12849do
12850  IFS=$as_save_IFS
12851  test -z "$as_dir" && as_dir=.
12852    for ac_exec_ext in '' $ac_executable_extensions; do
12853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12856    break 2
12857  fi
12858done
12859  done
12860IFS=$as_save_IFS
12861
12862  ;;
12863esac
12864fi
12865DF=$ac_cv_path_DF
12866if test -n "$DF"; then
12867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12868$as_echo "$DF" >&6; }
12869else
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12871$as_echo "no" >&6; }
12872fi
12873
12874
12875  test -n "$DF" && break
12876done
12877
12878    else
12879      # If it succeeded, then it was overridden by the user. We will use it
12880      # for the tool.
12881
12882      # First remove it from the list of overridden variables, so we can test
12883      # for unknown variables in the end.
12884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12885
12886      # Check if the provided tool contains a complete path.
12887      tool_specified="$DF"
12888      tool_basename="${tool_specified##*/}"
12889      if test "x$tool_basename" = "x$tool_specified"; then
12890        # A command without a complete path is provided, search $PATH.
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12892$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12893        # Extract the first word of "$tool_basename", so it can be a program name with args.
12894set dummy $tool_basename; ac_word=$2
12895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12896$as_echo_n "checking for $ac_word... " >&6; }
12897if ${ac_cv_path_DF+:} false; then :
12898  $as_echo_n "(cached) " >&6
12899else
12900  case $DF in
12901  [\\/]* | ?:[\\/]*)
12902  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12903  ;;
12904  *)
12905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12906for as_dir in $PATH
12907do
12908  IFS=$as_save_IFS
12909  test -z "$as_dir" && as_dir=.
12910    for ac_exec_ext in '' $ac_executable_extensions; do
12911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12912    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12914    break 2
12915  fi
12916done
12917  done
12918IFS=$as_save_IFS
12919
12920  ;;
12921esac
12922fi
12923DF=$ac_cv_path_DF
12924if test -n "$DF"; then
12925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12926$as_echo "$DF" >&6; }
12927else
12928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12929$as_echo "no" >&6; }
12930fi
12931
12932
12933        if test "x$DF" = x; then
12934          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12935        fi
12936      else
12937        # Otherwise we believe it is a complete path. Use it as it is.
12938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12939$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12941$as_echo_n "checking for DF... " >&6; }
12942        if test ! -x "$tool_specified"; then
12943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12944$as_echo "not found" >&6; }
12945          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12946        fi
12947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12948$as_echo "$tool_specified" >&6; }
12949      fi
12950    fi
12951  fi
12952
12953
12954
12955
12956  # Publish this variable in the help.
12957
12958
12959  if test "x$SETFILE" = x; then
12960    # The variable is not set by user, try to locate tool using the code snippet
12961    for ac_prog in SetFile
12962do
12963  # Extract the first word of "$ac_prog", so it can be a program name with args.
12964set dummy $ac_prog; ac_word=$2
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12966$as_echo_n "checking for $ac_word... " >&6; }
12967if ${ac_cv_path_SETFILE+:} false; then :
12968  $as_echo_n "(cached) " >&6
12969else
12970  case $SETFILE in
12971  [\\/]* | ?:[\\/]*)
12972  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12973  ;;
12974  *)
12975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976for as_dir in $PATH
12977do
12978  IFS=$as_save_IFS
12979  test -z "$as_dir" && as_dir=.
12980    for ac_exec_ext in '' $ac_executable_extensions; do
12981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12982    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12984    break 2
12985  fi
12986done
12987  done
12988IFS=$as_save_IFS
12989
12990  ;;
12991esac
12992fi
12993SETFILE=$ac_cv_path_SETFILE
12994if test -n "$SETFILE"; then
12995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
12996$as_echo "$SETFILE" >&6; }
12997else
12998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12999$as_echo "no" >&6; }
13000fi
13001
13002
13003  test -n "$SETFILE" && break
13004done
13005
13006  else
13007    # The variable is set, but is it from the command line or the environment?
13008
13009    # Try to remove the string !SETFILE! from our list.
13010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13012      # If it failed, the variable was not from the command line. Ignore it,
13013      # but warn the user (except for BASH, which is always set by the calling BASH).
13014      if test "xSETFILE" != xBASH; then
13015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13016$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13017      fi
13018      # Try to locate tool using the code snippet
13019      for ac_prog in SetFile
13020do
13021  # Extract the first word of "$ac_prog", so it can be a program name with args.
13022set dummy $ac_prog; ac_word=$2
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13024$as_echo_n "checking for $ac_word... " >&6; }
13025if ${ac_cv_path_SETFILE+:} false; then :
13026  $as_echo_n "(cached) " >&6
13027else
13028  case $SETFILE in
13029  [\\/]* | ?:[\\/]*)
13030  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13031  ;;
13032  *)
13033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13034for as_dir in $PATH
13035do
13036  IFS=$as_save_IFS
13037  test -z "$as_dir" && as_dir=.
13038    for ac_exec_ext in '' $ac_executable_extensions; do
13039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13040    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13042    break 2
13043  fi
13044done
13045  done
13046IFS=$as_save_IFS
13047
13048  ;;
13049esac
13050fi
13051SETFILE=$ac_cv_path_SETFILE
13052if test -n "$SETFILE"; then
13053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13054$as_echo "$SETFILE" >&6; }
13055else
13056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13057$as_echo "no" >&6; }
13058fi
13059
13060
13061  test -n "$SETFILE" && break
13062done
13063
13064    else
13065      # If it succeeded, then it was overridden by the user. We will use it
13066      # for the tool.
13067
13068      # First remove it from the list of overridden variables, so we can test
13069      # for unknown variables in the end.
13070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13071
13072      # Check if the provided tool contains a complete path.
13073      tool_specified="$SETFILE"
13074      tool_basename="${tool_specified##*/}"
13075      if test "x$tool_basename" = "x$tool_specified"; then
13076        # A command without a complete path is provided, search $PATH.
13077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13078$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13079        # Extract the first word of "$tool_basename", so it can be a program name with args.
13080set dummy $tool_basename; ac_word=$2
13081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13082$as_echo_n "checking for $ac_word... " >&6; }
13083if ${ac_cv_path_SETFILE+:} false; then :
13084  $as_echo_n "(cached) " >&6
13085else
13086  case $SETFILE in
13087  [\\/]* | ?:[\\/]*)
13088  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13089  ;;
13090  *)
13091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13092for as_dir in $PATH
13093do
13094  IFS=$as_save_IFS
13095  test -z "$as_dir" && as_dir=.
13096    for ac_exec_ext in '' $ac_executable_extensions; do
13097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13098    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13100    break 2
13101  fi
13102done
13103  done
13104IFS=$as_save_IFS
13105
13106  ;;
13107esac
13108fi
13109SETFILE=$ac_cv_path_SETFILE
13110if test -n "$SETFILE"; then
13111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13112$as_echo "$SETFILE" >&6; }
13113else
13114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13115$as_echo "no" >&6; }
13116fi
13117
13118
13119        if test "x$SETFILE" = x; then
13120          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13121        fi
13122      else
13123        # Otherwise we believe it is a complete path. Use it as it is.
13124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13125$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13127$as_echo_n "checking for SETFILE... " >&6; }
13128        if test ! -x "$tool_specified"; then
13129          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13130$as_echo "not found" >&6; }
13131          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13132        fi
13133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13134$as_echo "$tool_specified" >&6; }
13135      fi
13136    fi
13137  fi
13138
13139
13140
13141
13142# Now we can determine OpenJDK build and target platforms. This is required to
13143# have early on.
13144# Make sure we can run config.sub.
13145$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13146  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13147
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13149$as_echo_n "checking build system type... " >&6; }
13150if ${ac_cv_build+:} false; then :
13151  $as_echo_n "(cached) " >&6
13152else
13153  ac_build_alias=$build_alias
13154test "x$ac_build_alias" = x &&
13155  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13156test "x$ac_build_alias" = x &&
13157  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13158ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13159  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13160
13161fi
13162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13163$as_echo "$ac_cv_build" >&6; }
13164case $ac_cv_build in
13165*-*-*) ;;
13166*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13167esac
13168build=$ac_cv_build
13169ac_save_IFS=$IFS; IFS='-'
13170set x $ac_cv_build
13171shift
13172build_cpu=$1
13173build_vendor=$2
13174shift; shift
13175# Remember, the first character of IFS is used to create $*,
13176# except with old shells:
13177build_os=$*
13178IFS=$ac_save_IFS
13179case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13180
13181
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13183$as_echo_n "checking host system type... " >&6; }
13184if ${ac_cv_host+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  if test "x$host_alias" = x; then
13188  ac_cv_host=$ac_cv_build
13189else
13190  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13191    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13192fi
13193
13194fi
13195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13196$as_echo "$ac_cv_host" >&6; }
13197case $ac_cv_host in
13198*-*-*) ;;
13199*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13200esac
13201host=$ac_cv_host
13202ac_save_IFS=$IFS; IFS='-'
13203set x $ac_cv_host
13204shift
13205host_cpu=$1
13206host_vendor=$2
13207shift; shift
13208# Remember, the first character of IFS is used to create $*,
13209# except with old shells:
13210host_os=$*
13211IFS=$ac_save_IFS
13212case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13213
13214
13215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13216$as_echo_n "checking target system type... " >&6; }
13217if ${ac_cv_target+:} false; then :
13218  $as_echo_n "(cached) " >&6
13219else
13220  if test "x$target_alias" = x; then
13221  ac_cv_target=$ac_cv_host
13222else
13223  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13224    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13225fi
13226
13227fi
13228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13229$as_echo "$ac_cv_target" >&6; }
13230case $ac_cv_target in
13231*-*-*) ;;
13232*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13233esac
13234target=$ac_cv_target
13235ac_save_IFS=$IFS; IFS='-'
13236set x $ac_cv_target
13237shift
13238target_cpu=$1
13239target_vendor=$2
13240shift; shift
13241# Remember, the first character of IFS is used to create $*,
13242# except with old shells:
13243target_os=$*
13244IFS=$ac_save_IFS
13245case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13246
13247
13248# The aliases save the names the user supplied, while $host etc.
13249# will get canonicalized.
13250test -n "$target_alias" &&
13251  test "$program_prefix$program_suffix$program_transform_name" = \
13252    NONENONEs,x,x, &&
13253  program_prefix=${target_alias}-
13254
13255  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13256  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13257  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13258  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13259  # to use the configure naming style.
13260
13261
13262
13263
13264
13265  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13266  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13267  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13268  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13269  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13270  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13271
13272
13273
13274  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13275
13276  case "$build_os" in
13277    *linux*)
13278      VAR_OS=linux
13279      VAR_OS_API=posix
13280      VAR_OS_ENV=linux
13281      ;;
13282    *solaris*)
13283      VAR_OS=solaris
13284      VAR_OS_API=posix
13285      VAR_OS_ENV=solaris
13286      ;;
13287    *darwin*)
13288      VAR_OS=macosx
13289      VAR_OS_API=posix
13290      VAR_OS_ENV=macosx
13291      ;;
13292    *bsd*)
13293      VAR_OS=bsd
13294      VAR_OS_API=posix
13295      VAR_OS_ENV=bsd
13296      ;;
13297    *cygwin*)
13298      VAR_OS=windows
13299      VAR_OS_API=winapi
13300      VAR_OS_ENV=windows.cygwin
13301      ;;
13302    *mingw*)
13303      VAR_OS=windows
13304      VAR_OS_API=winapi
13305      VAR_OS_ENV=windows.msys
13306      ;;
13307    *aix*)
13308      VAR_OS=aix
13309      VAR_OS_API=posix
13310      VAR_OS_ENV=aix
13311      ;;
13312    *)
13313      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13314      ;;
13315  esac
13316
13317
13318  # First argument is the cpu name from the trip/quad
13319  case "$build_cpu" in
13320    x86_64)
13321      VAR_CPU=x86_64
13322      VAR_CPU_ARCH=x86
13323      VAR_CPU_BITS=64
13324      VAR_CPU_ENDIAN=little
13325      ;;
13326    i?86)
13327      VAR_CPU=x86
13328      VAR_CPU_ARCH=x86
13329      VAR_CPU_BITS=32
13330      VAR_CPU_ENDIAN=little
13331      ;;
13332    arm*)
13333      VAR_CPU=arm
13334      VAR_CPU_ARCH=arm
13335      VAR_CPU_BITS=32
13336      VAR_CPU_ENDIAN=little
13337      ;;
13338    powerpc)
13339      VAR_CPU=ppc
13340      VAR_CPU_ARCH=ppc
13341      VAR_CPU_BITS=32
13342      VAR_CPU_ENDIAN=big
13343      ;;
13344    powerpc64)
13345      VAR_CPU=ppc64
13346      VAR_CPU_ARCH=ppc
13347      VAR_CPU_BITS=64
13348      VAR_CPU_ENDIAN=big
13349      ;;
13350    s390)
13351      VAR_CPU=s390
13352      VAR_CPU_ARCH=s390
13353      VAR_CPU_BITS=32
13354      VAR_CPU_ENDIAN=big
13355      ;;
13356    s390x)
13357      VAR_CPU=s390x
13358      VAR_CPU_ARCH=s390
13359      VAR_CPU_BITS=64
13360      VAR_CPU_ENDIAN=big
13361      ;;
13362    sparc)
13363      VAR_CPU=sparc
13364      VAR_CPU_ARCH=sparc
13365      VAR_CPU_BITS=32
13366      VAR_CPU_ENDIAN=big
13367      ;;
13368    sparcv9)
13369      VAR_CPU=sparcv9
13370      VAR_CPU_ARCH=sparc
13371      VAR_CPU_BITS=64
13372      VAR_CPU_ENDIAN=big
13373      ;;
13374    *)
13375      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13376      ;;
13377  esac
13378
13379  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13380  OPENJDK_BUILD_OS="$VAR_OS"
13381  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13382  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13383  OPENJDK_BUILD_CPU="$VAR_CPU"
13384  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13385  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13386  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13387
13388
13389
13390
13391
13392
13393
13394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13395$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13397$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13398
13399  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13400
13401  case "$host_os" in
13402    *linux*)
13403      VAR_OS=linux
13404      VAR_OS_API=posix
13405      VAR_OS_ENV=linux
13406      ;;
13407    *solaris*)
13408      VAR_OS=solaris
13409      VAR_OS_API=posix
13410      VAR_OS_ENV=solaris
13411      ;;
13412    *darwin*)
13413      VAR_OS=macosx
13414      VAR_OS_API=posix
13415      VAR_OS_ENV=macosx
13416      ;;
13417    *bsd*)
13418      VAR_OS=bsd
13419      VAR_OS_API=posix
13420      VAR_OS_ENV=bsd
13421      ;;
13422    *cygwin*)
13423      VAR_OS=windows
13424      VAR_OS_API=winapi
13425      VAR_OS_ENV=windows.cygwin
13426      ;;
13427    *mingw*)
13428      VAR_OS=windows
13429      VAR_OS_API=winapi
13430      VAR_OS_ENV=windows.msys
13431      ;;
13432    *aix*)
13433      VAR_OS=aix
13434      VAR_OS_API=posix
13435      VAR_OS_ENV=aix
13436      ;;
13437    *)
13438      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13439      ;;
13440  esac
13441
13442
13443  # First argument is the cpu name from the trip/quad
13444  case "$host_cpu" in
13445    x86_64)
13446      VAR_CPU=x86_64
13447      VAR_CPU_ARCH=x86
13448      VAR_CPU_BITS=64
13449      VAR_CPU_ENDIAN=little
13450      ;;
13451    i?86)
13452      VAR_CPU=x86
13453      VAR_CPU_ARCH=x86
13454      VAR_CPU_BITS=32
13455      VAR_CPU_ENDIAN=little
13456      ;;
13457    arm*)
13458      VAR_CPU=arm
13459      VAR_CPU_ARCH=arm
13460      VAR_CPU_BITS=32
13461      VAR_CPU_ENDIAN=little
13462      ;;
13463    powerpc)
13464      VAR_CPU=ppc
13465      VAR_CPU_ARCH=ppc
13466      VAR_CPU_BITS=32
13467      VAR_CPU_ENDIAN=big
13468      ;;
13469    powerpc64)
13470      VAR_CPU=ppc64
13471      VAR_CPU_ARCH=ppc
13472      VAR_CPU_BITS=64
13473      VAR_CPU_ENDIAN=big
13474      ;;
13475    s390)
13476      VAR_CPU=s390
13477      VAR_CPU_ARCH=s390
13478      VAR_CPU_BITS=32
13479      VAR_CPU_ENDIAN=big
13480      ;;
13481    s390x)
13482      VAR_CPU=s390x
13483      VAR_CPU_ARCH=s390
13484      VAR_CPU_BITS=64
13485      VAR_CPU_ENDIAN=big
13486      ;;
13487    sparc)
13488      VAR_CPU=sparc
13489      VAR_CPU_ARCH=sparc
13490      VAR_CPU_BITS=32
13491      VAR_CPU_ENDIAN=big
13492      ;;
13493    sparcv9)
13494      VAR_CPU=sparcv9
13495      VAR_CPU_ARCH=sparc
13496      VAR_CPU_BITS=64
13497      VAR_CPU_ENDIAN=big
13498      ;;
13499    *)
13500      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13501      ;;
13502  esac
13503
13504  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13505  OPENJDK_TARGET_OS="$VAR_OS"
13506  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13507  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13508  OPENJDK_TARGET_CPU="$VAR_CPU"
13509  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13510  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13511  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13512
13513
13514
13515
13516
13517
13518
13519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13520$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13522$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13523
13524
13525
13526# Check whether --with-target-bits was given.
13527if test "${with_target_bits+set}" = set; then :
13528  withval=$with_target_bits;
13529fi
13530
13531
13532  # We have three types of compiles:
13533  # native  == normal compilation, target system == build system
13534  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13535  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13536  #
13537  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13538    # We're doing a proper cross-compilation
13539    COMPILE_TYPE="cross"
13540  else
13541    COMPILE_TYPE="native"
13542  fi
13543
13544  if test "x$with_target_bits" != x; then
13545    if test "x$COMPILE_TYPE" = "xcross"; then
13546      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13547    fi
13548
13549    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13550      # A reduced build is requested
13551      COMPILE_TYPE="reduced"
13552      OPENJDK_TARGET_CPU_BITS=32
13553      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13554        OPENJDK_TARGET_CPU=x86
13555      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13556        OPENJDK_TARGET_CPU=sparc
13557      else
13558        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13559      fi
13560    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13561      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
13562    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13563      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13564$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13565    else
13566      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13567    fi
13568  fi
13569
13570
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13572$as_echo_n "checking compilation type... " >&6; }
13573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13574$as_echo "$COMPILE_TYPE" >&6; }
13575
13576
13577  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13578    REQUIRED_OS_NAME=SunOS
13579    REQUIRED_OS_VERSION=5.10
13580  fi
13581  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13582    REQUIRED_OS_NAME=Linux
13583    REQUIRED_OS_VERSION=2.6
13584  fi
13585  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13586    REQUIRED_OS_NAME=Windows
13587    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13588      REQUIRED_OS_VERSION=5.2
13589    else
13590      REQUIRED_OS_VERSION=5.1
13591    fi
13592  fi
13593  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13594    REQUIRED_OS_NAME=Darwin
13595    REQUIRED_OS_VERSION=11.2
13596  fi
13597
13598
13599
13600
13601
13602  # Also store the legacy naming of the cpu.
13603  # Ie i586 and amd64 instead of x86 and x86_64
13604  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13605  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13606    OPENJDK_TARGET_CPU_LEGACY="i586"
13607  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13608    # On all platforms except MacOSX replace x86_64 with amd64.
13609    OPENJDK_TARGET_CPU_LEGACY="amd64"
13610  fi
13611
13612
13613  # And the second legacy naming of the cpu.
13614  # Ie i386 and amd64 instead of x86 and x86_64.
13615  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13616  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13617    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13618  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13619    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13620  fi
13621
13622
13623  # This is the name of the cpu (but using i386 and amd64 instead of
13624  # x86 and x86_64, respectively), preceeded by a /, to be used when
13625  # locating libraries. On macosx, it's empty, though.
13626  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13627  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13628    OPENJDK_TARGET_CPU_LIBDIR=""
13629  fi
13630
13631
13632  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13633  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13634  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13635  OPENJDK_TARGET_CPU_ISADIR=""
13636  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13637    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13638      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13639    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13640      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13641    fi
13642  fi
13643
13644
13645  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13646  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13647  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13648    # On linux only, we replace x86 with i386.
13649    OPENJDK_TARGET_CPU_OSARCH="i386"
13650  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13651    # On all platforms except macosx, we replace x86_64 with amd64.
13652    OPENJDK_TARGET_CPU_OSARCH="amd64"
13653  fi
13654
13655
13656  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13657  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13658    OPENJDK_TARGET_CPU_JLI="i386"
13659  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13660    # On all platforms except macosx, we replace x86_64 with amd64.
13661    OPENJDK_TARGET_CPU_JLI="amd64"
13662  fi
13663  # Now setup the -D flags for building libjli.
13664  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13665  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13666    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13667      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13668    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13669      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13670    fi
13671  fi
13672
13673
13674  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13675  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13676    OPENJDK_TARGET_OS_API_DIR="solaris"
13677  fi
13678  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13679    OPENJDK_TARGET_OS_API_DIR="windows"
13680  fi
13681
13682
13683  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13684      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13685  else
13686      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13687  fi
13688
13689
13690  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13691    A_LP64="LP64:="
13692    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13693    # unpack200.exe
13694    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13695      ADD_LP64="-D_LP64=1"
13696    fi
13697  fi
13698  LP64=$A_LP64
13699
13700
13701  if test "x$COMPILE_TYPE" = "xcross"; then
13702    # FIXME: ... or should this include reduced builds..?
13703    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13704  else
13705    DEFINE_CROSS_COMPILE_ARCH=""
13706  fi
13707
13708
13709  # ZERO_ARCHDEF is used to enable architecture-specific code
13710  case "${OPENJDK_TARGET_CPU}" in
13711    ppc*)    ZERO_ARCHDEF=PPC   ;;
13712    s390*)   ZERO_ARCHDEF=S390  ;;
13713    sparc*)  ZERO_ARCHDEF=SPARC ;;
13714    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13715    x86)     ZERO_ARCHDEF=IA32  ;;
13716    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13717  esac
13718
13719
13720
13721
13722# Continue setting up basic stuff. Most remaining code require fundamental tools.
13723
13724  # Locate the directory of this script.
13725  SCRIPT="$0"
13726  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13727
13728  # Where is the source? It is located two levels above the configure script.
13729  CURDIR="$PWD"
13730  cd "$AUTOCONF_DIR/../.."
13731  SRC_ROOT="`$THEPWDCMD -L`"
13732
13733  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13734    PATH_SEP=";"
13735
13736  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13737  if test $SRC_ROOT_LENGTH -gt 100; then
13738    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13739  fi
13740
13741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13743$as_echo_n "checking cygwin release... " >&6; }
13744    CYGWIN_VERSION=`$UNAME -r`
13745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13746$as_echo "$CYGWIN_VERSION" >&6; }
13747    WINDOWS_ENV_VENDOR='cygwin'
13748    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13749
13750    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13751    if test "x$CYGWIN_VERSION_OK" = x; then
13752      { $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
13753$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;}
13754      as_fn_error $? "Cannot continue" "$LINENO" 5
13755    fi
13756    if test "x$CYGPATH" = x; then
13757      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13758    fi
13759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13760$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13761    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13762    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13763    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13764    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13766$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13767    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13768    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13769    if test "x$test_cygdrive_prefix" = x; then
13770      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13771    fi
13772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13774$as_echo_n "checking msys release... " >&6; }
13775    MSYS_VERSION=`$UNAME -r`
13776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13777$as_echo "$MSYS_VERSION" >&6; }
13778
13779    WINDOWS_ENV_VENDOR='msys'
13780    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13781
13782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13783$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13784    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13785    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13786
13787  windows_path="$MSYS_ROOT_PATH"
13788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13789    unix_path=`$CYGPATH -u "$windows_path"`
13790    MSYS_ROOT_PATH="$unix_path"
13791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13793    MSYS_ROOT_PATH="$unix_path"
13794  fi
13795
13796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13797$as_echo "$MSYS_ROOT_PATH" >&6; }
13798    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13799  else
13800    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13801  fi
13802
13803  # Test if windows or unix (cygwin/msys) find is first in path.
13804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13805$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13806  FIND_BINARY_OUTPUT=`find --version 2>&1`
13807  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13809$as_echo "unix style" >&6; }
13810  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13812$as_echo "Windows" >&6; }
13813    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13814$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13815    { $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
13816$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13817    as_fn_error $? "Cannot continue" "$LINENO" 5
13818  else
13819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13820$as_echo "unknown" >&6; }
13821    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13822$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13823  fi
13824
13825  else
13826    PATH_SEP=":"
13827  fi
13828
13829
13830
13831  cd "$CURDIR"
13832
13833
13834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13835
13836  # Input might be given as Windows format, start by converting to
13837  # unix format.
13838  path="$SRC_ROOT"
13839  new_path=`$CYGPATH -u "$path"`
13840
13841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13844  # "foo.exe" is OK but "foo" is an error.
13845  #
13846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13847  # It is also a way to make sure we got the proper file name for the real test later on.
13848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13849  if test "x$test_shortpath" = x; then
13850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13851$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13852    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13853  fi
13854
13855  # Call helper function which possibly converts this using DOS-style short mode.
13856  # If so, the updated path is stored in $new_path.
13857
13858  input_path="$new_path"
13859  # Check if we need to convert this using DOS-style short mode. If the path
13860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13861  # take no chances and rewrite it.
13862  # Note: m4 eats our [], so we need to use [ and ] instead.
13863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13864  if test "x$has_forbidden_chars" != x; then
13865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13869      # Going to short mode and back again did indeed matter. Since short mode is
13870      # case insensitive, let's make it lowercase to improve readability.
13871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13872      # Now convert it back to Unix-stile (cygpath)
13873      input_path=`$CYGPATH -u "$shortmode_path"`
13874      new_path="$input_path"
13875    fi
13876  fi
13877
13878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13879  if test "x$test_cygdrive_prefix" = x; then
13880    # As a simple fix, exclude /usr/bin since it's not a real path.
13881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13883      # a path prefixed by /cygdrive for fixpath to work.
13884      new_path="$CYGWIN_ROOT_PATH$input_path"
13885    fi
13886  fi
13887
13888
13889  if test "x$path" != "x$new_path"; then
13890    SRC_ROOT="$new_path"
13891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13892$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13893  fi
13894
13895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13896
13897  path="$SRC_ROOT"
13898  has_colon=`$ECHO $path | $GREP ^.:`
13899  new_path="$path"
13900  if test "x$has_colon" = x; then
13901    # Not in mixed or Windows style, start by that.
13902    new_path=`cmd //c echo $path`
13903  fi
13904
13905
13906  input_path="$new_path"
13907  # Check if we need to convert this using DOS-style short mode. If the path
13908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13909  # take no chances and rewrite it.
13910  # Note: m4 eats our [], so we need to use [ and ] instead.
13911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13912  if test "x$has_forbidden_chars" != x; then
13913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13915  fi
13916
13917
13918  windows_path="$new_path"
13919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13920    unix_path=`$CYGPATH -u "$windows_path"`
13921    new_path="$unix_path"
13922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13924    new_path="$unix_path"
13925  fi
13926
13927  if test "x$path" != "x$new_path"; then
13928    SRC_ROOT="$new_path"
13929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13930$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13931  fi
13932
13933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13935
13936  else
13937    # We're on a posix platform. Hooray! :)
13938    path="$SRC_ROOT"
13939    has_space=`$ECHO "$path" | $GREP " "`
13940    if test "x$has_space" != x; then
13941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13942$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13943      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13944    fi
13945
13946    # Use eval to expand a potential ~
13947    eval path="$path"
13948    if test ! -f "$path" && test ! -d "$path"; then
13949      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
13950    fi
13951
13952    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
13953  fi
13954
13955
13956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13957
13958  # Input might be given as Windows format, start by converting to
13959  # unix format.
13960  path="$CURDIR"
13961  new_path=`$CYGPATH -u "$path"`
13962
13963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13966  # "foo.exe" is OK but "foo" is an error.
13967  #
13968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13969  # It is also a way to make sure we got the proper file name for the real test later on.
13970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13971  if test "x$test_shortpath" = x; then
13972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13973$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13974    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13975  fi
13976
13977  # Call helper function which possibly converts this using DOS-style short mode.
13978  # If so, the updated path is stored in $new_path.
13979
13980  input_path="$new_path"
13981  # Check if we need to convert this using DOS-style short mode. If the path
13982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13983  # take no chances and rewrite it.
13984  # Note: m4 eats our [], so we need to use [ and ] instead.
13985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13986  if test "x$has_forbidden_chars" != x; then
13987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13991      # Going to short mode and back again did indeed matter. Since short mode is
13992      # case insensitive, let's make it lowercase to improve readability.
13993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13994      # Now convert it back to Unix-stile (cygpath)
13995      input_path=`$CYGPATH -u "$shortmode_path"`
13996      new_path="$input_path"
13997    fi
13998  fi
13999
14000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14001  if test "x$test_cygdrive_prefix" = x; then
14002    # As a simple fix, exclude /usr/bin since it's not a real path.
14003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14005      # a path prefixed by /cygdrive for fixpath to work.
14006      new_path="$CYGWIN_ROOT_PATH$input_path"
14007    fi
14008  fi
14009
14010
14011  if test "x$path" != "x$new_path"; then
14012    CURDIR="$new_path"
14013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14014$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14015  fi
14016
14017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14018
14019  path="$CURDIR"
14020  has_colon=`$ECHO $path | $GREP ^.:`
14021  new_path="$path"
14022  if test "x$has_colon" = x; then
14023    # Not in mixed or Windows style, start by that.
14024    new_path=`cmd //c echo $path`
14025  fi
14026
14027
14028  input_path="$new_path"
14029  # Check if we need to convert this using DOS-style short mode. If the path
14030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14031  # take no chances and rewrite it.
14032  # Note: m4 eats our [], so we need to use [ and ] instead.
14033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14034  if test "x$has_forbidden_chars" != x; then
14035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14037  fi
14038
14039
14040  windows_path="$new_path"
14041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14042    unix_path=`$CYGPATH -u "$windows_path"`
14043    new_path="$unix_path"
14044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14046    new_path="$unix_path"
14047  fi
14048
14049  if test "x$path" != "x$new_path"; then
14050    CURDIR="$new_path"
14051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14052$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14053  fi
14054
14055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14057
14058  else
14059    # We're on a posix platform. Hooray! :)
14060    path="$CURDIR"
14061    has_space=`$ECHO "$path" | $GREP " "`
14062    if test "x$has_space" != x; then
14063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14064$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14065      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14066    fi
14067
14068    # Use eval to expand a potential ~
14069    eval path="$path"
14070    if test ! -f "$path" && test ! -d "$path"; then
14071      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14072    fi
14073
14074    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14075  fi
14076
14077
14078  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14079    # Add extra search paths on solaris for utilities like ar and as etc...
14080    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14081  fi
14082
14083  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14084  # is not correct.
14085
14086# Check whether --with-sys-root was given.
14087if test "${with_sys_root+set}" = set; then :
14088  withval=$with_sys_root;
14089fi
14090
14091
14092  if test "x$with_sys_root" != x; then
14093    SYS_ROOT=$with_sys_root
14094  else
14095    SYS_ROOT=/
14096  fi
14097
14098
14099
14100# Check whether --with-tools-dir was given.
14101if test "${with_tools_dir+set}" = set; then :
14102  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14103
14104fi
14105
14106
14107
14108# Check whether --with-devkit was given.
14109if test "${with_devkit+set}" = set; then :
14110  withval=$with_devkit;
14111        if test "x$with_sys_root" != x; then
14112          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14113        fi
14114
14115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14116
14117  # Input might be given as Windows format, start by converting to
14118  # unix format.
14119  path="$with_devkit"
14120  new_path=`$CYGPATH -u "$path"`
14121
14122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14125  # "foo.exe" is OK but "foo" is an error.
14126  #
14127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14128  # It is also a way to make sure we got the proper file name for the real test later on.
14129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14130  if test "x$test_shortpath" = x; then
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14132$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14133    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14134  fi
14135
14136  # Call helper function which possibly converts this using DOS-style short mode.
14137  # If so, the updated path is stored in $new_path.
14138
14139  input_path="$new_path"
14140  # Check if we need to convert this using DOS-style short mode. If the path
14141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14142  # take no chances and rewrite it.
14143  # Note: m4 eats our [], so we need to use [ and ] instead.
14144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14145  if test "x$has_forbidden_chars" != x; then
14146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14150      # Going to short mode and back again did indeed matter. Since short mode is
14151      # case insensitive, let's make it lowercase to improve readability.
14152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14153      # Now convert it back to Unix-stile (cygpath)
14154      input_path=`$CYGPATH -u "$shortmode_path"`
14155      new_path="$input_path"
14156    fi
14157  fi
14158
14159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14160  if test "x$test_cygdrive_prefix" = x; then
14161    # As a simple fix, exclude /usr/bin since it's not a real path.
14162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14164      # a path prefixed by /cygdrive for fixpath to work.
14165      new_path="$CYGWIN_ROOT_PATH$input_path"
14166    fi
14167  fi
14168
14169
14170  if test "x$path" != "x$new_path"; then
14171    with_devkit="$new_path"
14172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14173$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14174  fi
14175
14176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177
14178  path="$with_devkit"
14179  has_colon=`$ECHO $path | $GREP ^.:`
14180  new_path="$path"
14181  if test "x$has_colon" = x; then
14182    # Not in mixed or Windows style, start by that.
14183    new_path=`cmd //c echo $path`
14184  fi
14185
14186
14187  input_path="$new_path"
14188  # Check if we need to convert this using DOS-style short mode. If the path
14189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14190  # take no chances and rewrite it.
14191  # Note: m4 eats our [], so we need to use [ and ] instead.
14192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14193  if test "x$has_forbidden_chars" != x; then
14194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14196  fi
14197
14198
14199  windows_path="$new_path"
14200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14201    unix_path=`$CYGPATH -u "$windows_path"`
14202    new_path="$unix_path"
14203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14205    new_path="$unix_path"
14206  fi
14207
14208  if test "x$path" != "x$new_path"; then
14209    with_devkit="$new_path"
14210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14211$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14212  fi
14213
14214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14216
14217  else
14218    # We're on a posix platform. Hooray! :)
14219    path="$with_devkit"
14220    has_space=`$ECHO "$path" | $GREP " "`
14221    if test "x$has_space" != x; then
14222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14223$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14225    fi
14226
14227    # Use eval to expand a potential ~
14228    eval path="$path"
14229    if test ! -f "$path" && test ! -d "$path"; then
14230      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14231    fi
14232
14233    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14234  fi
14235
14236
14237  if test "x$TOOLS_DIR" = x; then
14238    TOOLS_DIR="$with_devkit/bin"
14239  else
14240    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14241  fi
14242
14243        if test -d "$with_devkit/$host_alias/libc"; then
14244          SYS_ROOT=$with_devkit/$host_alias/libc
14245        elif test -d "$with_devkit/$host/sys-root"; then
14246          SYS_ROOT=$with_devkit/$host/sys-root
14247        fi
14248
14249fi
14250
14251
14252
14253  # Setup default logging of stdout and stderr to build.log in the output root.
14254  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14255  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14256  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14257
14258
14259
14260
14261
14262# Check if it's a pure open build or if custom sources are to be used.
14263
14264  # Check whether --enable-openjdk-only was given.
14265if test "${enable_openjdk_only+set}" = set; then :
14266  enableval=$enable_openjdk_only;
14267else
14268  enable_openjdk_only="no"
14269fi
14270
14271
14272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14273$as_echo_n "checking for presence of closed sources... " >&6; }
14274  if test -d "$SRC_ROOT/jdk/src/closed"; then
14275    CLOSED_SOURCE_PRESENT=yes
14276  else
14277    CLOSED_SOURCE_PRESENT=no
14278  fi
14279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14280$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14281
14282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14283$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14284  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14286$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14287
14288  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14289    OPENJDK=true
14290    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14291      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14292$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14293    fi
14294  else
14295    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14296      OPENJDK=true
14297    else
14298      OPENJDK=false
14299    fi
14300  fi
14301
14302  if test "x$OPENJDK" = "xtrue"; then
14303    SET_OPENJDK="OPENJDK=true"
14304  fi
14305
14306
14307
14308  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14309  # the IncludeCustomExtension macro.
14310
14311
14312# Check whether --with-custom-make-dir was given.
14313if test "${with_custom_make_dir+set}" = set; then :
14314  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14315$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14316fi
14317
14318
14319
14320
14321# These are needed to be able to create a configuration name (and thus the output directory)
14322
14323  ###############################################################################
14324  #
14325  # Check which variant of the JDK that we want to build.
14326  # Currently we have:
14327  #    normal:   standard edition
14328  # but the custom make system may add other variants
14329  #
14330  # Effectively the JDK variant gives a name to a specific set of
14331  # modules to compile into the JDK. In the future, these modules
14332  # might even be Jigsaw modules.
14333  #
14334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14335$as_echo_n "checking which variant of the JDK to build... " >&6; }
14336
14337# Check whether --with-jdk-variant was given.
14338if test "${with_jdk_variant+set}" = set; then :
14339  withval=$with_jdk_variant;
14340fi
14341
14342
14343  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14344    JDK_VARIANT="normal"
14345  else
14346    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14347  fi
14348
14349
14350
14351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14352$as_echo "$JDK_VARIANT" >&6; }
14353
14354
14355###############################################################################
14356#
14357# Check which interpreter of the JVM we want to build.
14358# Currently we have:
14359#    template: Template interpreter (the default)
14360#    cpp     : C++ interpreter
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14362$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14363
14364# Check whether --with-jvm-interpreter was given.
14365if test "${with_jvm_interpreter+set}" = set; then :
14366  withval=$with_jvm_interpreter;
14367fi
14368
14369
14370if test "x$with_jvm_interpreter" = x; then
14371     with_jvm_interpreter="template"
14372fi
14373
14374JVM_INTERPRETER="$with_jvm_interpreter"
14375
14376if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14377   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14378fi
14379
14380
14381
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14383$as_echo "$with_jvm_interpreter" >&6; }
14384
14385
14386
14387  ###############################################################################
14388  #
14389  # Check which variants of the JVM that we want to build.
14390  # Currently we have:
14391  #    server: normal interpreter and a tiered C1/C2 compiler
14392  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14393  #    minimal1: reduced form of client with optional VM services and features stripped out
14394  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14395  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14396  #    zero: no machine code interpreter, no compiler
14397  #    zeroshark: zero interpreter and shark/llvm compiler backend
14398#    core: interpreter only, no compiler (only works on some platforms)
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14400$as_echo_n "checking which variants of the JVM to build... " >&6; }
14401
14402# Check whether --with-jvm-variants was given.
14403if test "${with_jvm_variants+set}" = set; then :
14404  withval=$with_jvm_variants;
14405fi
14406
14407
14408  if test "x$with_jvm_variants" = x; then
14409    with_jvm_variants="server"
14410  fi
14411
14412  JVM_VARIANTS=",$with_jvm_variants,"
14413  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,//'`
14414
14415  if test "x$TEST_VARIANTS" != "x,"; then
14416     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14417  fi
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14419$as_echo "$with_jvm_variants" >&6; }
14420
14421  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14422  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14423  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14424  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14425  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14426  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14427  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14428
14429  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14430    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14431      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14432    fi
14433  fi
14434  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14435    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14436      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14437    fi
14438  fi
14439  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14440    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14441      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14442    fi
14443  fi
14444
14445  # Replace the commas with AND for use in the build directory name.
14446  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14447  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/'`
14448  if test "x$COUNT_VARIANTS" != "x,1"; then
14449    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14450  else
14451    BUILDING_MULTIPLE_JVM_VARIANTS=no
14452  fi
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463  INCLUDE_SA=true
14464  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14465    INCLUDE_SA=false
14466  fi
14467  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14468    INCLUDE_SA=false
14469  fi
14470  if test "x$VAR_CPU" = xppc64 ; then
14471    INCLUDE_SA=false
14472  fi
14473
14474
14475  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14476    MACOSX_UNIVERSAL="true"
14477  fi
14478
14479
14480
14481
14482  ###############################################################################
14483  #
14484  # Set the debug level
14485  #    release: no debug information, all optimizations, no asserts.
14486  #    fastdebug: debug information (-g), all optimizations, all asserts
14487  #    slowdebug: debug information (-g), no optimizations, all asserts
14488  #
14489  DEBUG_LEVEL="release"
14490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14491$as_echo_n "checking which debug level to use... " >&6; }
14492  # Check whether --enable-debug was given.
14493if test "${enable_debug+set}" = set; then :
14494  enableval=$enable_debug;
14495        ENABLE_DEBUG="${enableval}"
14496        DEBUG_LEVEL="fastdebug"
14497
14498else
14499  ENABLE_DEBUG="no"
14500fi
14501
14502
14503
14504# Check whether --with-debug-level was given.
14505if test "${with_debug_level+set}" = set; then :
14506  withval=$with_debug_level;
14507        DEBUG_LEVEL="${withval}"
14508        if test "x$ENABLE_DEBUG" = xyes; then
14509          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14510        fi
14511
14512fi
14513
14514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14515$as_echo "$DEBUG_LEVEL" >&6; }
14516
14517  if test "x$DEBUG_LEVEL" != xrelease && \
14518      test "x$DEBUG_LEVEL" != xfastdebug && \
14519      test "x$DEBUG_LEVEL" != xslowdebug; then
14520    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14521  fi
14522
14523
14524  ###############################################################################
14525  #
14526  # Setup legacy vars/targets and new vars to deal with different debug levels.
14527  #
14528
14529  case $DEBUG_LEVEL in
14530    release )
14531      VARIANT="OPT"
14532      FASTDEBUG="false"
14533      DEBUG_CLASSFILES="false"
14534      BUILD_VARIANT_RELEASE=""
14535      HOTSPOT_DEBUG_LEVEL="product"
14536      HOTSPOT_EXPORT="product"
14537      ;;
14538    fastdebug )
14539      VARIANT="DBG"
14540      FASTDEBUG="true"
14541      DEBUG_CLASSFILES="true"
14542      BUILD_VARIANT_RELEASE="-fastdebug"
14543      HOTSPOT_DEBUG_LEVEL="fastdebug"
14544      HOTSPOT_EXPORT="fastdebug"
14545      ;;
14546    slowdebug )
14547      VARIANT="DBG"
14548      FASTDEBUG="false"
14549      DEBUG_CLASSFILES="true"
14550      BUILD_VARIANT_RELEASE="-debug"
14551      HOTSPOT_DEBUG_LEVEL="jvmg"
14552      HOTSPOT_EXPORT="debug"
14553      ;;
14554  esac
14555
14556  #####
14557  # Generate the legacy makefile targets for hotspot.
14558  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14559  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14560  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14561  # But until then ...
14562  HOTSPOT_TARGET=""
14563
14564  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14565    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14566  fi
14567
14568  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14569    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14570  fi
14571
14572  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14573    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14574  fi
14575
14576  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14577    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14578  fi
14579
14580  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14581    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14582  fi
14583
14584  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14585    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14586  fi
14587
14588  if test "x$JVM_VARIANT_CORE" = xtrue; then
14589    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14590  fi
14591
14592  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14593
14594  # On Macosx universal binaries are produced, but they only contain
14595  # 64 bit intel. This invalidates control of which jvms are built
14596  # from configure, but only server is valid anyway. Fix this
14597  # when hotspot makefiles are rewritten.
14598  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14599    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14600  fi
14601
14602  #####
14603
14604
14605
14606
14607
14608
14609
14610
14611# With basic setup done, call the custom early hook.
14612
14613
14614# To properly create a configuration name, we need to have the OpenJDK target
14615# and options (variants and debug level) parsed.
14616
14617
14618
14619# Check whether --with-conf-name was given.
14620if test "${with_conf_name+set}" = set; then :
14621  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14622fi
14623
14624
14625  # Test from where we are running configure, in or outside of src root.
14626  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14627      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14628      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14629    # We are running configure from the src root.
14630    # Create a default ./build/target-variant-debuglevel output root.
14631    if test "x${CONF_NAME}" = x; then
14632      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14633    fi
14634    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14635    $MKDIR -p "$OUTPUT_ROOT"
14636    if test ! -d "$OUTPUT_ROOT"; then
14637      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14638    fi
14639  else
14640    # We are running configure from outside of the src dir.
14641    # Then use the current directory as output dir!
14642    # If configuration is situated in normal build directory, just use the build
14643    # directory name as configuration name, otherwise use the complete path.
14644    if test "x${CONF_NAME}" = x; then
14645      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14646    fi
14647    OUTPUT_ROOT="$CURDIR"
14648
14649    # WARNING: This might be a bad thing to do. You need to be sure you want to
14650    # have a configuration in this directory. Do some sanity checks!
14651
14652    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14653      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14654      # other files
14655      files_present=`$LS $OUTPUT_ROOT`
14656      # Configure has already touched config.log and confdefs.h in the current dir when this check
14657      # is performed.
14658      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14659      | $TR -d '\n'`
14660      if test "x$filtered_files" != x; then
14661        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14662$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14663        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14664$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14665        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14666$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14667        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14668$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14669        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14670$as_echo "$as_me: seriously mess up just about everything." >&6;}
14671        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14672$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14673        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14674$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14675        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14676      fi
14677    fi
14678  fi
14679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14680$as_echo_n "checking what configuration name to use... " >&6; }
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14682$as_echo "$CONF_NAME" >&6; }
14683
14684
14685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14686
14687  # Input might be given as Windows format, start by converting to
14688  # unix format.
14689  path="$OUTPUT_ROOT"
14690  new_path=`$CYGPATH -u "$path"`
14691
14692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14695  # "foo.exe" is OK but "foo" is an error.
14696  #
14697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14698  # It is also a way to make sure we got the proper file name for the real test later on.
14699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14700  if test "x$test_shortpath" = x; then
14701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14702$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14703    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14704  fi
14705
14706  # Call helper function which possibly converts this using DOS-style short mode.
14707  # If so, the updated path is stored in $new_path.
14708
14709  input_path="$new_path"
14710  # Check if we need to convert this using DOS-style short mode. If the path
14711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14712  # take no chances and rewrite it.
14713  # Note: m4 eats our [], so we need to use [ and ] instead.
14714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14715  if test "x$has_forbidden_chars" != x; then
14716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14720      # Going to short mode and back again did indeed matter. Since short mode is
14721      # case insensitive, let's make it lowercase to improve readability.
14722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14723      # Now convert it back to Unix-stile (cygpath)
14724      input_path=`$CYGPATH -u "$shortmode_path"`
14725      new_path="$input_path"
14726    fi
14727  fi
14728
14729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14730  if test "x$test_cygdrive_prefix" = x; then
14731    # As a simple fix, exclude /usr/bin since it's not a real path.
14732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14734      # a path prefixed by /cygdrive for fixpath to work.
14735      new_path="$CYGWIN_ROOT_PATH$input_path"
14736    fi
14737  fi
14738
14739
14740  if test "x$path" != "x$new_path"; then
14741    OUTPUT_ROOT="$new_path"
14742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14743$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14744  fi
14745
14746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747
14748  path="$OUTPUT_ROOT"
14749  has_colon=`$ECHO $path | $GREP ^.:`
14750  new_path="$path"
14751  if test "x$has_colon" = x; then
14752    # Not in mixed or Windows style, start by that.
14753    new_path=`cmd //c echo $path`
14754  fi
14755
14756
14757  input_path="$new_path"
14758  # Check if we need to convert this using DOS-style short mode. If the path
14759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14760  # take no chances and rewrite it.
14761  # Note: m4 eats our [], so we need to use [ and ] instead.
14762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14763  if test "x$has_forbidden_chars" != x; then
14764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14766  fi
14767
14768
14769  windows_path="$new_path"
14770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14771    unix_path=`$CYGPATH -u "$windows_path"`
14772    new_path="$unix_path"
14773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14775    new_path="$unix_path"
14776  fi
14777
14778  if test "x$path" != "x$new_path"; then
14779    OUTPUT_ROOT="$new_path"
14780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14781$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14782  fi
14783
14784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14786
14787  else
14788    # We're on a posix platform. Hooray! :)
14789    path="$OUTPUT_ROOT"
14790    has_space=`$ECHO "$path" | $GREP " "`
14791    if test "x$has_space" != x; then
14792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14793$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14794      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14795    fi
14796
14797    # Use eval to expand a potential ~
14798    eval path="$path"
14799    if test ! -f "$path" && test ! -d "$path"; then
14800      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14801    fi
14802
14803    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14804  fi
14805
14806
14807  SPEC=$OUTPUT_ROOT/spec.gmk
14808
14809  CONF_NAME=$CONF_NAME
14810
14811  OUTPUT_ROOT=$OUTPUT_ROOT
14812
14813
14814  # Most of the probed defines are put into config.h
14815  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14816
14817  # The spec.gmk file contains all variables for the make system.
14818  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14819
14820  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14821  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14822
14823  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14824  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14825
14826  # The compare.sh is used to compare the build output to other builds.
14827  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14828
14829  # Spec.sh is currently used by compare-objects.sh
14830  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14831
14832  # The generated Makefile knows where the spec.gmk is and where the source is.
14833  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14834  # which will look for generated configurations
14835  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14836
14837
14838
14839# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14840
14841  for ac_prog in apt-get yum port pkgutil pkgadd
14842do
14843  # Extract the first word of "$ac_prog", so it can be a program name with args.
14844set dummy $ac_prog; ac_word=$2
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14846$as_echo_n "checking for $ac_word... " >&6; }
14847if ${ac_cv_prog_PKGHANDLER+:} false; then :
14848  $as_echo_n "(cached) " >&6
14849else
14850  if test -n "$PKGHANDLER"; then
14851  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14852else
14853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14854for as_dir in $PATH
14855do
14856  IFS=$as_save_IFS
14857  test -z "$as_dir" && as_dir=.
14858    for ac_exec_ext in '' $ac_executable_extensions; do
14859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14860    ac_cv_prog_PKGHANDLER="$ac_prog"
14861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14862    break 2
14863  fi
14864done
14865  done
14866IFS=$as_save_IFS
14867
14868fi
14869fi
14870PKGHANDLER=$ac_cv_prog_PKGHANDLER
14871if test -n "$PKGHANDLER"; then
14872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14873$as_echo "$PKGHANDLER" >&6; }
14874else
14875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876$as_echo "no" >&6; }
14877fi
14878
14879
14880  test -n "$PKGHANDLER" && break
14881done
14882
14883
14884
14885# Setup tools that requires more complex handling, or that is not needed by the configure script.
14886
14887
14888  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14889  if test "x$MAKE" != x; then
14890    # User has supplied a make, test it.
14891    if test ! -f "$MAKE"; then
14892      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14893    fi
14894
14895  MAKE_CANDIDATE=""$MAKE""
14896  DESCRIPTION="user supplied MAKE=$MAKE"
14897  if test "x$MAKE_CANDIDATE" != x; then
14898    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14899$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14900    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14901    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14902    if test "x$IS_GNU_MAKE" = x; then
14903      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14904$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14905    else
14906      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14907      if test "x$IS_MODERN_MAKE" = x; then
14908        { $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
14909$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;}
14910      else
14911        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14912          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14913            MAKE_EXPECTED_ENV='cygwin'
14914          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14915            MAKE_EXPECTED_ENV='msys'
14916          else
14917            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14918          fi
14919          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14920          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14921        else
14922          # Not relevant for non-Windows
14923          IS_MAKE_CORRECT_ENV=true
14924        fi
14925        if test "x$IS_MAKE_CORRECT_ENV" = x; then
14926          { $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
14927$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;}
14928        else
14929          FOUND_MAKE=$MAKE_CANDIDATE
14930
14931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14932
14933  # First separate the path from the arguments. This will split at the first
14934  # space.
14935  complete="$FOUND_MAKE"
14936  path="${complete%% *}"
14937  tmp="$complete EOL"
14938  arguments="${tmp#* }"
14939
14940  # Input might be given as Windows format, start by converting to
14941  # unix format.
14942  new_path=`$CYGPATH -u "$path"`
14943
14944  # Now try to locate executable using which
14945  new_path=`$WHICH "$new_path" 2> /dev/null`
14946  # bat and cmd files are not always considered executable in cygwin causing which
14947  # to not find them
14948  if test "x$new_path" = x \
14949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14951    new_path=`$CYGPATH -u "$path"`
14952  fi
14953  if test "x$new_path" = x; then
14954    # Oops. Which didn't find the executable.
14955    # The splitting of arguments from the executable at a space might have been incorrect,
14956    # since paths with space are more likely in Windows. Give it another try with the whole
14957    # argument.
14958    path="$complete"
14959    arguments="EOL"
14960    new_path=`$CYGPATH -u "$path"`
14961    new_path=`$WHICH "$new_path" 2> /dev/null`
14962    # bat and cmd files are not always considered executable in cygwin causing which
14963    # to not find them
14964    if test "x$new_path" = x \
14965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14967      new_path=`$CYGPATH -u "$path"`
14968    fi
14969    if test "x$new_path" = x; then
14970      # It's still not found. Now this is an unrecoverable error.
14971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14972$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14973      has_space=`$ECHO "$complete" | $GREP " "`
14974      if test "x$has_space" != x; then
14975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14977      fi
14978      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14979    fi
14980  fi
14981
14982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14985  # "foo.exe" is OK but "foo" is an error.
14986  #
14987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
14988  # It is also a way to make sure we got the proper file name for the real test later on.
14989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14990  if test "x$test_shortpath" = x; then
14991    # Short path failed, file does not exist as specified.
14992    # Try adding .exe or .cmd
14993    if test -f "${new_path}.exe"; then
14994      input_to_shortpath="${new_path}.exe"
14995    elif test -f "${new_path}.cmd"; then
14996      input_to_shortpath="${new_path}.cmd"
14997    else
14998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
14999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15002      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15003    fi
15004  else
15005    input_to_shortpath="$new_path"
15006  fi
15007
15008  # Call helper function which possibly converts this using DOS-style short mode.
15009  # If so, the updated path is stored in $new_path.
15010  new_path="$input_to_shortpath"
15011
15012  input_path="$input_to_shortpath"
15013  # Check if we need to convert this using DOS-style short mode. If the path
15014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15015  # take no chances and rewrite it.
15016  # Note: m4 eats our [], so we need to use [ and ] instead.
15017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15018  if test "x$has_forbidden_chars" != x; then
15019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15023      # Going to short mode and back again did indeed matter. Since short mode is
15024      # case insensitive, let's make it lowercase to improve readability.
15025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15026      # Now convert it back to Unix-stile (cygpath)
15027      input_path=`$CYGPATH -u "$shortmode_path"`
15028      new_path="$input_path"
15029    fi
15030  fi
15031
15032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15033  if test "x$test_cygdrive_prefix" = x; then
15034    # As a simple fix, exclude /usr/bin since it's not a real path.
15035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15037      # a path prefixed by /cygdrive for fixpath to work.
15038      new_path="$CYGWIN_ROOT_PATH$input_path"
15039    fi
15040  fi
15041
15042  # remove trailing .exe if any
15043  new_path="${new_path/%.exe/}"
15044
15045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15046
15047  # First separate the path from the arguments. This will split at the first
15048  # space.
15049  complete="$FOUND_MAKE"
15050  path="${complete%% *}"
15051  tmp="$complete EOL"
15052  arguments="${tmp#* }"
15053
15054  # Input might be given as Windows format, start by converting to
15055  # unix format.
15056  new_path="$path"
15057
15058  windows_path="$new_path"
15059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15060    unix_path=`$CYGPATH -u "$windows_path"`
15061    new_path="$unix_path"
15062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15064    new_path="$unix_path"
15065  fi
15066
15067
15068  # Now try to locate executable using which
15069  new_path=`$WHICH "$new_path" 2> /dev/null`
15070
15071  if test "x$new_path" = x; then
15072    # Oops. Which didn't find the executable.
15073    # The splitting of arguments from the executable at a space might have been incorrect,
15074    # since paths with space are more likely in Windows. Give it another try with the whole
15075    # argument.
15076    path="$complete"
15077    arguments="EOL"
15078    new_path="$path"
15079
15080  windows_path="$new_path"
15081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15082    unix_path=`$CYGPATH -u "$windows_path"`
15083    new_path="$unix_path"
15084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15086    new_path="$unix_path"
15087  fi
15088
15089
15090    new_path=`$WHICH "$new_path" 2> /dev/null`
15091
15092    if test "x$new_path" = x; then
15093      # It's still not found. Now this is an unrecoverable error.
15094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15096      has_space=`$ECHO "$complete" | $GREP " "`
15097      if test "x$has_space" != x; then
15098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15100      fi
15101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15102    fi
15103  fi
15104
15105  # Now new_path has a complete unix path to the binary
15106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15107    # Keep paths in /bin as-is, but remove trailing .exe if any
15108    new_path="${new_path/%.exe/}"
15109    # Do not save /bin paths to all_fixpath_prefixes!
15110  else
15111    # Not in mixed or Windows style, start by that.
15112    new_path=`cmd //c echo $new_path`
15113
15114  input_path="$new_path"
15115  # Check if we need to convert this using DOS-style short mode. If the path
15116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15117  # take no chances and rewrite it.
15118  # Note: m4 eats our [], so we need to use [ and ] instead.
15119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15120  if test "x$has_forbidden_chars" != x; then
15121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15123  fi
15124
15125    # Output is in $new_path
15126
15127  windows_path="$new_path"
15128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15129    unix_path=`$CYGPATH -u "$windows_path"`
15130    new_path="$unix_path"
15131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15133    new_path="$unix_path"
15134  fi
15135
15136    # remove trailing .exe if any
15137    new_path="${new_path/%.exe/}"
15138
15139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15141  fi
15142
15143  else
15144    # We're on a posix platform. Hooray! :)
15145    # First separate the path from the arguments. This will split at the first
15146    # space.
15147    complete="$FOUND_MAKE"
15148    path="${complete%% *}"
15149    tmp="$complete EOL"
15150    arguments="${tmp#* }"
15151
15152    # Cannot rely on the command "which" here since it doesn't always work.
15153    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15154    if test -z "$is_absolute_path"; then
15155      # Path to executable is not absolute. Find it.
15156      IFS_save="$IFS"
15157      IFS=:
15158      for p in $PATH; do
15159        if test -f "$p/$path" && test -x "$p/$path"; then
15160          new_path="$p/$path"
15161          break
15162        fi
15163      done
15164      IFS="$IFS_save"
15165    else
15166      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15167$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15168      new_path="$path"
15169    fi
15170
15171    if test "x$new_path" = x; then
15172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15173$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15174      has_space=`$ECHO "$complete" | $GREP " "`
15175      if test "x$has_space" != x; then
15176        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15178      fi
15179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15180    fi
15181  fi
15182
15183  # Now join together the path and the arguments once again
15184  if test "x$arguments" != xEOL; then
15185    new_complete="$new_path ${arguments% *}"
15186  else
15187    new_complete="$new_path"
15188  fi
15189
15190  if test "x$complete" != "x$new_complete"; then
15191    FOUND_MAKE="$new_complete"
15192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15193$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15194  fi
15195
15196        fi
15197      fi
15198    fi
15199  fi
15200
15201    if test "x$FOUND_MAKE" = x; then
15202      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15203    fi
15204  else
15205    # Try our hardest to locate a correct version of GNU make
15206    for ac_prog in gmake
15207do
15208  # Extract the first word of "$ac_prog", so it can be a program name with args.
15209set dummy $ac_prog; ac_word=$2
15210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15211$as_echo_n "checking for $ac_word... " >&6; }
15212if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15213  $as_echo_n "(cached) " >&6
15214else
15215  case $CHECK_GMAKE in
15216  [\\/]* | ?:[\\/]*)
15217  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15218  ;;
15219  *)
15220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15221for as_dir in $PATH
15222do
15223  IFS=$as_save_IFS
15224  test -z "$as_dir" && as_dir=.
15225    for ac_exec_ext in '' $ac_executable_extensions; do
15226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15227    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15229    break 2
15230  fi
15231done
15232  done
15233IFS=$as_save_IFS
15234
15235  ;;
15236esac
15237fi
15238CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15239if test -n "$CHECK_GMAKE"; then
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15241$as_echo "$CHECK_GMAKE" >&6; }
15242else
15243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15244$as_echo "no" >&6; }
15245fi
15246
15247
15248  test -n "$CHECK_GMAKE" && break
15249done
15250
15251
15252  MAKE_CANDIDATE=""$CHECK_GMAKE""
15253  DESCRIPTION="gmake in PATH"
15254  if test "x$MAKE_CANDIDATE" != x; then
15255    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15256$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15257    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15258    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15259    if test "x$IS_GNU_MAKE" = x; then
15260      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15261$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15262    else
15263      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15264      if test "x$IS_MODERN_MAKE" = x; then
15265        { $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
15266$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;}
15267      else
15268        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15269          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15270            MAKE_EXPECTED_ENV='cygwin'
15271          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15272            MAKE_EXPECTED_ENV='msys'
15273          else
15274            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15275          fi
15276          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15277          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15278        else
15279          # Not relevant for non-Windows
15280          IS_MAKE_CORRECT_ENV=true
15281        fi
15282        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15283          { $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
15284$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;}
15285        else
15286          FOUND_MAKE=$MAKE_CANDIDATE
15287
15288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15289
15290  # First separate the path from the arguments. This will split at the first
15291  # space.
15292  complete="$FOUND_MAKE"
15293  path="${complete%% *}"
15294  tmp="$complete EOL"
15295  arguments="${tmp#* }"
15296
15297  # Input might be given as Windows format, start by converting to
15298  # unix format.
15299  new_path=`$CYGPATH -u "$path"`
15300
15301  # Now try to locate executable using which
15302  new_path=`$WHICH "$new_path" 2> /dev/null`
15303  # bat and cmd files are not always considered executable in cygwin causing which
15304  # to not find them
15305  if test "x$new_path" = x \
15306      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15307      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15308    new_path=`$CYGPATH -u "$path"`
15309  fi
15310  if test "x$new_path" = x; then
15311    # Oops. Which didn't find the executable.
15312    # The splitting of arguments from the executable at a space might have been incorrect,
15313    # since paths with space are more likely in Windows. Give it another try with the whole
15314    # argument.
15315    path="$complete"
15316    arguments="EOL"
15317    new_path=`$CYGPATH -u "$path"`
15318    new_path=`$WHICH "$new_path" 2> /dev/null`
15319    # bat and cmd files are not always considered executable in cygwin causing which
15320    # to not find them
15321    if test "x$new_path" = x \
15322        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15323        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15324      new_path=`$CYGPATH -u "$path"`
15325    fi
15326    if test "x$new_path" = x; then
15327      # It's still not found. Now this is an unrecoverable error.
15328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15329$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15330      has_space=`$ECHO "$complete" | $GREP " "`
15331      if test "x$has_space" != x; then
15332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15334      fi
15335      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15336    fi
15337  fi
15338
15339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15342  # "foo.exe" is OK but "foo" is an error.
15343  #
15344  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15345  # It is also a way to make sure we got the proper file name for the real test later on.
15346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15347  if test "x$test_shortpath" = x; then
15348    # Short path failed, file does not exist as specified.
15349    # Try adding .exe or .cmd
15350    if test -f "${new_path}.exe"; then
15351      input_to_shortpath="${new_path}.exe"
15352    elif test -f "${new_path}.cmd"; then
15353      input_to_shortpath="${new_path}.cmd"
15354    else
15355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15357      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15358$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15359      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15360    fi
15361  else
15362    input_to_shortpath="$new_path"
15363  fi
15364
15365  # Call helper function which possibly converts this using DOS-style short mode.
15366  # If so, the updated path is stored in $new_path.
15367  new_path="$input_to_shortpath"
15368
15369  input_path="$input_to_shortpath"
15370  # Check if we need to convert this using DOS-style short mode. If the path
15371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15372  # take no chances and rewrite it.
15373  # Note: m4 eats our [], so we need to use [ and ] instead.
15374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15375  if test "x$has_forbidden_chars" != x; then
15376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15380      # Going to short mode and back again did indeed matter. Since short mode is
15381      # case insensitive, let's make it lowercase to improve readability.
15382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15383      # Now convert it back to Unix-stile (cygpath)
15384      input_path=`$CYGPATH -u "$shortmode_path"`
15385      new_path="$input_path"
15386    fi
15387  fi
15388
15389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15390  if test "x$test_cygdrive_prefix" = x; then
15391    # As a simple fix, exclude /usr/bin since it's not a real path.
15392    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15394      # a path prefixed by /cygdrive for fixpath to work.
15395      new_path="$CYGWIN_ROOT_PATH$input_path"
15396    fi
15397  fi
15398
15399  # remove trailing .exe if any
15400  new_path="${new_path/%.exe/}"
15401
15402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15403
15404  # First separate the path from the arguments. This will split at the first
15405  # space.
15406  complete="$FOUND_MAKE"
15407  path="${complete%% *}"
15408  tmp="$complete EOL"
15409  arguments="${tmp#* }"
15410
15411  # Input might be given as Windows format, start by converting to
15412  # unix format.
15413  new_path="$path"
15414
15415  windows_path="$new_path"
15416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15417    unix_path=`$CYGPATH -u "$windows_path"`
15418    new_path="$unix_path"
15419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15421    new_path="$unix_path"
15422  fi
15423
15424
15425  # Now try to locate executable using which
15426  new_path=`$WHICH "$new_path" 2> /dev/null`
15427
15428  if test "x$new_path" = x; then
15429    # Oops. Which didn't find the executable.
15430    # The splitting of arguments from the executable at a space might have been incorrect,
15431    # since paths with space are more likely in Windows. Give it another try with the whole
15432    # argument.
15433    path="$complete"
15434    arguments="EOL"
15435    new_path="$path"
15436
15437  windows_path="$new_path"
15438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15439    unix_path=`$CYGPATH -u "$windows_path"`
15440    new_path="$unix_path"
15441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15443    new_path="$unix_path"
15444  fi
15445
15446
15447    new_path=`$WHICH "$new_path" 2> /dev/null`
15448
15449    if test "x$new_path" = x; then
15450      # It's still not found. Now this is an unrecoverable error.
15451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15452$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15453      has_space=`$ECHO "$complete" | $GREP " "`
15454      if test "x$has_space" != x; then
15455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15457      fi
15458      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15459    fi
15460  fi
15461
15462  # Now new_path has a complete unix path to the binary
15463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15464    # Keep paths in /bin as-is, but remove trailing .exe if any
15465    new_path="${new_path/%.exe/}"
15466    # Do not save /bin paths to all_fixpath_prefixes!
15467  else
15468    # Not in mixed or Windows style, start by that.
15469    new_path=`cmd //c echo $new_path`
15470
15471  input_path="$new_path"
15472  # Check if we need to convert this using DOS-style short mode. If the path
15473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15474  # take no chances and rewrite it.
15475  # Note: m4 eats our [], so we need to use [ and ] instead.
15476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15477  if test "x$has_forbidden_chars" != x; then
15478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15480  fi
15481
15482    # Output is in $new_path
15483
15484  windows_path="$new_path"
15485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15486    unix_path=`$CYGPATH -u "$windows_path"`
15487    new_path="$unix_path"
15488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15490    new_path="$unix_path"
15491  fi
15492
15493    # remove trailing .exe if any
15494    new_path="${new_path/%.exe/}"
15495
15496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15498  fi
15499
15500  else
15501    # We're on a posix platform. Hooray! :)
15502    # First separate the path from the arguments. This will split at the first
15503    # space.
15504    complete="$FOUND_MAKE"
15505    path="${complete%% *}"
15506    tmp="$complete EOL"
15507    arguments="${tmp#* }"
15508
15509    # Cannot rely on the command "which" here since it doesn't always work.
15510    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15511    if test -z "$is_absolute_path"; then
15512      # Path to executable is not absolute. Find it.
15513      IFS_save="$IFS"
15514      IFS=:
15515      for p in $PATH; do
15516        if test -f "$p/$path" && test -x "$p/$path"; then
15517          new_path="$p/$path"
15518          break
15519        fi
15520      done
15521      IFS="$IFS_save"
15522    else
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15524$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15525      new_path="$path"
15526    fi
15527
15528    if test "x$new_path" = x; then
15529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15530$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15531      has_space=`$ECHO "$complete" | $GREP " "`
15532      if test "x$has_space" != x; then
15533        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15534$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15535      fi
15536      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15537    fi
15538  fi
15539
15540  # Now join together the path and the arguments once again
15541  if test "x$arguments" != xEOL; then
15542    new_complete="$new_path ${arguments% *}"
15543  else
15544    new_complete="$new_path"
15545  fi
15546
15547  if test "x$complete" != "x$new_complete"; then
15548    FOUND_MAKE="$new_complete"
15549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15550$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15551  fi
15552
15553        fi
15554      fi
15555    fi
15556  fi
15557
15558
15559    if test "x$FOUND_MAKE" = x; then
15560      for ac_prog in make
15561do
15562  # Extract the first word of "$ac_prog", so it can be a program name with args.
15563set dummy $ac_prog; ac_word=$2
15564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15565$as_echo_n "checking for $ac_word... " >&6; }
15566if ${ac_cv_path_CHECK_MAKE+:} false; then :
15567  $as_echo_n "(cached) " >&6
15568else
15569  case $CHECK_MAKE in
15570  [\\/]* | ?:[\\/]*)
15571  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15572  ;;
15573  *)
15574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15575for as_dir in $PATH
15576do
15577  IFS=$as_save_IFS
15578  test -z "$as_dir" && as_dir=.
15579    for ac_exec_ext in '' $ac_executable_extensions; do
15580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15581    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15583    break 2
15584  fi
15585done
15586  done
15587IFS=$as_save_IFS
15588
15589  ;;
15590esac
15591fi
15592CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15593if test -n "$CHECK_MAKE"; then
15594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15595$as_echo "$CHECK_MAKE" >&6; }
15596else
15597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15598$as_echo "no" >&6; }
15599fi
15600
15601
15602  test -n "$CHECK_MAKE" && break
15603done
15604
15605
15606  MAKE_CANDIDATE=""$CHECK_MAKE""
15607  DESCRIPTION="make in PATH"
15608  if test "x$MAKE_CANDIDATE" != x; then
15609    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15610$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15611    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15612    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15613    if test "x$IS_GNU_MAKE" = x; then
15614      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15615$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15616    else
15617      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15618      if test "x$IS_MODERN_MAKE" = x; then
15619        { $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
15620$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;}
15621      else
15622        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15623          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15624            MAKE_EXPECTED_ENV='cygwin'
15625          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15626            MAKE_EXPECTED_ENV='msys'
15627          else
15628            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15629          fi
15630          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15631          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15632        else
15633          # Not relevant for non-Windows
15634          IS_MAKE_CORRECT_ENV=true
15635        fi
15636        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15637          { $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
15638$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;}
15639        else
15640          FOUND_MAKE=$MAKE_CANDIDATE
15641
15642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15643
15644  # First separate the path from the arguments. This will split at the first
15645  # space.
15646  complete="$FOUND_MAKE"
15647  path="${complete%% *}"
15648  tmp="$complete EOL"
15649  arguments="${tmp#* }"
15650
15651  # Input might be given as Windows format, start by converting to
15652  # unix format.
15653  new_path=`$CYGPATH -u "$path"`
15654
15655  # Now try to locate executable using which
15656  new_path=`$WHICH "$new_path" 2> /dev/null`
15657  # bat and cmd files are not always considered executable in cygwin causing which
15658  # to not find them
15659  if test "x$new_path" = x \
15660      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15661      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15662    new_path=`$CYGPATH -u "$path"`
15663  fi
15664  if test "x$new_path" = x; then
15665    # Oops. Which didn't find the executable.
15666    # The splitting of arguments from the executable at a space might have been incorrect,
15667    # since paths with space are more likely in Windows. Give it another try with the whole
15668    # argument.
15669    path="$complete"
15670    arguments="EOL"
15671    new_path=`$CYGPATH -u "$path"`
15672    new_path=`$WHICH "$new_path" 2> /dev/null`
15673    # bat and cmd files are not always considered executable in cygwin causing which
15674    # to not find them
15675    if test "x$new_path" = x \
15676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15678      new_path=`$CYGPATH -u "$path"`
15679    fi
15680    if test "x$new_path" = x; then
15681      # It's still not found. Now this is an unrecoverable error.
15682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15683$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15684      has_space=`$ECHO "$complete" | $GREP " "`
15685      if test "x$has_space" != x; then
15686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15688      fi
15689      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15690    fi
15691  fi
15692
15693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15696  # "foo.exe" is OK but "foo" is an error.
15697  #
15698  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15699  # It is also a way to make sure we got the proper file name for the real test later on.
15700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15701  if test "x$test_shortpath" = x; then
15702    # Short path failed, file does not exist as specified.
15703    # Try adding .exe or .cmd
15704    if test -f "${new_path}.exe"; then
15705      input_to_shortpath="${new_path}.exe"
15706    elif test -f "${new_path}.cmd"; then
15707      input_to_shortpath="${new_path}.cmd"
15708    else
15709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15710$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15713      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15714    fi
15715  else
15716    input_to_shortpath="$new_path"
15717  fi
15718
15719  # Call helper function which possibly converts this using DOS-style short mode.
15720  # If so, the updated path is stored in $new_path.
15721  new_path="$input_to_shortpath"
15722
15723  input_path="$input_to_shortpath"
15724  # Check if we need to convert this using DOS-style short mode. If the path
15725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15726  # take no chances and rewrite it.
15727  # Note: m4 eats our [], so we need to use [ and ] instead.
15728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15729  if test "x$has_forbidden_chars" != x; then
15730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15734      # Going to short mode and back again did indeed matter. Since short mode is
15735      # case insensitive, let's make it lowercase to improve readability.
15736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15737      # Now convert it back to Unix-stile (cygpath)
15738      input_path=`$CYGPATH -u "$shortmode_path"`
15739      new_path="$input_path"
15740    fi
15741  fi
15742
15743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15744  if test "x$test_cygdrive_prefix" = x; then
15745    # As a simple fix, exclude /usr/bin since it's not a real path.
15746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15748      # a path prefixed by /cygdrive for fixpath to work.
15749      new_path="$CYGWIN_ROOT_PATH$input_path"
15750    fi
15751  fi
15752
15753  # remove trailing .exe if any
15754  new_path="${new_path/%.exe/}"
15755
15756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15757
15758  # First separate the path from the arguments. This will split at the first
15759  # space.
15760  complete="$FOUND_MAKE"
15761  path="${complete%% *}"
15762  tmp="$complete EOL"
15763  arguments="${tmp#* }"
15764
15765  # Input might be given as Windows format, start by converting to
15766  # unix format.
15767  new_path="$path"
15768
15769  windows_path="$new_path"
15770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15771    unix_path=`$CYGPATH -u "$windows_path"`
15772    new_path="$unix_path"
15773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15775    new_path="$unix_path"
15776  fi
15777
15778
15779  # Now try to locate executable using which
15780  new_path=`$WHICH "$new_path" 2> /dev/null`
15781
15782  if test "x$new_path" = x; then
15783    # Oops. Which didn't find the executable.
15784    # The splitting of arguments from the executable at a space might have been incorrect,
15785    # since paths with space are more likely in Windows. Give it another try with the whole
15786    # argument.
15787    path="$complete"
15788    arguments="EOL"
15789    new_path="$path"
15790
15791  windows_path="$new_path"
15792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15793    unix_path=`$CYGPATH -u "$windows_path"`
15794    new_path="$unix_path"
15795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15797    new_path="$unix_path"
15798  fi
15799
15800
15801    new_path=`$WHICH "$new_path" 2> /dev/null`
15802
15803    if test "x$new_path" = x; then
15804      # It's still not found. Now this is an unrecoverable error.
15805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15806$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15807      has_space=`$ECHO "$complete" | $GREP " "`
15808      if test "x$has_space" != x; then
15809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15811      fi
15812      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15813    fi
15814  fi
15815
15816  # Now new_path has a complete unix path to the binary
15817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15818    # Keep paths in /bin as-is, but remove trailing .exe if any
15819    new_path="${new_path/%.exe/}"
15820    # Do not save /bin paths to all_fixpath_prefixes!
15821  else
15822    # Not in mixed or Windows style, start by that.
15823    new_path=`cmd //c echo $new_path`
15824
15825  input_path="$new_path"
15826  # Check if we need to convert this using DOS-style short mode. If the path
15827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15828  # take no chances and rewrite it.
15829  # Note: m4 eats our [], so we need to use [ and ] instead.
15830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15831  if test "x$has_forbidden_chars" != x; then
15832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15834  fi
15835
15836    # Output is in $new_path
15837
15838  windows_path="$new_path"
15839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15840    unix_path=`$CYGPATH -u "$windows_path"`
15841    new_path="$unix_path"
15842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15844    new_path="$unix_path"
15845  fi
15846
15847    # remove trailing .exe if any
15848    new_path="${new_path/%.exe/}"
15849
15850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15852  fi
15853
15854  else
15855    # We're on a posix platform. Hooray! :)
15856    # First separate the path from the arguments. This will split at the first
15857    # space.
15858    complete="$FOUND_MAKE"
15859    path="${complete%% *}"
15860    tmp="$complete EOL"
15861    arguments="${tmp#* }"
15862
15863    # Cannot rely on the command "which" here since it doesn't always work.
15864    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15865    if test -z "$is_absolute_path"; then
15866      # Path to executable is not absolute. Find it.
15867      IFS_save="$IFS"
15868      IFS=:
15869      for p in $PATH; do
15870        if test -f "$p/$path" && test -x "$p/$path"; then
15871          new_path="$p/$path"
15872          break
15873        fi
15874      done
15875      IFS="$IFS_save"
15876    else
15877      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15878$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15879      new_path="$path"
15880    fi
15881
15882    if test "x$new_path" = x; then
15883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15885      has_space=`$ECHO "$complete" | $GREP " "`
15886      if test "x$has_space" != x; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15889      fi
15890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15891    fi
15892  fi
15893
15894  # Now join together the path and the arguments once again
15895  if test "x$arguments" != xEOL; then
15896    new_complete="$new_path ${arguments% *}"
15897  else
15898    new_complete="$new_path"
15899  fi
15900
15901  if test "x$complete" != "x$new_complete"; then
15902    FOUND_MAKE="$new_complete"
15903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15904$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15905  fi
15906
15907        fi
15908      fi
15909    fi
15910  fi
15911
15912    fi
15913
15914    if test "x$FOUND_MAKE" = x; then
15915      if test "x$TOOLS_DIR" != x; then
15916        # We have a tools-dir, check that as well before giving up.
15917        OLD_PATH=$PATH
15918        PATH=$TOOLS_DIR:$PATH
15919        for ac_prog in gmake
15920do
15921  # Extract the first word of "$ac_prog", so it can be a program name with args.
15922set dummy $ac_prog; ac_word=$2
15923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15924$as_echo_n "checking for $ac_word... " >&6; }
15925if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15926  $as_echo_n "(cached) " >&6
15927else
15928  case $CHECK_TOOLSDIR_GMAKE in
15929  [\\/]* | ?:[\\/]*)
15930  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15931  ;;
15932  *)
15933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15934for as_dir in $PATH
15935do
15936  IFS=$as_save_IFS
15937  test -z "$as_dir" && as_dir=.
15938    for ac_exec_ext in '' $ac_executable_extensions; do
15939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15940    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15942    break 2
15943  fi
15944done
15945  done
15946IFS=$as_save_IFS
15947
15948  ;;
15949esac
15950fi
15951CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15952if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15954$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15955else
15956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15957$as_echo "no" >&6; }
15958fi
15959
15960
15961  test -n "$CHECK_TOOLSDIR_GMAKE" && break
15962done
15963
15964
15965  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15966  DESCRIPTION="gmake in tools-dir"
15967  if test "x$MAKE_CANDIDATE" != x; then
15968    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15969$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15970    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15971    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15972    if test "x$IS_GNU_MAKE" = x; then
15973      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15974$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15975    else
15976      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15977      if test "x$IS_MODERN_MAKE" = x; then
15978        { $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
15979$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;}
15980      else
15981        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15982          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15983            MAKE_EXPECTED_ENV='cygwin'
15984          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15985            MAKE_EXPECTED_ENV='msys'
15986          else
15987            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15988          fi
15989          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15990          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15991        else
15992          # Not relevant for non-Windows
15993          IS_MAKE_CORRECT_ENV=true
15994        fi
15995        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15996          { $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
15997$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;}
15998        else
15999          FOUND_MAKE=$MAKE_CANDIDATE
16000
16001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16002
16003  # First separate the path from the arguments. This will split at the first
16004  # space.
16005  complete="$FOUND_MAKE"
16006  path="${complete%% *}"
16007  tmp="$complete EOL"
16008  arguments="${tmp#* }"
16009
16010  # Input might be given as Windows format, start by converting to
16011  # unix format.
16012  new_path=`$CYGPATH -u "$path"`
16013
16014  # Now try to locate executable using which
16015  new_path=`$WHICH "$new_path" 2> /dev/null`
16016  # bat and cmd files are not always considered executable in cygwin causing which
16017  # to not find them
16018  if test "x$new_path" = x \
16019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16021    new_path=`$CYGPATH -u "$path"`
16022  fi
16023  if test "x$new_path" = x; then
16024    # Oops. Which didn't find the executable.
16025    # The splitting of arguments from the executable at a space might have been incorrect,
16026    # since paths with space are more likely in Windows. Give it another try with the whole
16027    # argument.
16028    path="$complete"
16029    arguments="EOL"
16030    new_path=`$CYGPATH -u "$path"`
16031    new_path=`$WHICH "$new_path" 2> /dev/null`
16032    # bat and cmd files are not always considered executable in cygwin causing which
16033    # to not find them
16034    if test "x$new_path" = x \
16035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16037      new_path=`$CYGPATH -u "$path"`
16038    fi
16039    if test "x$new_path" = x; then
16040      # It's still not found. Now this is an unrecoverable error.
16041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16043      has_space=`$ECHO "$complete" | $GREP " "`
16044      if test "x$has_space" != x; then
16045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16047      fi
16048      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16049    fi
16050  fi
16051
16052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16055  # "foo.exe" is OK but "foo" is an error.
16056  #
16057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16058  # It is also a way to make sure we got the proper file name for the real test later on.
16059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16060  if test "x$test_shortpath" = x; then
16061    # Short path failed, file does not exist as specified.
16062    # Try adding .exe or .cmd
16063    if test -f "${new_path}.exe"; then
16064      input_to_shortpath="${new_path}.exe"
16065    elif test -f "${new_path}.cmd"; then
16066      input_to_shortpath="${new_path}.cmd"
16067    else
16068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16069$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16072      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16073    fi
16074  else
16075    input_to_shortpath="$new_path"
16076  fi
16077
16078  # Call helper function which possibly converts this using DOS-style short mode.
16079  # If so, the updated path is stored in $new_path.
16080  new_path="$input_to_shortpath"
16081
16082  input_path="$input_to_shortpath"
16083  # Check if we need to convert this using DOS-style short mode. If the path
16084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16085  # take no chances and rewrite it.
16086  # Note: m4 eats our [], so we need to use [ and ] instead.
16087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16088  if test "x$has_forbidden_chars" != x; then
16089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16093      # Going to short mode and back again did indeed matter. Since short mode is
16094      # case insensitive, let's make it lowercase to improve readability.
16095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16096      # Now convert it back to Unix-stile (cygpath)
16097      input_path=`$CYGPATH -u "$shortmode_path"`
16098      new_path="$input_path"
16099    fi
16100  fi
16101
16102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16103  if test "x$test_cygdrive_prefix" = x; then
16104    # As a simple fix, exclude /usr/bin since it's not a real path.
16105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16107      # a path prefixed by /cygdrive for fixpath to work.
16108      new_path="$CYGWIN_ROOT_PATH$input_path"
16109    fi
16110  fi
16111
16112  # remove trailing .exe if any
16113  new_path="${new_path/%.exe/}"
16114
16115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16116
16117  # First separate the path from the arguments. This will split at the first
16118  # space.
16119  complete="$FOUND_MAKE"
16120  path="${complete%% *}"
16121  tmp="$complete EOL"
16122  arguments="${tmp#* }"
16123
16124  # Input might be given as Windows format, start by converting to
16125  # unix format.
16126  new_path="$path"
16127
16128  windows_path="$new_path"
16129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16130    unix_path=`$CYGPATH -u "$windows_path"`
16131    new_path="$unix_path"
16132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16134    new_path="$unix_path"
16135  fi
16136
16137
16138  # Now try to locate executable using which
16139  new_path=`$WHICH "$new_path" 2> /dev/null`
16140
16141  if test "x$new_path" = x; then
16142    # Oops. Which didn't find the executable.
16143    # The splitting of arguments from the executable at a space might have been incorrect,
16144    # since paths with space are more likely in Windows. Give it another try with the whole
16145    # argument.
16146    path="$complete"
16147    arguments="EOL"
16148    new_path="$path"
16149
16150  windows_path="$new_path"
16151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16152    unix_path=`$CYGPATH -u "$windows_path"`
16153    new_path="$unix_path"
16154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16156    new_path="$unix_path"
16157  fi
16158
16159
16160    new_path=`$WHICH "$new_path" 2> /dev/null`
16161
16162    if test "x$new_path" = x; then
16163      # It's still not found. Now this is an unrecoverable error.
16164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16165$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16166      has_space=`$ECHO "$complete" | $GREP " "`
16167      if test "x$has_space" != x; then
16168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16170      fi
16171      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16172    fi
16173  fi
16174
16175  # Now new_path has a complete unix path to the binary
16176  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16177    # Keep paths in /bin as-is, but remove trailing .exe if any
16178    new_path="${new_path/%.exe/}"
16179    # Do not save /bin paths to all_fixpath_prefixes!
16180  else
16181    # Not in mixed or Windows style, start by that.
16182    new_path=`cmd //c echo $new_path`
16183
16184  input_path="$new_path"
16185  # Check if we need to convert this using DOS-style short mode. If the path
16186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16187  # take no chances and rewrite it.
16188  # Note: m4 eats our [], so we need to use [ and ] instead.
16189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16190  if test "x$has_forbidden_chars" != x; then
16191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16193  fi
16194
16195    # Output is in $new_path
16196
16197  windows_path="$new_path"
16198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16199    unix_path=`$CYGPATH -u "$windows_path"`
16200    new_path="$unix_path"
16201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16203    new_path="$unix_path"
16204  fi
16205
16206    # remove trailing .exe if any
16207    new_path="${new_path/%.exe/}"
16208
16209    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16210    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16211  fi
16212
16213  else
16214    # We're on a posix platform. Hooray! :)
16215    # First separate the path from the arguments. This will split at the first
16216    # space.
16217    complete="$FOUND_MAKE"
16218    path="${complete%% *}"
16219    tmp="$complete EOL"
16220    arguments="${tmp#* }"
16221
16222    # Cannot rely on the command "which" here since it doesn't always work.
16223    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16224    if test -z "$is_absolute_path"; then
16225      # Path to executable is not absolute. Find it.
16226      IFS_save="$IFS"
16227      IFS=:
16228      for p in $PATH; do
16229        if test -f "$p/$path" && test -x "$p/$path"; then
16230          new_path="$p/$path"
16231          break
16232        fi
16233      done
16234      IFS="$IFS_save"
16235    else
16236      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16237$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16238      new_path="$path"
16239    fi
16240
16241    if test "x$new_path" = x; then
16242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16244      has_space=`$ECHO "$complete" | $GREP " "`
16245      if test "x$has_space" != x; then
16246        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16248      fi
16249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16250    fi
16251  fi
16252
16253  # Now join together the path and the arguments once again
16254  if test "x$arguments" != xEOL; then
16255    new_complete="$new_path ${arguments% *}"
16256  else
16257    new_complete="$new_path"
16258  fi
16259
16260  if test "x$complete" != "x$new_complete"; then
16261    FOUND_MAKE="$new_complete"
16262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16263$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16264  fi
16265
16266        fi
16267      fi
16268    fi
16269  fi
16270
16271        if test "x$FOUND_MAKE" = x; then
16272          for ac_prog in make
16273do
16274  # Extract the first word of "$ac_prog", so it can be a program name with args.
16275set dummy $ac_prog; ac_word=$2
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16277$as_echo_n "checking for $ac_word... " >&6; }
16278if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16279  $as_echo_n "(cached) " >&6
16280else
16281  case $CHECK_TOOLSDIR_MAKE in
16282  [\\/]* | ?:[\\/]*)
16283  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16284  ;;
16285  *)
16286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16287for as_dir in $PATH
16288do
16289  IFS=$as_save_IFS
16290  test -z "$as_dir" && as_dir=.
16291    for ac_exec_ext in '' $ac_executable_extensions; do
16292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16293    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16295    break 2
16296  fi
16297done
16298  done
16299IFS=$as_save_IFS
16300
16301  ;;
16302esac
16303fi
16304CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16305if test -n "$CHECK_TOOLSDIR_MAKE"; then
16306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16307$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16308else
16309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16310$as_echo "no" >&6; }
16311fi
16312
16313
16314  test -n "$CHECK_TOOLSDIR_MAKE" && break
16315done
16316
16317
16318  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16319  DESCRIPTION="make in tools-dir"
16320  if test "x$MAKE_CANDIDATE" != x; then
16321    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16322$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16323    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16324    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16325    if test "x$IS_GNU_MAKE" = x; then
16326      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16327$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16328    else
16329      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16330      if test "x$IS_MODERN_MAKE" = x; then
16331        { $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
16332$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;}
16333      else
16334        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16335          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336            MAKE_EXPECTED_ENV='cygwin'
16337          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338            MAKE_EXPECTED_ENV='msys'
16339          else
16340            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16341          fi
16342          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16343          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16344        else
16345          # Not relevant for non-Windows
16346          IS_MAKE_CORRECT_ENV=true
16347        fi
16348        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16349          { $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
16350$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;}
16351        else
16352          FOUND_MAKE=$MAKE_CANDIDATE
16353
16354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16355
16356  # First separate the path from the arguments. This will split at the first
16357  # space.
16358  complete="$FOUND_MAKE"
16359  path="${complete%% *}"
16360  tmp="$complete EOL"
16361  arguments="${tmp#* }"
16362
16363  # Input might be given as Windows format, start by converting to
16364  # unix format.
16365  new_path=`$CYGPATH -u "$path"`
16366
16367  # Now try to locate executable using which
16368  new_path=`$WHICH "$new_path" 2> /dev/null`
16369  # bat and cmd files are not always considered executable in cygwin causing which
16370  # to not find them
16371  if test "x$new_path" = x \
16372      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16373      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16374    new_path=`$CYGPATH -u "$path"`
16375  fi
16376  if test "x$new_path" = x; then
16377    # Oops. Which didn't find the executable.
16378    # The splitting of arguments from the executable at a space might have been incorrect,
16379    # since paths with space are more likely in Windows. Give it another try with the whole
16380    # argument.
16381    path="$complete"
16382    arguments="EOL"
16383    new_path=`$CYGPATH -u "$path"`
16384    new_path=`$WHICH "$new_path" 2> /dev/null`
16385    # bat and cmd files are not always considered executable in cygwin causing which
16386    # to not find them
16387    if test "x$new_path" = x \
16388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16390      new_path=`$CYGPATH -u "$path"`
16391    fi
16392    if test "x$new_path" = x; then
16393      # It's still not found. Now this is an unrecoverable error.
16394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16396      has_space=`$ECHO "$complete" | $GREP " "`
16397      if test "x$has_space" != x; then
16398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16400      fi
16401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16402    fi
16403  fi
16404
16405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16408  # "foo.exe" is OK but "foo" is an error.
16409  #
16410  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16411  # It is also a way to make sure we got the proper file name for the real test later on.
16412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16413  if test "x$test_shortpath" = x; then
16414    # Short path failed, file does not exist as specified.
16415    # Try adding .exe or .cmd
16416    if test -f "${new_path}.exe"; then
16417      input_to_shortpath="${new_path}.exe"
16418    elif test -f "${new_path}.cmd"; then
16419      input_to_shortpath="${new_path}.cmd"
16420    else
16421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16423      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16424$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16425      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16426    fi
16427  else
16428    input_to_shortpath="$new_path"
16429  fi
16430
16431  # Call helper function which possibly converts this using DOS-style short mode.
16432  # If so, the updated path is stored in $new_path.
16433  new_path="$input_to_shortpath"
16434
16435  input_path="$input_to_shortpath"
16436  # Check if we need to convert this using DOS-style short mode. If the path
16437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16438  # take no chances and rewrite it.
16439  # Note: m4 eats our [], so we need to use [ and ] instead.
16440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16441  if test "x$has_forbidden_chars" != x; then
16442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16446      # Going to short mode and back again did indeed matter. Since short mode is
16447      # case insensitive, let's make it lowercase to improve readability.
16448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16449      # Now convert it back to Unix-stile (cygpath)
16450      input_path=`$CYGPATH -u "$shortmode_path"`
16451      new_path="$input_path"
16452    fi
16453  fi
16454
16455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16456  if test "x$test_cygdrive_prefix" = x; then
16457    # As a simple fix, exclude /usr/bin since it's not a real path.
16458    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16460      # a path prefixed by /cygdrive for fixpath to work.
16461      new_path="$CYGWIN_ROOT_PATH$input_path"
16462    fi
16463  fi
16464
16465  # remove trailing .exe if any
16466  new_path="${new_path/%.exe/}"
16467
16468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16469
16470  # First separate the path from the arguments. This will split at the first
16471  # space.
16472  complete="$FOUND_MAKE"
16473  path="${complete%% *}"
16474  tmp="$complete EOL"
16475  arguments="${tmp#* }"
16476
16477  # Input might be given as Windows format, start by converting to
16478  # unix format.
16479  new_path="$path"
16480
16481  windows_path="$new_path"
16482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16483    unix_path=`$CYGPATH -u "$windows_path"`
16484    new_path="$unix_path"
16485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16487    new_path="$unix_path"
16488  fi
16489
16490
16491  # Now try to locate executable using which
16492  new_path=`$WHICH "$new_path" 2> /dev/null`
16493
16494  if test "x$new_path" = x; then
16495    # Oops. Which didn't find the executable.
16496    # The splitting of arguments from the executable at a space might have been incorrect,
16497    # since paths with space are more likely in Windows. Give it another try with the whole
16498    # argument.
16499    path="$complete"
16500    arguments="EOL"
16501    new_path="$path"
16502
16503  windows_path="$new_path"
16504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16505    unix_path=`$CYGPATH -u "$windows_path"`
16506    new_path="$unix_path"
16507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16509    new_path="$unix_path"
16510  fi
16511
16512
16513    new_path=`$WHICH "$new_path" 2> /dev/null`
16514
16515    if test "x$new_path" = x; then
16516      # It's still not found. Now this is an unrecoverable error.
16517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16518$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16519      has_space=`$ECHO "$complete" | $GREP " "`
16520      if test "x$has_space" != x; then
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16523      fi
16524      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16525    fi
16526  fi
16527
16528  # Now new_path has a complete unix path to the binary
16529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16530    # Keep paths in /bin as-is, but remove trailing .exe if any
16531    new_path="${new_path/%.exe/}"
16532    # Do not save /bin paths to all_fixpath_prefixes!
16533  else
16534    # Not in mixed or Windows style, start by that.
16535    new_path=`cmd //c echo $new_path`
16536
16537  input_path="$new_path"
16538  # Check if we need to convert this using DOS-style short mode. If the path
16539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16540  # take no chances and rewrite it.
16541  # Note: m4 eats our [], so we need to use [ and ] instead.
16542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16543  if test "x$has_forbidden_chars" != x; then
16544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16546  fi
16547
16548    # Output is in $new_path
16549
16550  windows_path="$new_path"
16551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16552    unix_path=`$CYGPATH -u "$windows_path"`
16553    new_path="$unix_path"
16554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16556    new_path="$unix_path"
16557  fi
16558
16559    # remove trailing .exe if any
16560    new_path="${new_path/%.exe/}"
16561
16562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16564  fi
16565
16566  else
16567    # We're on a posix platform. Hooray! :)
16568    # First separate the path from the arguments. This will split at the first
16569    # space.
16570    complete="$FOUND_MAKE"
16571    path="${complete%% *}"
16572    tmp="$complete EOL"
16573    arguments="${tmp#* }"
16574
16575    # Cannot rely on the command "which" here since it doesn't always work.
16576    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16577    if test -z "$is_absolute_path"; then
16578      # Path to executable is not absolute. Find it.
16579      IFS_save="$IFS"
16580      IFS=:
16581      for p in $PATH; do
16582        if test -f "$p/$path" && test -x "$p/$path"; then
16583          new_path="$p/$path"
16584          break
16585        fi
16586      done
16587      IFS="$IFS_save"
16588    else
16589      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16590$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16591      new_path="$path"
16592    fi
16593
16594    if test "x$new_path" = x; then
16595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16596$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16597      has_space=`$ECHO "$complete" | $GREP " "`
16598      if test "x$has_space" != x; then
16599        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16601      fi
16602      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16603    fi
16604  fi
16605
16606  # Now join together the path and the arguments once again
16607  if test "x$arguments" != xEOL; then
16608    new_complete="$new_path ${arguments% *}"
16609  else
16610    new_complete="$new_path"
16611  fi
16612
16613  if test "x$complete" != "x$new_complete"; then
16614    FOUND_MAKE="$new_complete"
16615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16616$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16617  fi
16618
16619        fi
16620      fi
16621    fi
16622  fi
16623
16624        fi
16625        PATH=$OLD_PATH
16626      fi
16627    fi
16628
16629    if test "x$FOUND_MAKE" = x; then
16630      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
16631    fi
16632  fi
16633
16634  MAKE=$FOUND_MAKE
16635
16636  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16637$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16638
16639
16640
16641  # Test if find supports -delete
16642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16643$as_echo_n "checking if find supports -delete... " >&6; }
16644  FIND_DELETE="-delete"
16645
16646  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16647
16648  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16649
16650  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16651  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16652    # No, it does not.
16653    rm $DELETEDIR/TestIfFindSupportsDelete
16654    FIND_DELETE="-exec rm \{\} \+"
16655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16656$as_echo "no" >&6; }
16657  else
16658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16659$as_echo "yes" >&6; }
16660  fi
16661  rmdir $DELETEDIR
16662
16663
16664
16665  # These tools might not be installed by default,
16666  # need hint on how to install them.
16667
16668
16669
16670  # Publish this variable in the help.
16671
16672
16673  if test "x$UNZIP" = x; then
16674    # The variable is not set by user, try to locate tool using the code snippet
16675    for ac_prog in unzip
16676do
16677  # Extract the first word of "$ac_prog", so it can be a program name with args.
16678set dummy $ac_prog; ac_word=$2
16679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16680$as_echo_n "checking for $ac_word... " >&6; }
16681if ${ac_cv_path_UNZIP+:} false; then :
16682  $as_echo_n "(cached) " >&6
16683else
16684  case $UNZIP in
16685  [\\/]* | ?:[\\/]*)
16686  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16687  ;;
16688  *)
16689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16690for as_dir in $PATH
16691do
16692  IFS=$as_save_IFS
16693  test -z "$as_dir" && as_dir=.
16694    for ac_exec_ext in '' $ac_executable_extensions; do
16695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16696    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16698    break 2
16699  fi
16700done
16701  done
16702IFS=$as_save_IFS
16703
16704  ;;
16705esac
16706fi
16707UNZIP=$ac_cv_path_UNZIP
16708if test -n "$UNZIP"; then
16709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16710$as_echo "$UNZIP" >&6; }
16711else
16712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16713$as_echo "no" >&6; }
16714fi
16715
16716
16717  test -n "$UNZIP" && break
16718done
16719
16720  else
16721    # The variable is set, but is it from the command line or the environment?
16722
16723    # Try to remove the string !UNZIP! from our list.
16724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16726      # If it failed, the variable was not from the command line. Ignore it,
16727      # but warn the user (except for BASH, which is always set by the calling BASH).
16728      if test "xUNZIP" != xBASH; then
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16730$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16731      fi
16732      # Try to locate tool using the code snippet
16733      for ac_prog in unzip
16734do
16735  # Extract the first word of "$ac_prog", so it can be a program name with args.
16736set dummy $ac_prog; ac_word=$2
16737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16738$as_echo_n "checking for $ac_word... " >&6; }
16739if ${ac_cv_path_UNZIP+:} false; then :
16740  $as_echo_n "(cached) " >&6
16741else
16742  case $UNZIP in
16743  [\\/]* | ?:[\\/]*)
16744  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16745  ;;
16746  *)
16747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16748for as_dir in $PATH
16749do
16750  IFS=$as_save_IFS
16751  test -z "$as_dir" && as_dir=.
16752    for ac_exec_ext in '' $ac_executable_extensions; do
16753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16754    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16756    break 2
16757  fi
16758done
16759  done
16760IFS=$as_save_IFS
16761
16762  ;;
16763esac
16764fi
16765UNZIP=$ac_cv_path_UNZIP
16766if test -n "$UNZIP"; then
16767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16768$as_echo "$UNZIP" >&6; }
16769else
16770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16771$as_echo "no" >&6; }
16772fi
16773
16774
16775  test -n "$UNZIP" && break
16776done
16777
16778    else
16779      # If it succeeded, then it was overridden by the user. We will use it
16780      # for the tool.
16781
16782      # First remove it from the list of overridden variables, so we can test
16783      # for unknown variables in the end.
16784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16785
16786      # Check if the provided tool contains a complete path.
16787      tool_specified="$UNZIP"
16788      tool_basename="${tool_specified##*/}"
16789      if test "x$tool_basename" = "x$tool_specified"; then
16790        # A command without a complete path is provided, search $PATH.
16791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16792$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16793        # Extract the first word of "$tool_basename", so it can be a program name with args.
16794set dummy $tool_basename; ac_word=$2
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16796$as_echo_n "checking for $ac_word... " >&6; }
16797if ${ac_cv_path_UNZIP+:} false; then :
16798  $as_echo_n "(cached) " >&6
16799else
16800  case $UNZIP in
16801  [\\/]* | ?:[\\/]*)
16802  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16803  ;;
16804  *)
16805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16806for as_dir in $PATH
16807do
16808  IFS=$as_save_IFS
16809  test -z "$as_dir" && as_dir=.
16810    for ac_exec_ext in '' $ac_executable_extensions; do
16811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16812    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16814    break 2
16815  fi
16816done
16817  done
16818IFS=$as_save_IFS
16819
16820  ;;
16821esac
16822fi
16823UNZIP=$ac_cv_path_UNZIP
16824if test -n "$UNZIP"; then
16825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16826$as_echo "$UNZIP" >&6; }
16827else
16828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16829$as_echo "no" >&6; }
16830fi
16831
16832
16833        if test "x$UNZIP" = x; then
16834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16835        fi
16836      else
16837        # Otherwise we believe it is a complete path. Use it as it is.
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16839$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16841$as_echo_n "checking for UNZIP... " >&6; }
16842        if test ! -x "$tool_specified"; then
16843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16844$as_echo "not found" >&6; }
16845          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16846        fi
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16848$as_echo "$tool_specified" >&6; }
16849      fi
16850    fi
16851  fi
16852
16853
16854
16855  if test "x$UNZIP" = x; then
16856    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16857  fi
16858
16859
16860
16861
16862
16863  # Publish this variable in the help.
16864
16865
16866  if test "x$ZIP" = x; then
16867    # The variable is not set by user, try to locate tool using the code snippet
16868    for ac_prog in zip
16869do
16870  # Extract the first word of "$ac_prog", so it can be a program name with args.
16871set dummy $ac_prog; ac_word=$2
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16873$as_echo_n "checking for $ac_word... " >&6; }
16874if ${ac_cv_path_ZIP+:} false; then :
16875  $as_echo_n "(cached) " >&6
16876else
16877  case $ZIP in
16878  [\\/]* | ?:[\\/]*)
16879  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16880  ;;
16881  *)
16882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16883for as_dir in $PATH
16884do
16885  IFS=$as_save_IFS
16886  test -z "$as_dir" && as_dir=.
16887    for ac_exec_ext in '' $ac_executable_extensions; do
16888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16889    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16891    break 2
16892  fi
16893done
16894  done
16895IFS=$as_save_IFS
16896
16897  ;;
16898esac
16899fi
16900ZIP=$ac_cv_path_ZIP
16901if test -n "$ZIP"; then
16902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16903$as_echo "$ZIP" >&6; }
16904else
16905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16906$as_echo "no" >&6; }
16907fi
16908
16909
16910  test -n "$ZIP" && break
16911done
16912
16913  else
16914    # The variable is set, but is it from the command line or the environment?
16915
16916    # Try to remove the string !ZIP! from our list.
16917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16919      # If it failed, the variable was not from the command line. Ignore it,
16920      # but warn the user (except for BASH, which is always set by the calling BASH).
16921      if test "xZIP" != xBASH; then
16922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16923$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16924      fi
16925      # Try to locate tool using the code snippet
16926      for ac_prog in zip
16927do
16928  # Extract the first word of "$ac_prog", so it can be a program name with args.
16929set dummy $ac_prog; ac_word=$2
16930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16931$as_echo_n "checking for $ac_word... " >&6; }
16932if ${ac_cv_path_ZIP+:} false; then :
16933  $as_echo_n "(cached) " >&6
16934else
16935  case $ZIP in
16936  [\\/]* | ?:[\\/]*)
16937  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16938  ;;
16939  *)
16940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16941for as_dir in $PATH
16942do
16943  IFS=$as_save_IFS
16944  test -z "$as_dir" && as_dir=.
16945    for ac_exec_ext in '' $ac_executable_extensions; do
16946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16947    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16949    break 2
16950  fi
16951done
16952  done
16953IFS=$as_save_IFS
16954
16955  ;;
16956esac
16957fi
16958ZIP=$ac_cv_path_ZIP
16959if test -n "$ZIP"; then
16960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16961$as_echo "$ZIP" >&6; }
16962else
16963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16964$as_echo "no" >&6; }
16965fi
16966
16967
16968  test -n "$ZIP" && break
16969done
16970
16971    else
16972      # If it succeeded, then it was overridden by the user. We will use it
16973      # for the tool.
16974
16975      # First remove it from the list of overridden variables, so we can test
16976      # for unknown variables in the end.
16977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16978
16979      # Check if the provided tool contains a complete path.
16980      tool_specified="$ZIP"
16981      tool_basename="${tool_specified##*/}"
16982      if test "x$tool_basename" = "x$tool_specified"; then
16983        # A command without a complete path is provided, search $PATH.
16984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16985$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16986        # Extract the first word of "$tool_basename", so it can be a program name with args.
16987set dummy $tool_basename; ac_word=$2
16988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16989$as_echo_n "checking for $ac_word... " >&6; }
16990if ${ac_cv_path_ZIP+:} false; then :
16991  $as_echo_n "(cached) " >&6
16992else
16993  case $ZIP in
16994  [\\/]* | ?:[\\/]*)
16995  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16996  ;;
16997  *)
16998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16999for as_dir in $PATH
17000do
17001  IFS=$as_save_IFS
17002  test -z "$as_dir" && as_dir=.
17003    for ac_exec_ext in '' $ac_executable_extensions; do
17004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17005    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17007    break 2
17008  fi
17009done
17010  done
17011IFS=$as_save_IFS
17012
17013  ;;
17014esac
17015fi
17016ZIP=$ac_cv_path_ZIP
17017if test -n "$ZIP"; then
17018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17019$as_echo "$ZIP" >&6; }
17020else
17021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17022$as_echo "no" >&6; }
17023fi
17024
17025
17026        if test "x$ZIP" = x; then
17027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17028        fi
17029      else
17030        # Otherwise we believe it is a complete path. Use it as it is.
17031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17032$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17034$as_echo_n "checking for ZIP... " >&6; }
17035        if test ! -x "$tool_specified"; then
17036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17037$as_echo "not found" >&6; }
17038          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17039        fi
17040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17041$as_echo "$tool_specified" >&6; }
17042      fi
17043    fi
17044  fi
17045
17046
17047
17048  if test "x$ZIP" = x; then
17049    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17050  fi
17051
17052
17053
17054  # Non-required basic tools
17055
17056
17057
17058  # Publish this variable in the help.
17059
17060
17061  if test "x$LDD" = x; then
17062    # The variable is not set by user, try to locate tool using the code snippet
17063    for ac_prog in ldd
17064do
17065  # Extract the first word of "$ac_prog", so it can be a program name with args.
17066set dummy $ac_prog; ac_word=$2
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17068$as_echo_n "checking for $ac_word... " >&6; }
17069if ${ac_cv_path_LDD+:} false; then :
17070  $as_echo_n "(cached) " >&6
17071else
17072  case $LDD in
17073  [\\/]* | ?:[\\/]*)
17074  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17075  ;;
17076  *)
17077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17078for as_dir in $PATH
17079do
17080  IFS=$as_save_IFS
17081  test -z "$as_dir" && as_dir=.
17082    for ac_exec_ext in '' $ac_executable_extensions; do
17083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17084    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17086    break 2
17087  fi
17088done
17089  done
17090IFS=$as_save_IFS
17091
17092  ;;
17093esac
17094fi
17095LDD=$ac_cv_path_LDD
17096if test -n "$LDD"; then
17097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17098$as_echo "$LDD" >&6; }
17099else
17100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17101$as_echo "no" >&6; }
17102fi
17103
17104
17105  test -n "$LDD" && break
17106done
17107
17108  else
17109    # The variable is set, but is it from the command line or the environment?
17110
17111    # Try to remove the string !LDD! from our list.
17112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17114      # If it failed, the variable was not from the command line. Ignore it,
17115      # but warn the user (except for BASH, which is always set by the calling BASH).
17116      if test "xLDD" != xBASH; then
17117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17118$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17119      fi
17120      # Try to locate tool using the code snippet
17121      for ac_prog in ldd
17122do
17123  # Extract the first word of "$ac_prog", so it can be a program name with args.
17124set dummy $ac_prog; ac_word=$2
17125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17126$as_echo_n "checking for $ac_word... " >&6; }
17127if ${ac_cv_path_LDD+:} false; then :
17128  $as_echo_n "(cached) " >&6
17129else
17130  case $LDD in
17131  [\\/]* | ?:[\\/]*)
17132  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17133  ;;
17134  *)
17135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17136for as_dir in $PATH
17137do
17138  IFS=$as_save_IFS
17139  test -z "$as_dir" && as_dir=.
17140    for ac_exec_ext in '' $ac_executable_extensions; do
17141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17142    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17144    break 2
17145  fi
17146done
17147  done
17148IFS=$as_save_IFS
17149
17150  ;;
17151esac
17152fi
17153LDD=$ac_cv_path_LDD
17154if test -n "$LDD"; then
17155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17156$as_echo "$LDD" >&6; }
17157else
17158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17159$as_echo "no" >&6; }
17160fi
17161
17162
17163  test -n "$LDD" && break
17164done
17165
17166    else
17167      # If it succeeded, then it was overridden by the user. We will use it
17168      # for the tool.
17169
17170      # First remove it from the list of overridden variables, so we can test
17171      # for unknown variables in the end.
17172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17173
17174      # Check if the provided tool contains a complete path.
17175      tool_specified="$LDD"
17176      tool_basename="${tool_specified##*/}"
17177      if test "x$tool_basename" = "x$tool_specified"; then
17178        # A command without a complete path is provided, search $PATH.
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17180$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17181        # Extract the first word of "$tool_basename", so it can be a program name with args.
17182set dummy $tool_basename; ac_word=$2
17183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17184$as_echo_n "checking for $ac_word... " >&6; }
17185if ${ac_cv_path_LDD+:} false; then :
17186  $as_echo_n "(cached) " >&6
17187else
17188  case $LDD in
17189  [\\/]* | ?:[\\/]*)
17190  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17191  ;;
17192  *)
17193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17194for as_dir in $PATH
17195do
17196  IFS=$as_save_IFS
17197  test -z "$as_dir" && as_dir=.
17198    for ac_exec_ext in '' $ac_executable_extensions; do
17199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17200    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17202    break 2
17203  fi
17204done
17205  done
17206IFS=$as_save_IFS
17207
17208  ;;
17209esac
17210fi
17211LDD=$ac_cv_path_LDD
17212if test -n "$LDD"; then
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17214$as_echo "$LDD" >&6; }
17215else
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17217$as_echo "no" >&6; }
17218fi
17219
17220
17221        if test "x$LDD" = x; then
17222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17223        fi
17224      else
17225        # Otherwise we believe it is a complete path. Use it as it is.
17226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17227$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17229$as_echo_n "checking for LDD... " >&6; }
17230        if test ! -x "$tool_specified"; then
17231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17232$as_echo "not found" >&6; }
17233          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17234        fi
17235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17236$as_echo "$tool_specified" >&6; }
17237      fi
17238    fi
17239  fi
17240
17241
17242  if test "x$LDD" = "x"; then
17243    # List shared lib dependencies is used for
17244    # debug output and checking for forbidden dependencies.
17245    # We can build without it.
17246    LDD="true"
17247  fi
17248
17249
17250  # Publish this variable in the help.
17251
17252
17253  if test "x$OTOOL" = x; then
17254    # The variable is not set by user, try to locate tool using the code snippet
17255    for ac_prog in otool
17256do
17257  # Extract the first word of "$ac_prog", so it can be a program name with args.
17258set dummy $ac_prog; ac_word=$2
17259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17260$as_echo_n "checking for $ac_word... " >&6; }
17261if ${ac_cv_path_OTOOL+:} false; then :
17262  $as_echo_n "(cached) " >&6
17263else
17264  case $OTOOL in
17265  [\\/]* | ?:[\\/]*)
17266  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17267  ;;
17268  *)
17269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17270for as_dir in $PATH
17271do
17272  IFS=$as_save_IFS
17273  test -z "$as_dir" && as_dir=.
17274    for ac_exec_ext in '' $ac_executable_extensions; do
17275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17276    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17278    break 2
17279  fi
17280done
17281  done
17282IFS=$as_save_IFS
17283
17284  ;;
17285esac
17286fi
17287OTOOL=$ac_cv_path_OTOOL
17288if test -n "$OTOOL"; then
17289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17290$as_echo "$OTOOL" >&6; }
17291else
17292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17293$as_echo "no" >&6; }
17294fi
17295
17296
17297  test -n "$OTOOL" && break
17298done
17299
17300  else
17301    # The variable is set, but is it from the command line or the environment?
17302
17303    # Try to remove the string !OTOOL! from our list.
17304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17306      # If it failed, the variable was not from the command line. Ignore it,
17307      # but warn the user (except for BASH, which is always set by the calling BASH).
17308      if test "xOTOOL" != xBASH; then
17309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17310$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17311      fi
17312      # Try to locate tool using the code snippet
17313      for ac_prog in otool
17314do
17315  # Extract the first word of "$ac_prog", so it can be a program name with args.
17316set dummy $ac_prog; ac_word=$2
17317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17318$as_echo_n "checking for $ac_word... " >&6; }
17319if ${ac_cv_path_OTOOL+:} false; then :
17320  $as_echo_n "(cached) " >&6
17321else
17322  case $OTOOL in
17323  [\\/]* | ?:[\\/]*)
17324  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17325  ;;
17326  *)
17327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17328for as_dir in $PATH
17329do
17330  IFS=$as_save_IFS
17331  test -z "$as_dir" && as_dir=.
17332    for ac_exec_ext in '' $ac_executable_extensions; do
17333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17334    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17336    break 2
17337  fi
17338done
17339  done
17340IFS=$as_save_IFS
17341
17342  ;;
17343esac
17344fi
17345OTOOL=$ac_cv_path_OTOOL
17346if test -n "$OTOOL"; then
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17348$as_echo "$OTOOL" >&6; }
17349else
17350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17351$as_echo "no" >&6; }
17352fi
17353
17354
17355  test -n "$OTOOL" && break
17356done
17357
17358    else
17359      # If it succeeded, then it was overridden by the user. We will use it
17360      # for the tool.
17361
17362      # First remove it from the list of overridden variables, so we can test
17363      # for unknown variables in the end.
17364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17365
17366      # Check if the provided tool contains a complete path.
17367      tool_specified="$OTOOL"
17368      tool_basename="${tool_specified##*/}"
17369      if test "x$tool_basename" = "x$tool_specified"; then
17370        # A command without a complete path is provided, search $PATH.
17371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17372$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17373        # Extract the first word of "$tool_basename", so it can be a program name with args.
17374set dummy $tool_basename; ac_word=$2
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17376$as_echo_n "checking for $ac_word... " >&6; }
17377if ${ac_cv_path_OTOOL+:} false; then :
17378  $as_echo_n "(cached) " >&6
17379else
17380  case $OTOOL in
17381  [\\/]* | ?:[\\/]*)
17382  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17383  ;;
17384  *)
17385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17386for as_dir in $PATH
17387do
17388  IFS=$as_save_IFS
17389  test -z "$as_dir" && as_dir=.
17390    for ac_exec_ext in '' $ac_executable_extensions; do
17391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17392    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17394    break 2
17395  fi
17396done
17397  done
17398IFS=$as_save_IFS
17399
17400  ;;
17401esac
17402fi
17403OTOOL=$ac_cv_path_OTOOL
17404if test -n "$OTOOL"; then
17405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17406$as_echo "$OTOOL" >&6; }
17407else
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17409$as_echo "no" >&6; }
17410fi
17411
17412
17413        if test "x$OTOOL" = x; then
17414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17415        fi
17416      else
17417        # Otherwise we believe it is a complete path. Use it as it is.
17418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17419$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17421$as_echo_n "checking for OTOOL... " >&6; }
17422        if test ! -x "$tool_specified"; then
17423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17424$as_echo "not found" >&6; }
17425          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17426        fi
17427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17428$as_echo "$tool_specified" >&6; }
17429      fi
17430    fi
17431  fi
17432
17433
17434  if test "x$OTOOL" = "x"; then
17435    OTOOL="true"
17436  fi
17437
17438
17439  # Publish this variable in the help.
17440
17441
17442  if test "x$READELF" = x; then
17443    # The variable is not set by user, try to locate tool using the code snippet
17444    for ac_prog in greadelf readelf
17445do
17446  # Extract the first word of "$ac_prog", so it can be a program name with args.
17447set dummy $ac_prog; ac_word=$2
17448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17449$as_echo_n "checking for $ac_word... " >&6; }
17450if ${ac_cv_path_READELF+:} false; then :
17451  $as_echo_n "(cached) " >&6
17452else
17453  case $READELF in
17454  [\\/]* | ?:[\\/]*)
17455  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17456  ;;
17457  *)
17458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17459for as_dir in $PATH
17460do
17461  IFS=$as_save_IFS
17462  test -z "$as_dir" && as_dir=.
17463    for ac_exec_ext in '' $ac_executable_extensions; do
17464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17465    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17467    break 2
17468  fi
17469done
17470  done
17471IFS=$as_save_IFS
17472
17473  ;;
17474esac
17475fi
17476READELF=$ac_cv_path_READELF
17477if test -n "$READELF"; then
17478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17479$as_echo "$READELF" >&6; }
17480else
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17482$as_echo "no" >&6; }
17483fi
17484
17485
17486  test -n "$READELF" && break
17487done
17488
17489  else
17490    # The variable is set, but is it from the command line or the environment?
17491
17492    # Try to remove the string !READELF! from our list.
17493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17495      # If it failed, the variable was not from the command line. Ignore it,
17496      # but warn the user (except for BASH, which is always set by the calling BASH).
17497      if test "xREADELF" != xBASH; then
17498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17499$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17500      fi
17501      # Try to locate tool using the code snippet
17502      for ac_prog in greadelf readelf
17503do
17504  # Extract the first word of "$ac_prog", so it can be a program name with args.
17505set dummy $ac_prog; ac_word=$2
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507$as_echo_n "checking for $ac_word... " >&6; }
17508if ${ac_cv_path_READELF+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  case $READELF in
17512  [\\/]* | ?:[\\/]*)
17513  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17514  ;;
17515  *)
17516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17517for as_dir in $PATH
17518do
17519  IFS=$as_save_IFS
17520  test -z "$as_dir" && as_dir=.
17521    for ac_exec_ext in '' $ac_executable_extensions; do
17522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17523    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17525    break 2
17526  fi
17527done
17528  done
17529IFS=$as_save_IFS
17530
17531  ;;
17532esac
17533fi
17534READELF=$ac_cv_path_READELF
17535if test -n "$READELF"; then
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17537$as_echo "$READELF" >&6; }
17538else
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17540$as_echo "no" >&6; }
17541fi
17542
17543
17544  test -n "$READELF" && break
17545done
17546
17547    else
17548      # If it succeeded, then it was overridden by the user. We will use it
17549      # for the tool.
17550
17551      # First remove it from the list of overridden variables, so we can test
17552      # for unknown variables in the end.
17553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17554
17555      # Check if the provided tool contains a complete path.
17556      tool_specified="$READELF"
17557      tool_basename="${tool_specified##*/}"
17558      if test "x$tool_basename" = "x$tool_specified"; then
17559        # A command without a complete path is provided, search $PATH.
17560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17561$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17562        # Extract the first word of "$tool_basename", so it can be a program name with args.
17563set dummy $tool_basename; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_path_READELF+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  case $READELF in
17570  [\\/]* | ?:[\\/]*)
17571  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17572  ;;
17573  *)
17574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17575for as_dir in $PATH
17576do
17577  IFS=$as_save_IFS
17578  test -z "$as_dir" && as_dir=.
17579    for ac_exec_ext in '' $ac_executable_extensions; do
17580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17581    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17583    break 2
17584  fi
17585done
17586  done
17587IFS=$as_save_IFS
17588
17589  ;;
17590esac
17591fi
17592READELF=$ac_cv_path_READELF
17593if test -n "$READELF"; then
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17595$as_echo "$READELF" >&6; }
17596else
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598$as_echo "no" >&6; }
17599fi
17600
17601
17602        if test "x$READELF" = x; then
17603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17604        fi
17605      else
17606        # Otherwise we believe it is a complete path. Use it as it is.
17607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17608$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17610$as_echo_n "checking for READELF... " >&6; }
17611        if test ! -x "$tool_specified"; then
17612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17613$as_echo "not found" >&6; }
17614          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17615        fi
17616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17617$as_echo "$tool_specified" >&6; }
17618      fi
17619    fi
17620  fi
17621
17622
17623
17624
17625  # Publish this variable in the help.
17626
17627
17628  if test "x$HG" = x; then
17629    # The variable is not set by user, try to locate tool using the code snippet
17630    for ac_prog in hg
17631do
17632  # Extract the first word of "$ac_prog", so it can be a program name with args.
17633set dummy $ac_prog; ac_word=$2
17634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17635$as_echo_n "checking for $ac_word... " >&6; }
17636if ${ac_cv_path_HG+:} false; then :
17637  $as_echo_n "(cached) " >&6
17638else
17639  case $HG in
17640  [\\/]* | ?:[\\/]*)
17641  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17642  ;;
17643  *)
17644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17645for as_dir in $PATH
17646do
17647  IFS=$as_save_IFS
17648  test -z "$as_dir" && as_dir=.
17649    for ac_exec_ext in '' $ac_executable_extensions; do
17650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17651    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17653    break 2
17654  fi
17655done
17656  done
17657IFS=$as_save_IFS
17658
17659  ;;
17660esac
17661fi
17662HG=$ac_cv_path_HG
17663if test -n "$HG"; then
17664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17665$as_echo "$HG" >&6; }
17666else
17667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17668$as_echo "no" >&6; }
17669fi
17670
17671
17672  test -n "$HG" && break
17673done
17674
17675  else
17676    # The variable is set, but is it from the command line or the environment?
17677
17678    # Try to remove the string !HG! from our list.
17679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17681      # If it failed, the variable was not from the command line. Ignore it,
17682      # but warn the user (except for BASH, which is always set by the calling BASH).
17683      if test "xHG" != xBASH; then
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17685$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17686      fi
17687      # Try to locate tool using the code snippet
17688      for ac_prog in hg
17689do
17690  # Extract the first word of "$ac_prog", so it can be a program name with args.
17691set dummy $ac_prog; ac_word=$2
17692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17693$as_echo_n "checking for $ac_word... " >&6; }
17694if ${ac_cv_path_HG+:} false; then :
17695  $as_echo_n "(cached) " >&6
17696else
17697  case $HG in
17698  [\\/]* | ?:[\\/]*)
17699  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17700  ;;
17701  *)
17702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17703for as_dir in $PATH
17704do
17705  IFS=$as_save_IFS
17706  test -z "$as_dir" && as_dir=.
17707    for ac_exec_ext in '' $ac_executable_extensions; do
17708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17709    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17711    break 2
17712  fi
17713done
17714  done
17715IFS=$as_save_IFS
17716
17717  ;;
17718esac
17719fi
17720HG=$ac_cv_path_HG
17721if test -n "$HG"; then
17722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17723$as_echo "$HG" >&6; }
17724else
17725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17726$as_echo "no" >&6; }
17727fi
17728
17729
17730  test -n "$HG" && break
17731done
17732
17733    else
17734      # If it succeeded, then it was overridden by the user. We will use it
17735      # for the tool.
17736
17737      # First remove it from the list of overridden variables, so we can test
17738      # for unknown variables in the end.
17739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17740
17741      # Check if the provided tool contains a complete path.
17742      tool_specified="$HG"
17743      tool_basename="${tool_specified##*/}"
17744      if test "x$tool_basename" = "x$tool_specified"; then
17745        # A command without a complete path is provided, search $PATH.
17746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17747$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17748        # Extract the first word of "$tool_basename", so it can be a program name with args.
17749set dummy $tool_basename; ac_word=$2
17750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17751$as_echo_n "checking for $ac_word... " >&6; }
17752if ${ac_cv_path_HG+:} false; then :
17753  $as_echo_n "(cached) " >&6
17754else
17755  case $HG in
17756  [\\/]* | ?:[\\/]*)
17757  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17758  ;;
17759  *)
17760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17761for as_dir in $PATH
17762do
17763  IFS=$as_save_IFS
17764  test -z "$as_dir" && as_dir=.
17765    for ac_exec_ext in '' $ac_executable_extensions; do
17766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17767    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17769    break 2
17770  fi
17771done
17772  done
17773IFS=$as_save_IFS
17774
17775  ;;
17776esac
17777fi
17778HG=$ac_cv_path_HG
17779if test -n "$HG"; then
17780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17781$as_echo "$HG" >&6; }
17782else
17783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17784$as_echo "no" >&6; }
17785fi
17786
17787
17788        if test "x$HG" = x; then
17789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17790        fi
17791      else
17792        # Otherwise we believe it is a complete path. Use it as it is.
17793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17794$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17796$as_echo_n "checking for HG... " >&6; }
17797        if test ! -x "$tool_specified"; then
17798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17799$as_echo "not found" >&6; }
17800          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17801        fi
17802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17803$as_echo "$tool_specified" >&6; }
17804      fi
17805    fi
17806  fi
17807
17808
17809
17810
17811  # Publish this variable in the help.
17812
17813
17814  if test "x$STAT" = x; then
17815    # The variable is not set by user, try to locate tool using the code snippet
17816    for ac_prog in stat
17817do
17818  # Extract the first word of "$ac_prog", so it can be a program name with args.
17819set dummy $ac_prog; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if ${ac_cv_path_STAT+:} false; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  case $STAT in
17826  [\\/]* | ?:[\\/]*)
17827  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17828  ;;
17829  *)
17830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17831for as_dir in $PATH
17832do
17833  IFS=$as_save_IFS
17834  test -z "$as_dir" && as_dir=.
17835    for ac_exec_ext in '' $ac_executable_extensions; do
17836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17837    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17839    break 2
17840  fi
17841done
17842  done
17843IFS=$as_save_IFS
17844
17845  ;;
17846esac
17847fi
17848STAT=$ac_cv_path_STAT
17849if test -n "$STAT"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17851$as_echo "$STAT" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858  test -n "$STAT" && break
17859done
17860
17861  else
17862    # The variable is set, but is it from the command line or the environment?
17863
17864    # Try to remove the string !STAT! from our list.
17865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17867      # If it failed, the variable was not from the command line. Ignore it,
17868      # but warn the user (except for BASH, which is always set by the calling BASH).
17869      if test "xSTAT" != xBASH; then
17870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17871$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17872      fi
17873      # Try to locate tool using the code snippet
17874      for ac_prog in stat
17875do
17876  # Extract the first word of "$ac_prog", so it can be a program name with args.
17877set dummy $ac_prog; ac_word=$2
17878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17879$as_echo_n "checking for $ac_word... " >&6; }
17880if ${ac_cv_path_STAT+:} false; then :
17881  $as_echo_n "(cached) " >&6
17882else
17883  case $STAT in
17884  [\\/]* | ?:[\\/]*)
17885  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17886  ;;
17887  *)
17888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17889for as_dir in $PATH
17890do
17891  IFS=$as_save_IFS
17892  test -z "$as_dir" && as_dir=.
17893    for ac_exec_ext in '' $ac_executable_extensions; do
17894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17895    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17897    break 2
17898  fi
17899done
17900  done
17901IFS=$as_save_IFS
17902
17903  ;;
17904esac
17905fi
17906STAT=$ac_cv_path_STAT
17907if test -n "$STAT"; then
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17909$as_echo "$STAT" >&6; }
17910else
17911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17912$as_echo "no" >&6; }
17913fi
17914
17915
17916  test -n "$STAT" && break
17917done
17918
17919    else
17920      # If it succeeded, then it was overridden by the user. We will use it
17921      # for the tool.
17922
17923      # First remove it from the list of overridden variables, so we can test
17924      # for unknown variables in the end.
17925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17926
17927      # Check if the provided tool contains a complete path.
17928      tool_specified="$STAT"
17929      tool_basename="${tool_specified##*/}"
17930      if test "x$tool_basename" = "x$tool_specified"; then
17931        # A command without a complete path is provided, search $PATH.
17932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17933$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17934        # Extract the first word of "$tool_basename", so it can be a program name with args.
17935set dummy $tool_basename; ac_word=$2
17936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17937$as_echo_n "checking for $ac_word... " >&6; }
17938if ${ac_cv_path_STAT+:} false; then :
17939  $as_echo_n "(cached) " >&6
17940else
17941  case $STAT in
17942  [\\/]* | ?:[\\/]*)
17943  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17944  ;;
17945  *)
17946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17947for as_dir in $PATH
17948do
17949  IFS=$as_save_IFS
17950  test -z "$as_dir" && as_dir=.
17951    for ac_exec_ext in '' $ac_executable_extensions; do
17952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17953    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17955    break 2
17956  fi
17957done
17958  done
17959IFS=$as_save_IFS
17960
17961  ;;
17962esac
17963fi
17964STAT=$ac_cv_path_STAT
17965if test -n "$STAT"; then
17966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17967$as_echo "$STAT" >&6; }
17968else
17969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17970$as_echo "no" >&6; }
17971fi
17972
17973
17974        if test "x$STAT" = x; then
17975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17976        fi
17977      else
17978        # Otherwise we believe it is a complete path. Use it as it is.
17979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17980$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17982$as_echo_n "checking for STAT... " >&6; }
17983        if test ! -x "$tool_specified"; then
17984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17985$as_echo "not found" >&6; }
17986          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
17987        fi
17988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17989$as_echo "$tool_specified" >&6; }
17990      fi
17991    fi
17992  fi
17993
17994
17995
17996
17997  # Publish this variable in the help.
17998
17999
18000  if test "x$TIME" = x; then
18001    # The variable is not set by user, try to locate tool using the code snippet
18002    for ac_prog in time
18003do
18004  # Extract the first word of "$ac_prog", so it can be a program name with args.
18005set dummy $ac_prog; ac_word=$2
18006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18007$as_echo_n "checking for $ac_word... " >&6; }
18008if ${ac_cv_path_TIME+:} false; then :
18009  $as_echo_n "(cached) " >&6
18010else
18011  case $TIME in
18012  [\\/]* | ?:[\\/]*)
18013  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18014  ;;
18015  *)
18016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18017for as_dir in $PATH
18018do
18019  IFS=$as_save_IFS
18020  test -z "$as_dir" && as_dir=.
18021    for ac_exec_ext in '' $ac_executable_extensions; do
18022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18023    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18025    break 2
18026  fi
18027done
18028  done
18029IFS=$as_save_IFS
18030
18031  ;;
18032esac
18033fi
18034TIME=$ac_cv_path_TIME
18035if test -n "$TIME"; then
18036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18037$as_echo "$TIME" >&6; }
18038else
18039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18040$as_echo "no" >&6; }
18041fi
18042
18043
18044  test -n "$TIME" && break
18045done
18046
18047  else
18048    # The variable is set, but is it from the command line or the environment?
18049
18050    # Try to remove the string !TIME! from our list.
18051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18053      # If it failed, the variable was not from the command line. Ignore it,
18054      # but warn the user (except for BASH, which is always set by the calling BASH).
18055      if test "xTIME" != xBASH; then
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18057$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18058      fi
18059      # Try to locate tool using the code snippet
18060      for ac_prog in time
18061do
18062  # Extract the first word of "$ac_prog", so it can be a program name with args.
18063set dummy $ac_prog; ac_word=$2
18064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18065$as_echo_n "checking for $ac_word... " >&6; }
18066if ${ac_cv_path_TIME+:} false; then :
18067  $as_echo_n "(cached) " >&6
18068else
18069  case $TIME in
18070  [\\/]* | ?:[\\/]*)
18071  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18072  ;;
18073  *)
18074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18075for as_dir in $PATH
18076do
18077  IFS=$as_save_IFS
18078  test -z "$as_dir" && as_dir=.
18079    for ac_exec_ext in '' $ac_executable_extensions; do
18080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18081    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18083    break 2
18084  fi
18085done
18086  done
18087IFS=$as_save_IFS
18088
18089  ;;
18090esac
18091fi
18092TIME=$ac_cv_path_TIME
18093if test -n "$TIME"; then
18094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18095$as_echo "$TIME" >&6; }
18096else
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18098$as_echo "no" >&6; }
18099fi
18100
18101
18102  test -n "$TIME" && break
18103done
18104
18105    else
18106      # If it succeeded, then it was overridden by the user. We will use it
18107      # for the tool.
18108
18109      # First remove it from the list of overridden variables, so we can test
18110      # for unknown variables in the end.
18111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18112
18113      # Check if the provided tool contains a complete path.
18114      tool_specified="$TIME"
18115      tool_basename="${tool_specified##*/}"
18116      if test "x$tool_basename" = "x$tool_specified"; then
18117        # A command without a complete path is provided, search $PATH.
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18119$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18120        # Extract the first word of "$tool_basename", so it can be a program name with args.
18121set dummy $tool_basename; ac_word=$2
18122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18123$as_echo_n "checking for $ac_word... " >&6; }
18124if ${ac_cv_path_TIME+:} false; then :
18125  $as_echo_n "(cached) " >&6
18126else
18127  case $TIME in
18128  [\\/]* | ?:[\\/]*)
18129  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18130  ;;
18131  *)
18132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18133for as_dir in $PATH
18134do
18135  IFS=$as_save_IFS
18136  test -z "$as_dir" && as_dir=.
18137    for ac_exec_ext in '' $ac_executable_extensions; do
18138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18139    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18141    break 2
18142  fi
18143done
18144  done
18145IFS=$as_save_IFS
18146
18147  ;;
18148esac
18149fi
18150TIME=$ac_cv_path_TIME
18151if test -n "$TIME"; then
18152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18153$as_echo "$TIME" >&6; }
18154else
18155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18156$as_echo "no" >&6; }
18157fi
18158
18159
18160        if test "x$TIME" = x; then
18161          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18162        fi
18163      else
18164        # Otherwise we believe it is a complete path. Use it as it is.
18165        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18166$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18168$as_echo_n "checking for TIME... " >&6; }
18169        if test ! -x "$tool_specified"; then
18170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18171$as_echo "not found" >&6; }
18172          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18173        fi
18174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18175$as_echo "$tool_specified" >&6; }
18176      fi
18177    fi
18178  fi
18179
18180
18181  # Check if it's GNU time
18182  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18183  if test "x$IS_GNU_TIME" != x; then
18184    IS_GNU_TIME=yes
18185  else
18186    IS_GNU_TIME=no
18187  fi
18188
18189
18190  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18191
18192
18193
18194  # Publish this variable in the help.
18195
18196
18197  if test "x$COMM" = x; then
18198    # The variable is not set by user, try to locate tool using the code snippet
18199    for ac_prog in comm
18200do
18201  # Extract the first word of "$ac_prog", so it can be a program name with args.
18202set dummy $ac_prog; ac_word=$2
18203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18204$as_echo_n "checking for $ac_word... " >&6; }
18205if ${ac_cv_path_COMM+:} false; then :
18206  $as_echo_n "(cached) " >&6
18207else
18208  case $COMM in
18209  [\\/]* | ?:[\\/]*)
18210  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18211  ;;
18212  *)
18213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18214for as_dir in $PATH
18215do
18216  IFS=$as_save_IFS
18217  test -z "$as_dir" && as_dir=.
18218    for ac_exec_ext in '' $ac_executable_extensions; do
18219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18220    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18222    break 2
18223  fi
18224done
18225  done
18226IFS=$as_save_IFS
18227
18228  ;;
18229esac
18230fi
18231COMM=$ac_cv_path_COMM
18232if test -n "$COMM"; then
18233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18234$as_echo "$COMM" >&6; }
18235else
18236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18237$as_echo "no" >&6; }
18238fi
18239
18240
18241  test -n "$COMM" && break
18242done
18243
18244  else
18245    # The variable is set, but is it from the command line or the environment?
18246
18247    # Try to remove the string !COMM! from our list.
18248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18250      # If it failed, the variable was not from the command line. Ignore it,
18251      # but warn the user (except for BASH, which is always set by the calling BASH).
18252      if test "xCOMM" != xBASH; then
18253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18254$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18255      fi
18256      # Try to locate tool using the code snippet
18257      for ac_prog in comm
18258do
18259  # Extract the first word of "$ac_prog", so it can be a program name with args.
18260set dummy $ac_prog; ac_word=$2
18261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18262$as_echo_n "checking for $ac_word... " >&6; }
18263if ${ac_cv_path_COMM+:} false; then :
18264  $as_echo_n "(cached) " >&6
18265else
18266  case $COMM in
18267  [\\/]* | ?:[\\/]*)
18268  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18269  ;;
18270  *)
18271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18272for as_dir in $PATH
18273do
18274  IFS=$as_save_IFS
18275  test -z "$as_dir" && as_dir=.
18276    for ac_exec_ext in '' $ac_executable_extensions; do
18277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18278    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18280    break 2
18281  fi
18282done
18283  done
18284IFS=$as_save_IFS
18285
18286  ;;
18287esac
18288fi
18289COMM=$ac_cv_path_COMM
18290if test -n "$COMM"; then
18291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18292$as_echo "$COMM" >&6; }
18293else
18294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18295$as_echo "no" >&6; }
18296fi
18297
18298
18299  test -n "$COMM" && break
18300done
18301
18302    else
18303      # If it succeeded, then it was overridden by the user. We will use it
18304      # for the tool.
18305
18306      # First remove it from the list of overridden variables, so we can test
18307      # for unknown variables in the end.
18308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18309
18310      # Check if the provided tool contains a complete path.
18311      tool_specified="$COMM"
18312      tool_basename="${tool_specified##*/}"
18313      if test "x$tool_basename" = "x$tool_specified"; then
18314        # A command without a complete path is provided, search $PATH.
18315        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18316$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18317        # Extract the first word of "$tool_basename", so it can be a program name with args.
18318set dummy $tool_basename; ac_word=$2
18319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18320$as_echo_n "checking for $ac_word... " >&6; }
18321if ${ac_cv_path_COMM+:} false; then :
18322  $as_echo_n "(cached) " >&6
18323else
18324  case $COMM in
18325  [\\/]* | ?:[\\/]*)
18326  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18327  ;;
18328  *)
18329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18330for as_dir in $PATH
18331do
18332  IFS=$as_save_IFS
18333  test -z "$as_dir" && as_dir=.
18334    for ac_exec_ext in '' $ac_executable_extensions; do
18335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18336    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18338    break 2
18339  fi
18340done
18341  done
18342IFS=$as_save_IFS
18343
18344  ;;
18345esac
18346fi
18347COMM=$ac_cv_path_COMM
18348if test -n "$COMM"; then
18349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18350$as_echo "$COMM" >&6; }
18351else
18352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18353$as_echo "no" >&6; }
18354fi
18355
18356
18357        if test "x$COMM" = x; then
18358          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18359        fi
18360      else
18361        # Otherwise we believe it is a complete path. Use it as it is.
18362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18363$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18365$as_echo_n "checking for COMM... " >&6; }
18366        if test ! -x "$tool_specified"; then
18367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18368$as_echo "not found" >&6; }
18369          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18370        fi
18371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18372$as_echo "$tool_specified" >&6; }
18373      fi
18374    fi
18375  fi
18376
18377
18378
18379  if test "x$COMM" = x; then
18380    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18381  fi
18382
18383
18384  fi
18385
18386  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18387
18388
18389
18390  # Publish this variable in the help.
18391
18392
18393  if test "x$DSYMUTIL" = x; then
18394    # The variable is not set by user, try to locate tool using the code snippet
18395    for ac_prog in dsymutil
18396do
18397  # Extract the first word of "$ac_prog", so it can be a program name with args.
18398set dummy $ac_prog; ac_word=$2
18399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18400$as_echo_n "checking for $ac_word... " >&6; }
18401if ${ac_cv_path_DSYMUTIL+:} false; then :
18402  $as_echo_n "(cached) " >&6
18403else
18404  case $DSYMUTIL in
18405  [\\/]* | ?:[\\/]*)
18406  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18407  ;;
18408  *)
18409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18410for as_dir in $PATH
18411do
18412  IFS=$as_save_IFS
18413  test -z "$as_dir" && as_dir=.
18414    for ac_exec_ext in '' $ac_executable_extensions; do
18415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18416    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18418    break 2
18419  fi
18420done
18421  done
18422IFS=$as_save_IFS
18423
18424  ;;
18425esac
18426fi
18427DSYMUTIL=$ac_cv_path_DSYMUTIL
18428if test -n "$DSYMUTIL"; then
18429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18430$as_echo "$DSYMUTIL" >&6; }
18431else
18432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18433$as_echo "no" >&6; }
18434fi
18435
18436
18437  test -n "$DSYMUTIL" && break
18438done
18439
18440  else
18441    # The variable is set, but is it from the command line or the environment?
18442
18443    # Try to remove the string !DSYMUTIL! from our list.
18444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18446      # If it failed, the variable was not from the command line. Ignore it,
18447      # but warn the user (except for BASH, which is always set by the calling BASH).
18448      if test "xDSYMUTIL" != xBASH; then
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18450$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18451      fi
18452      # Try to locate tool using the code snippet
18453      for ac_prog in dsymutil
18454do
18455  # Extract the first word of "$ac_prog", so it can be a program name with args.
18456set dummy $ac_prog; ac_word=$2
18457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18458$as_echo_n "checking for $ac_word... " >&6; }
18459if ${ac_cv_path_DSYMUTIL+:} false; then :
18460  $as_echo_n "(cached) " >&6
18461else
18462  case $DSYMUTIL in
18463  [\\/]* | ?:[\\/]*)
18464  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18465  ;;
18466  *)
18467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18468for as_dir in $PATH
18469do
18470  IFS=$as_save_IFS
18471  test -z "$as_dir" && as_dir=.
18472    for ac_exec_ext in '' $ac_executable_extensions; do
18473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18474    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18476    break 2
18477  fi
18478done
18479  done
18480IFS=$as_save_IFS
18481
18482  ;;
18483esac
18484fi
18485DSYMUTIL=$ac_cv_path_DSYMUTIL
18486if test -n "$DSYMUTIL"; then
18487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18488$as_echo "$DSYMUTIL" >&6; }
18489else
18490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18491$as_echo "no" >&6; }
18492fi
18493
18494
18495  test -n "$DSYMUTIL" && break
18496done
18497
18498    else
18499      # If it succeeded, then it was overridden by the user. We will use it
18500      # for the tool.
18501
18502      # First remove it from the list of overridden variables, so we can test
18503      # for unknown variables in the end.
18504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18505
18506      # Check if the provided tool contains a complete path.
18507      tool_specified="$DSYMUTIL"
18508      tool_basename="${tool_specified##*/}"
18509      if test "x$tool_basename" = "x$tool_specified"; then
18510        # A command without a complete path is provided, search $PATH.
18511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18512$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18513        # Extract the first word of "$tool_basename", so it can be a program name with args.
18514set dummy $tool_basename; ac_word=$2
18515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18516$as_echo_n "checking for $ac_word... " >&6; }
18517if ${ac_cv_path_DSYMUTIL+:} false; then :
18518  $as_echo_n "(cached) " >&6
18519else
18520  case $DSYMUTIL in
18521  [\\/]* | ?:[\\/]*)
18522  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18523  ;;
18524  *)
18525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18526for as_dir in $PATH
18527do
18528  IFS=$as_save_IFS
18529  test -z "$as_dir" && as_dir=.
18530    for ac_exec_ext in '' $ac_executable_extensions; do
18531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18532    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18534    break 2
18535  fi
18536done
18537  done
18538IFS=$as_save_IFS
18539
18540  ;;
18541esac
18542fi
18543DSYMUTIL=$ac_cv_path_DSYMUTIL
18544if test -n "$DSYMUTIL"; then
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18546$as_echo "$DSYMUTIL" >&6; }
18547else
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18549$as_echo "no" >&6; }
18550fi
18551
18552
18553        if test "x$DSYMUTIL" = x; then
18554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18555        fi
18556      else
18557        # Otherwise we believe it is a complete path. Use it as it is.
18558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18559$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18561$as_echo_n "checking for DSYMUTIL... " >&6; }
18562        if test ! -x "$tool_specified"; then
18563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18564$as_echo "not found" >&6; }
18565          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18566        fi
18567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18568$as_echo "$tool_specified" >&6; }
18569      fi
18570    fi
18571  fi
18572
18573
18574
18575  if test "x$DSYMUTIL" = x; then
18576    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18577  fi
18578
18579
18580
18581
18582
18583  # Publish this variable in the help.
18584
18585
18586  if test "x$XATTR" = x; then
18587    # The variable is not set by user, try to locate tool using the code snippet
18588    for ac_prog in xattr
18589do
18590  # Extract the first word of "$ac_prog", so it can be a program name with args.
18591set dummy $ac_prog; ac_word=$2
18592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18593$as_echo_n "checking for $ac_word... " >&6; }
18594if ${ac_cv_path_XATTR+:} false; then :
18595  $as_echo_n "(cached) " >&6
18596else
18597  case $XATTR in
18598  [\\/]* | ?:[\\/]*)
18599  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18600  ;;
18601  *)
18602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18603for as_dir in $PATH
18604do
18605  IFS=$as_save_IFS
18606  test -z "$as_dir" && as_dir=.
18607    for ac_exec_ext in '' $ac_executable_extensions; do
18608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18609    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18611    break 2
18612  fi
18613done
18614  done
18615IFS=$as_save_IFS
18616
18617  ;;
18618esac
18619fi
18620XATTR=$ac_cv_path_XATTR
18621if test -n "$XATTR"; then
18622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18623$as_echo "$XATTR" >&6; }
18624else
18625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18626$as_echo "no" >&6; }
18627fi
18628
18629
18630  test -n "$XATTR" && break
18631done
18632
18633  else
18634    # The variable is set, but is it from the command line or the environment?
18635
18636    # Try to remove the string !XATTR! from our list.
18637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18639      # If it failed, the variable was not from the command line. Ignore it,
18640      # but warn the user (except for BASH, which is always set by the calling BASH).
18641      if test "xXATTR" != xBASH; then
18642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18643$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18644      fi
18645      # Try to locate tool using the code snippet
18646      for ac_prog in xattr
18647do
18648  # Extract the first word of "$ac_prog", so it can be a program name with args.
18649set dummy $ac_prog; ac_word=$2
18650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18651$as_echo_n "checking for $ac_word... " >&6; }
18652if ${ac_cv_path_XATTR+:} false; then :
18653  $as_echo_n "(cached) " >&6
18654else
18655  case $XATTR in
18656  [\\/]* | ?:[\\/]*)
18657  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18658  ;;
18659  *)
18660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18661for as_dir in $PATH
18662do
18663  IFS=$as_save_IFS
18664  test -z "$as_dir" && as_dir=.
18665    for ac_exec_ext in '' $ac_executable_extensions; do
18666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18667    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18669    break 2
18670  fi
18671done
18672  done
18673IFS=$as_save_IFS
18674
18675  ;;
18676esac
18677fi
18678XATTR=$ac_cv_path_XATTR
18679if test -n "$XATTR"; then
18680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18681$as_echo "$XATTR" >&6; }
18682else
18683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18684$as_echo "no" >&6; }
18685fi
18686
18687
18688  test -n "$XATTR" && break
18689done
18690
18691    else
18692      # If it succeeded, then it was overridden by the user. We will use it
18693      # for the tool.
18694
18695      # First remove it from the list of overridden variables, so we can test
18696      # for unknown variables in the end.
18697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18698
18699      # Check if the provided tool contains a complete path.
18700      tool_specified="$XATTR"
18701      tool_basename="${tool_specified##*/}"
18702      if test "x$tool_basename" = "x$tool_specified"; then
18703        # A command without a complete path is provided, search $PATH.
18704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18705$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18706        # Extract the first word of "$tool_basename", so it can be a program name with args.
18707set dummy $tool_basename; ac_word=$2
18708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18709$as_echo_n "checking for $ac_word... " >&6; }
18710if ${ac_cv_path_XATTR+:} false; then :
18711  $as_echo_n "(cached) " >&6
18712else
18713  case $XATTR in
18714  [\\/]* | ?:[\\/]*)
18715  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18716  ;;
18717  *)
18718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18719for as_dir in $PATH
18720do
18721  IFS=$as_save_IFS
18722  test -z "$as_dir" && as_dir=.
18723    for ac_exec_ext in '' $ac_executable_extensions; do
18724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18725    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18727    break 2
18728  fi
18729done
18730  done
18731IFS=$as_save_IFS
18732
18733  ;;
18734esac
18735fi
18736XATTR=$ac_cv_path_XATTR
18737if test -n "$XATTR"; then
18738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18739$as_echo "$XATTR" >&6; }
18740else
18741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18742$as_echo "no" >&6; }
18743fi
18744
18745
18746        if test "x$XATTR" = x; then
18747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18748        fi
18749      else
18750        # Otherwise we believe it is a complete path. Use it as it is.
18751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18752$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18754$as_echo_n "checking for XATTR... " >&6; }
18755        if test ! -x "$tool_specified"; then
18756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18757$as_echo "not found" >&6; }
18758          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18759        fi
18760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18761$as_echo "$tool_specified" >&6; }
18762      fi
18763    fi
18764  fi
18765
18766
18767
18768  if test "x$XATTR" = x; then
18769    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18770  fi
18771
18772
18773
18774
18775  # Publish this variable in the help.
18776
18777
18778  if test "x$CODESIGN" = x; then
18779    # The variable is not set by user, try to locate tool using the code snippet
18780    for ac_prog in codesign
18781do
18782  # Extract the first word of "$ac_prog", so it can be a program name with args.
18783set dummy $ac_prog; ac_word=$2
18784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18785$as_echo_n "checking for $ac_word... " >&6; }
18786if ${ac_cv_path_CODESIGN+:} false; then :
18787  $as_echo_n "(cached) " >&6
18788else
18789  case $CODESIGN in
18790  [\\/]* | ?:[\\/]*)
18791  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18792  ;;
18793  *)
18794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18795for as_dir in $PATH
18796do
18797  IFS=$as_save_IFS
18798  test -z "$as_dir" && as_dir=.
18799    for ac_exec_ext in '' $ac_executable_extensions; do
18800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18801    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18803    break 2
18804  fi
18805done
18806  done
18807IFS=$as_save_IFS
18808
18809  ;;
18810esac
18811fi
18812CODESIGN=$ac_cv_path_CODESIGN
18813if test -n "$CODESIGN"; then
18814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18815$as_echo "$CODESIGN" >&6; }
18816else
18817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18818$as_echo "no" >&6; }
18819fi
18820
18821
18822  test -n "$CODESIGN" && break
18823done
18824
18825  else
18826    # The variable is set, but is it from the command line or the environment?
18827
18828    # Try to remove the string !CODESIGN! from our list.
18829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18831      # If it failed, the variable was not from the command line. Ignore it,
18832      # but warn the user (except for BASH, which is always set by the calling BASH).
18833      if test "xCODESIGN" != xBASH; then
18834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18835$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18836      fi
18837      # Try to locate tool using the code snippet
18838      for ac_prog in codesign
18839do
18840  # Extract the first word of "$ac_prog", so it can be a program name with args.
18841set dummy $ac_prog; ac_word=$2
18842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18843$as_echo_n "checking for $ac_word... " >&6; }
18844if ${ac_cv_path_CODESIGN+:} false; then :
18845  $as_echo_n "(cached) " >&6
18846else
18847  case $CODESIGN in
18848  [\\/]* | ?:[\\/]*)
18849  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18850  ;;
18851  *)
18852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18853for as_dir in $PATH
18854do
18855  IFS=$as_save_IFS
18856  test -z "$as_dir" && as_dir=.
18857    for ac_exec_ext in '' $ac_executable_extensions; do
18858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18859    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18861    break 2
18862  fi
18863done
18864  done
18865IFS=$as_save_IFS
18866
18867  ;;
18868esac
18869fi
18870CODESIGN=$ac_cv_path_CODESIGN
18871if test -n "$CODESIGN"; then
18872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18873$as_echo "$CODESIGN" >&6; }
18874else
18875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18876$as_echo "no" >&6; }
18877fi
18878
18879
18880  test -n "$CODESIGN" && break
18881done
18882
18883    else
18884      # If it succeeded, then it was overridden by the user. We will use it
18885      # for the tool.
18886
18887      # First remove it from the list of overridden variables, so we can test
18888      # for unknown variables in the end.
18889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18890
18891      # Check if the provided tool contains a complete path.
18892      tool_specified="$CODESIGN"
18893      tool_basename="${tool_specified##*/}"
18894      if test "x$tool_basename" = "x$tool_specified"; then
18895        # A command without a complete path is provided, search $PATH.
18896        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18897$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18898        # Extract the first word of "$tool_basename", so it can be a program name with args.
18899set dummy $tool_basename; ac_word=$2
18900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18901$as_echo_n "checking for $ac_word... " >&6; }
18902if ${ac_cv_path_CODESIGN+:} false; then :
18903  $as_echo_n "(cached) " >&6
18904else
18905  case $CODESIGN in
18906  [\\/]* | ?:[\\/]*)
18907  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18908  ;;
18909  *)
18910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18911for as_dir in $PATH
18912do
18913  IFS=$as_save_IFS
18914  test -z "$as_dir" && as_dir=.
18915    for ac_exec_ext in '' $ac_executable_extensions; do
18916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18917    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18919    break 2
18920  fi
18921done
18922  done
18923IFS=$as_save_IFS
18924
18925  ;;
18926esac
18927fi
18928CODESIGN=$ac_cv_path_CODESIGN
18929if test -n "$CODESIGN"; then
18930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18931$as_echo "$CODESIGN" >&6; }
18932else
18933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18934$as_echo "no" >&6; }
18935fi
18936
18937
18938        if test "x$CODESIGN" = x; then
18939          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18940        fi
18941      else
18942        # Otherwise we believe it is a complete path. Use it as it is.
18943        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18944$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18946$as_echo_n "checking for CODESIGN... " >&6; }
18947        if test ! -x "$tool_specified"; then
18948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18949$as_echo "not found" >&6; }
18950          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18951        fi
18952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18953$as_echo "$tool_specified" >&6; }
18954      fi
18955    fi
18956  fi
18957
18958
18959    if test "x$CODESIGN" != "x"; then
18960      # Verify that the openjdk_codesign certificate is present
18961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18962$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18963      rm -f codesign-testfile
18964      touch codesign-testfile
18965      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18966      rm -f codesign-testfile
18967      if test "x$CODESIGN" = x; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18969$as_echo "no" >&6; }
18970      else
18971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18972$as_echo "yes" >&6; }
18973      fi
18974    fi
18975  fi
18976
18977
18978# Check if pkg-config is available.
18979
18980
18981if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18982	if test -n "$ac_tool_prefix"; then
18983  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18984set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18986$as_echo_n "checking for $ac_word... " >&6; }
18987if ${ac_cv_path_PKG_CONFIG+:} false; then :
18988  $as_echo_n "(cached) " >&6
18989else
18990  case $PKG_CONFIG in
18991  [\\/]* | ?:[\\/]*)
18992  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18993  ;;
18994  *)
18995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18996for as_dir in $PATH
18997do
18998  IFS=$as_save_IFS
18999  test -z "$as_dir" && as_dir=.
19000    for ac_exec_ext in '' $ac_executable_extensions; do
19001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19002    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19004    break 2
19005  fi
19006done
19007  done
19008IFS=$as_save_IFS
19009
19010  ;;
19011esac
19012fi
19013PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19014if test -n "$PKG_CONFIG"; then
19015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19016$as_echo "$PKG_CONFIG" >&6; }
19017else
19018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19019$as_echo "no" >&6; }
19020fi
19021
19022
19023fi
19024if test -z "$ac_cv_path_PKG_CONFIG"; then
19025  ac_pt_PKG_CONFIG=$PKG_CONFIG
19026  # Extract the first word of "pkg-config", so it can be a program name with args.
19027set dummy pkg-config; ac_word=$2
19028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19029$as_echo_n "checking for $ac_word... " >&6; }
19030if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19031  $as_echo_n "(cached) " >&6
19032else
19033  case $ac_pt_PKG_CONFIG in
19034  [\\/]* | ?:[\\/]*)
19035  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19036  ;;
19037  *)
19038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19039for as_dir in $PATH
19040do
19041  IFS=$as_save_IFS
19042  test -z "$as_dir" && as_dir=.
19043    for ac_exec_ext in '' $ac_executable_extensions; do
19044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19045    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19047    break 2
19048  fi
19049done
19050  done
19051IFS=$as_save_IFS
19052
19053  ;;
19054esac
19055fi
19056ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19057if test -n "$ac_pt_PKG_CONFIG"; then
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19059$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19060else
19061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19062$as_echo "no" >&6; }
19063fi
19064
19065  if test "x$ac_pt_PKG_CONFIG" = x; then
19066    PKG_CONFIG=""
19067  else
19068    case $cross_compiling:$ac_tool_warned in
19069yes:)
19070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19072ac_tool_warned=yes ;;
19073esac
19074    PKG_CONFIG=$ac_pt_PKG_CONFIG
19075  fi
19076else
19077  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19078fi
19079
19080fi
19081if test -n "$PKG_CONFIG"; then
19082	_pkg_min_version=0.9.0
19083	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19084$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19085	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19086		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19087$as_echo "yes" >&6; }
19088	else
19089		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090$as_echo "no" >&6; }
19091		PKG_CONFIG=""
19092	fi
19093
19094fi
19095
19096# After basic tools have been setup, we can check build os specific details.
19097
19098  ###############################################################################
19099
19100  # Note that this is the build platform OS version!
19101
19102  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19103  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19104  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19105  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19106
19107
19108
19109
19110
19111# Setup builddeps, for automatic downloading of tools we need.
19112# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19113# boot-jdk setup, but we need to have basic tools setup first.
19114
19115
19116# Check whether --with-builddeps-conf was given.
19117if test "${with_builddeps_conf+set}" = set; then :
19118  withval=$with_builddeps_conf;
19119fi
19120
19121
19122
19123# Check whether --with-builddeps-server was given.
19124if test "${with_builddeps_server+set}" = set; then :
19125  withval=$with_builddeps_server;
19126fi
19127
19128
19129
19130# Check whether --with-builddeps-dir was given.
19131if test "${with_builddeps_dir+set}" = set; then :
19132  withval=$with_builddeps_dir;
19133else
19134  with_builddeps_dir=/localhome/builddeps
19135fi
19136
19137
19138
19139# Check whether --with-builddeps-group was given.
19140if test "${with_builddeps_group+set}" = set; then :
19141  withval=$with_builddeps_group;
19142fi
19143
19144
19145
19146
19147  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19148    if test "x$with_builddeps_conf" != x; then
19149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19150$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19151      builddepsfile=$with_builddeps_conf
19152      if test -s $builddepsfile; then
19153        . $builddepsfile
19154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19155$as_echo "loaded!" >&6; }
19156      else
19157        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19158      fi
19159    else
19160      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19161$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19162      builddepsfile=`mktemp`
19163      touch $builddepsfile
19164      # Put all found confs into a single file.
19165      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19166      # Source the file to acquire the variables
19167      if test -s $builddepsfile; then
19168        . $builddepsfile
19169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19170$as_echo "found at least one!" >&6; }
19171      else
19172        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19173      fi
19174    fi
19175    # Create build and target names that use _ instead of "-" and ".".
19176    # This is necessary to use them in variable names.
19177    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19178    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19179    # Extract rewrite information for build and target
19180    eval rewritten_build=\${REWRITE_${build_var}}
19181    if test "x$rewritten_build" = x; then
19182      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19183      echo Build stays the same $rewritten_build
19184    else
19185      echo Rewriting build for builddeps into $rewritten_build
19186    fi
19187    eval rewritten_target=\${REWRITE_${target_var}}
19188    if test "x$rewritten_target" = x; then
19189      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19190      echo Target stays the same $rewritten_target
19191    else
19192      echo Rewriting target for builddeps into $rewritten_target
19193    fi
19194    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19195    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19196  fi
19197  for ac_prog in 7z unzip
19198do
19199  # Extract the first word of "$ac_prog", so it can be a program name with args.
19200set dummy $ac_prog; ac_word=$2
19201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19202$as_echo_n "checking for $ac_word... " >&6; }
19203if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19204  $as_echo_n "(cached) " >&6
19205else
19206  if test -n "$BDEPS_UNZIP"; then
19207  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19208else
19209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19210for as_dir in $PATH
19211do
19212  IFS=$as_save_IFS
19213  test -z "$as_dir" && as_dir=.
19214    for ac_exec_ext in '' $ac_executable_extensions; do
19215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19216    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19218    break 2
19219  fi
19220done
19221  done
19222IFS=$as_save_IFS
19223
19224fi
19225fi
19226BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19227if test -n "$BDEPS_UNZIP"; then
19228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19229$as_echo "$BDEPS_UNZIP" >&6; }
19230else
19231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19232$as_echo "no" >&6; }
19233fi
19234
19235
19236  test -n "$BDEPS_UNZIP" && break
19237done
19238
19239  if test "x$BDEPS_UNZIP" = x7z; then
19240    BDEPS_UNZIP="7z x"
19241  fi
19242
19243  for ac_prog in wget lftp ftp
19244do
19245  # Extract the first word of "$ac_prog", so it can be a program name with args.
19246set dummy $ac_prog; ac_word=$2
19247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19248$as_echo_n "checking for $ac_word... " >&6; }
19249if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19250  $as_echo_n "(cached) " >&6
19251else
19252  if test -n "$BDEPS_FTP"; then
19253  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19254else
19255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19256for as_dir in $PATH
19257do
19258  IFS=$as_save_IFS
19259  test -z "$as_dir" && as_dir=.
19260    for ac_exec_ext in '' $ac_executable_extensions; do
19261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19262    ac_cv_prog_BDEPS_FTP="$ac_prog"
19263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19264    break 2
19265  fi
19266done
19267  done
19268IFS=$as_save_IFS
19269
19270fi
19271fi
19272BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19273if test -n "$BDEPS_FTP"; then
19274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19275$as_echo "$BDEPS_FTP" >&6; }
19276else
19277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19278$as_echo "no" >&6; }
19279fi
19280
19281
19282  test -n "$BDEPS_FTP" && break
19283done
19284
19285
19286
19287###############################################################################
19288#
19289# Determine OpenJDK variants, options and version numbers.
19290#
19291###############################################################################
19292
19293# We need build & target for this.
19294
19295
19296  ###############################################################################
19297  #
19298  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19299  # We always build headless support.
19300  #
19301  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19302$as_echo_n "checking headful support... " >&6; }
19303  # Check whether --enable-headful was given.
19304if test "${enable_headful+set}" = set; then :
19305  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19306else
19307  SUPPORT_HEADFUL=yes
19308fi
19309
19310
19311  SUPPORT_HEADLESS=yes
19312  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19313
19314  if test "x$SUPPORT_HEADFUL" = xyes; then
19315    # We are building both headful and headless.
19316    headful_msg="include support for both headful and headless"
19317  fi
19318
19319  if test "x$SUPPORT_HEADFUL" = xno; then
19320    # Thus we are building headless only.
19321    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19322    headful_msg="headless only"
19323  fi
19324
19325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19326$as_echo "$headful_msg" >&6; }
19327
19328
19329
19330
19331
19332  # Control wether Hotspot runs Queens test after build.
19333  # Check whether --enable-hotspot-test-in-build was given.
19334if test "${enable_hotspot_test_in_build+set}" = set; then :
19335  enableval=$enable_hotspot_test_in_build;
19336else
19337  enable_hotspot_test_in_build=no
19338fi
19339
19340  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19341    TEST_IN_BUILD=true
19342  else
19343    TEST_IN_BUILD=false
19344  fi
19345
19346
19347  ###############################################################################
19348  #
19349  # Choose cacerts source file
19350  #
19351
19352# Check whether --with-cacerts-file was given.
19353if test "${with_cacerts_file+set}" = set; then :
19354  withval=$with_cacerts_file;
19355fi
19356
19357  if test "x$with_cacerts_file" != x; then
19358    CACERTS_FILE=$with_cacerts_file
19359  else
19360    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19361  fi
19362
19363
19364  ###############################################################################
19365  #
19366  # Enable or disable unlimited crypto
19367  #
19368  # Check whether --enable-unlimited-crypto was given.
19369if test "${enable_unlimited_crypto+set}" = set; then :
19370  enableval=$enable_unlimited_crypto;
19371else
19372  enable_unlimited_crypto=no
19373fi
19374
19375  if test "x$enable_unlimited_crypto" = "xyes"; then
19376    UNLIMITED_CRYPTO=true
19377  else
19378    UNLIMITED_CRYPTO=false
19379  fi
19380
19381
19382  ###############################################################################
19383  #
19384  # Enable or disable the elliptic curve crypto implementation
19385  #
19386
19387
19388  ###############################################################################
19389  #
19390  # --enable-rmiconnector-iiop
19391  #
19392  # Check whether --enable-rmiconnector-iiop was given.
19393if test "${enable_rmiconnector_iiop+set}" = set; then :
19394  enableval=$enable_rmiconnector_iiop;
19395fi
19396
19397  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19398    RMICONNECTOR_IIOP=true
19399  else
19400    RMICONNECTOR_IIOP=false
19401  fi
19402
19403
19404  ###############################################################################
19405  #
19406  # Compress jars
19407  #
19408  COMPRESS_JARS=false
19409
19410
19411
19412
19413  # Source the version numbers
19414  . $AUTOCONF_DIR/version-numbers
19415
19416  # Get the settings from parameters
19417
19418# Check whether --with-milestone was given.
19419if test "${with_milestone+set}" = set; then :
19420  withval=$with_milestone;
19421fi
19422
19423  if test "x$with_milestone" = xyes; then
19424    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19425  elif test "x$with_milestone" != x; then
19426    MILESTONE="$with_milestone"
19427  fi
19428  if test "x$MILESTONE" = x; then
19429    MILESTONE=internal
19430  fi
19431
19432
19433# Check whether --with-update-version was given.
19434if test "${with_update_version+set}" = set; then :
19435  withval=$with_update_version;
19436fi
19437
19438  if test "x$with_update_version" = xyes; then
19439    as_fn_error $? "Update version must have a value" "$LINENO" 5
19440  elif test "x$with_update_version" != x; then
19441    JDK_UPDATE_VERSION="$with_update_version"
19442    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19443    # to a bug in expr (which reduces it to just X). To work around this, we
19444    # always add a 0 to one digit update versions.
19445    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19446      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19447    fi
19448  fi
19449
19450
19451# Check whether --with-user-release-suffix was given.
19452if test "${with_user_release_suffix+set}" = set; then :
19453  withval=$with_user_release_suffix;
19454fi
19455
19456  if test "x$with_user_release_suffix" = xyes; then
19457    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19458  elif test "x$with_user_release_suffix" != x; then
19459    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19460  fi
19461
19462
19463# Check whether --with-build-number was given.
19464if test "${with_build_number+set}" = set; then :
19465  withval=$with_build_number;
19466fi
19467
19468  if test "x$with_build_number" = xyes; then
19469    as_fn_error $? "Build number must have a value" "$LINENO" 5
19470  elif test "x$with_build_number" != x; then
19471    JDK_BUILD_NUMBER="$with_build_number"
19472  fi
19473  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19474  if test "x$JDK_BUILD_NUMBER" = x; then
19475    JDK_BUILD_NUMBER=b00
19476    if test "x$USER_RELEASE_SUFFIX" = x; then
19477      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19478      # Avoid [:alnum:] since it depends on the locale.
19479      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19480      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19481    fi
19482  fi
19483
19484  # Now set the JDK version, milestone, build number etc.
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500  COPYRIGHT_YEAR=`date +'%Y'`
19501
19502
19503  if test "x$JDK_UPDATE_VERSION" != x; then
19504    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19505  else
19506    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19507  fi
19508
19509
19510  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19511
19512
19513
19514###############################################################################
19515#
19516# Setup BootJDK, used to bootstrap the build.
19517#
19518###############################################################################
19519
19520
19521  BOOT_JDK_FOUND=no
19522
19523# Check whether --with-boot-jdk was given.
19524if test "${with_boot_jdk+set}" = set; then :
19525  withval=$with_boot_jdk;
19526fi
19527
19528
19529  # We look for the Boot JDK through various means, going from more certain to
19530  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19531  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19532  # must check if this is indeed valid; otherwise we'll continue looking.
19533
19534  # Test: Is bootjdk explicitely set by command line arguments?
19535
19536  if test "x$BOOT_JDK_FOUND" = xno; then
19537    # Now execute the test
19538
19539  if test "x$with_boot_jdk" != x; then
19540    BOOT_JDK=$with_boot_jdk
19541    BOOT_JDK_FOUND=maybe
19542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19543$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19544  fi
19545
19546
19547    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19548    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19549      # Do we have a bin/java?
19550      if test ! -x "$BOOT_JDK/bin/java"; then
19551        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19553        BOOT_JDK_FOUND=no
19554      else
19555        # Do we have a bin/javac?
19556        if test ! -x "$BOOT_JDK/bin/javac"; then
19557          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19559          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19560$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19561          BOOT_JDK_FOUND=no
19562        else
19563          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19564          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19565            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19567            BOOT_JDK_FOUND=no
19568          else
19569            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19570            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19571
19572            # Extra M4 quote needed to protect [] in grep expression.
19573            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19574            if test "x$FOUND_CORRECT_VERSION" = x; then
19575              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19577              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19578$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19579              BOOT_JDK_FOUND=no
19580            else
19581              # We're done! :-)
19582              BOOT_JDK_FOUND=yes
19583
19584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19585
19586  # Input might be given as Windows format, start by converting to
19587  # unix format.
19588  path="$BOOT_JDK"
19589  new_path=`$CYGPATH -u "$path"`
19590
19591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19594  # "foo.exe" is OK but "foo" is an error.
19595  #
19596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19597  # It is also a way to make sure we got the proper file name for the real test later on.
19598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19599  if test "x$test_shortpath" = x; then
19600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19603  fi
19604
19605  # Call helper function which possibly converts this using DOS-style short mode.
19606  # If so, the updated path is stored in $new_path.
19607
19608  input_path="$new_path"
19609  # Check if we need to convert this using DOS-style short mode. If the path
19610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19611  # take no chances and rewrite it.
19612  # Note: m4 eats our [], so we need to use [ and ] instead.
19613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19614  if test "x$has_forbidden_chars" != x; then
19615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19619      # Going to short mode and back again did indeed matter. Since short mode is
19620      # case insensitive, let's make it lowercase to improve readability.
19621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19622      # Now convert it back to Unix-stile (cygpath)
19623      input_path=`$CYGPATH -u "$shortmode_path"`
19624      new_path="$input_path"
19625    fi
19626  fi
19627
19628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19629  if test "x$test_cygdrive_prefix" = x; then
19630    # As a simple fix, exclude /usr/bin since it's not a real path.
19631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19633      # a path prefixed by /cygdrive for fixpath to work.
19634      new_path="$CYGWIN_ROOT_PATH$input_path"
19635    fi
19636  fi
19637
19638
19639  if test "x$path" != "x$new_path"; then
19640    BOOT_JDK="$new_path"
19641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19643  fi
19644
19645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19646
19647  path="$BOOT_JDK"
19648  has_colon=`$ECHO $path | $GREP ^.:`
19649  new_path="$path"
19650  if test "x$has_colon" = x; then
19651    # Not in mixed or Windows style, start by that.
19652    new_path=`cmd //c echo $path`
19653  fi
19654
19655
19656  input_path="$new_path"
19657  # Check if we need to convert this using DOS-style short mode. If the path
19658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19659  # take no chances and rewrite it.
19660  # Note: m4 eats our [], so we need to use [ and ] instead.
19661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19662  if test "x$has_forbidden_chars" != x; then
19663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19665  fi
19666
19667
19668  windows_path="$new_path"
19669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19670    unix_path=`$CYGPATH -u "$windows_path"`
19671    new_path="$unix_path"
19672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19674    new_path="$unix_path"
19675  fi
19676
19677  if test "x$path" != "x$new_path"; then
19678    BOOT_JDK="$new_path"
19679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19681  fi
19682
19683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19685
19686  else
19687    # We're on a posix platform. Hooray! :)
19688    path="$BOOT_JDK"
19689    has_space=`$ECHO "$path" | $GREP " "`
19690    if test "x$has_space" != x; then
19691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19693      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19694    fi
19695
19696    # Use eval to expand a potential ~
19697    eval path="$path"
19698    if test ! -f "$path" && test ! -d "$path"; then
19699      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19700    fi
19701
19702    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19703  fi
19704
19705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19706$as_echo_n "checking for Boot JDK... " >&6; }
19707              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19708$as_echo "$BOOT_JDK" >&6; }
19709              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19710$as_echo_n "checking Boot JDK version... " >&6; }
19711              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19712              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19713$as_echo "$BOOT_JDK_VERSION" >&6; }
19714            fi # end check jdk version
19715          fi # end check rt.jar
19716        fi # end check javac
19717      fi # end check java
19718    fi # end check boot jdk found
19719  fi
19720
19721  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19722    # Having specified an argument which is incorrect will produce an instant failure;
19723    # we should not go on looking
19724    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19725  fi
19726
19727  # Test: Is bootjdk available from builddeps?
19728
19729  if test "x$BOOT_JDK_FOUND" = xno; then
19730    # Now execute the test
19731
19732
19733
19734  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19735    # Source the builddeps file again, to make sure it uses the latest variables!
19736    . $builddepsfile
19737    # Look for a target and build machine specific resource!
19738    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19739    if test "x$resource" = x; then
19740      # Ok, lets instead look for a target specific resource
19741      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19742    fi
19743    if test "x$resource" = x; then
19744      # Ok, lets instead look for a build specific resource
19745      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19746    fi
19747    if test "x$resource" = x; then
19748      # Ok, lets instead look for a generic resource
19749      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19750      resource=${builddep_bootjdk}
19751    fi
19752    if test "x$resource" != x; then
19753      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19754$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19755      # If the resource in the builddeps.conf file is an existing directory,
19756      # for example /java/linux/cups
19757      if test -d ${resource}; then
19758        depdir=${resource}
19759      else
19760
19761  # bootjdk is for example mymodule
19762  # $resource is for example libs/general/libmymod_1_2_3.zip
19763  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19764  # $with_builddeps_dir is for example /localhome/builddeps
19765  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19766  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19767  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19768  filename=`basename $resource`
19769  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19770  filebase=${filename%%.*}
19771  extension=${filename#*.}
19772  installdir=$with_builddeps_dir/$filebase
19773  if test ! -f $installdir/$filename.unpacked; then
19774    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19775$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19776    if test ! -d $installdir; then
19777      mkdir -p $installdir
19778    fi
19779    if test ! -d $installdir; then
19780      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19781    fi
19782    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19783    touch $tmpfile
19784    if test ! -f $tmpfile; then
19785      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19786    fi
19787
19788  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19789  # $tmpfile is the local file name for the downloaded file.
19790  VALID_TOOL=no
19791  if test "x$BDEPS_FTP" = xwget; then
19792    VALID_TOOL=yes
19793    wget -O $tmpfile $with_builddeps_server/$resource
19794  fi
19795  if test "x$BDEPS_FTP" = xlftp; then
19796    VALID_TOOL=yes
19797    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19798  fi
19799  if test "x$BDEPS_FTP" = xftp; then
19800    VALID_TOOL=yes
19801    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19802    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19803    FTPUSERPWD=${FTPSERVER%%@*}
19804    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19805      FTPUSER=${userpwd%%:*}
19806      FTPPWD=${userpwd#*@}
19807      FTPSERVER=${FTPSERVER#*@}
19808    else
19809      FTPUSER=ftp
19810      FTPPWD=ftp
19811    fi
19812    # the "pass" command does not work on some
19813    # ftp clients (read ftp.exe) but if it works,
19814    # passive mode is better!
19815    ( \
19816        echo "user $FTPUSER $FTPPWD"        ; \
19817        echo "pass"                         ; \
19818        echo "bin"                          ; \
19819        echo "get $FTPPATH $tmpfile"              ; \
19820    ) | ftp -in $FTPSERVER
19821  fi
19822  if test "x$VALID_TOOL" != xyes; then
19823    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19824  fi
19825
19826    mv $tmpfile $installdir/$filename
19827    if test ! -s $installdir/$filename; then
19828      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19829    fi
19830    case "$extension" in
19831      zip)  echo "Unzipping $installdir/$filename..."
19832        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19833        ;;
19834      tar.gz) echo "Untaring $installdir/$filename..."
19835        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19836        ;;
19837      tgz) echo "Untaring $installdir/$filename..."
19838        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19839        ;;
19840      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19841        ;;
19842    esac
19843  fi
19844  if test -f $installdir/$filename.unpacked; then
19845    depdir=$installdir
19846  fi
19847
19848      fi
19849      # Source the builddeps file again, because in the previous command, the depdir
19850      # was updated to point at the current build dependency install directory.
19851      . $builddepsfile
19852      # Now extract variables from the builddeps.conf files.
19853      theroot=${builddep_bootjdk_ROOT}
19854      thecflags=${builddep_bootjdk_CFLAGS}
19855      thelibs=${builddep_bootjdk_LIBS}
19856      if test "x$depdir" = x; then
19857        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19858      fi
19859      BOOT_JDK=$depdir
19860      if test "x$theroot" != x; then
19861        BOOT_JDK="$theroot"
19862      fi
19863      if test "x$thecflags" != x; then
19864        BOOT_JDK_CFLAGS="$thecflags"
19865      fi
19866      if test "x$thelibs" != x; then
19867        BOOT_JDK_LIBS="$thelibs"
19868      fi
19869      BOOT_JDK_FOUND=maybe
19870      else BOOT_JDK_FOUND=no
19871
19872    fi
19873    else BOOT_JDK_FOUND=no
19874
19875  fi
19876
19877
19878
19879    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19880    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19881      # Do we have a bin/java?
19882      if test ! -x "$BOOT_JDK/bin/java"; then
19883        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19885        BOOT_JDK_FOUND=no
19886      else
19887        # Do we have a bin/javac?
19888        if test ! -x "$BOOT_JDK/bin/javac"; then
19889          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19891          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19892$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19893          BOOT_JDK_FOUND=no
19894        else
19895          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19896          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19897            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19899            BOOT_JDK_FOUND=no
19900          else
19901            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19902            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19903
19904            # Extra M4 quote needed to protect [] in grep expression.
19905            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19906            if test "x$FOUND_CORRECT_VERSION" = x; then
19907              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19909              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19910$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19911              BOOT_JDK_FOUND=no
19912            else
19913              # We're done! :-)
19914              BOOT_JDK_FOUND=yes
19915
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917
19918  # Input might be given as Windows format, start by converting to
19919  # unix format.
19920  path="$BOOT_JDK"
19921  new_path=`$CYGPATH -u "$path"`
19922
19923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19926  # "foo.exe" is OK but "foo" is an error.
19927  #
19928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19929  # It is also a way to make sure we got the proper file name for the real test later on.
19930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19931  if test "x$test_shortpath" = x; then
19932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19934    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19935  fi
19936
19937  # Call helper function which possibly converts this using DOS-style short mode.
19938  # If so, the updated path is stored in $new_path.
19939
19940  input_path="$new_path"
19941  # Check if we need to convert this using DOS-style short mode. If the path
19942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19943  # take no chances and rewrite it.
19944  # Note: m4 eats our [], so we need to use [ and ] instead.
19945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19946  if test "x$has_forbidden_chars" != x; then
19947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19951      # Going to short mode and back again did indeed matter. Since short mode is
19952      # case insensitive, let's make it lowercase to improve readability.
19953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19954      # Now convert it back to Unix-stile (cygpath)
19955      input_path=`$CYGPATH -u "$shortmode_path"`
19956      new_path="$input_path"
19957    fi
19958  fi
19959
19960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19961  if test "x$test_cygdrive_prefix" = x; then
19962    # As a simple fix, exclude /usr/bin since it's not a real path.
19963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19965      # a path prefixed by /cygdrive for fixpath to work.
19966      new_path="$CYGWIN_ROOT_PATH$input_path"
19967    fi
19968  fi
19969
19970
19971  if test "x$path" != "x$new_path"; then
19972    BOOT_JDK="$new_path"
19973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19975  fi
19976
19977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19978
19979  path="$BOOT_JDK"
19980  has_colon=`$ECHO $path | $GREP ^.:`
19981  new_path="$path"
19982  if test "x$has_colon" = x; then
19983    # Not in mixed or Windows style, start by that.
19984    new_path=`cmd //c echo $path`
19985  fi
19986
19987
19988  input_path="$new_path"
19989  # Check if we need to convert this using DOS-style short mode. If the path
19990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19991  # take no chances and rewrite it.
19992  # Note: m4 eats our [], so we need to use [ and ] instead.
19993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19994  if test "x$has_forbidden_chars" != x; then
19995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19997  fi
19998
19999
20000  windows_path="$new_path"
20001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002    unix_path=`$CYGPATH -u "$windows_path"`
20003    new_path="$unix_path"
20004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20006    new_path="$unix_path"
20007  fi
20008
20009  if test "x$path" != "x$new_path"; then
20010    BOOT_JDK="$new_path"
20011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20012$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20013  fi
20014
20015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20017
20018  else
20019    # We're on a posix platform. Hooray! :)
20020    path="$BOOT_JDK"
20021    has_space=`$ECHO "$path" | $GREP " "`
20022    if test "x$has_space" != x; then
20023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20025      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20026    fi
20027
20028    # Use eval to expand a potential ~
20029    eval path="$path"
20030    if test ! -f "$path" && test ! -d "$path"; then
20031      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20032    fi
20033
20034    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20035  fi
20036
20037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20038$as_echo_n "checking for Boot JDK... " >&6; }
20039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20040$as_echo "$BOOT_JDK" >&6; }
20041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20042$as_echo_n "checking Boot JDK version... " >&6; }
20043              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20045$as_echo "$BOOT_JDK_VERSION" >&6; }
20046            fi # end check jdk version
20047          fi # end check rt.jar
20048        fi # end check javac
20049      fi # end check java
20050    fi # end check boot jdk found
20051  fi
20052
20053
20054  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20055
20056  if test "x$BOOT_JDK_FOUND" = xno; then
20057    # Now execute the test
20058
20059  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20060    # First check at user selected default
20061
20062  if test "x$BOOT_JDK_FOUND" = xno; then
20063    # Now execute the test
20064
20065  if test -x /usr/libexec/java_home; then
20066    BOOT_JDK=`/usr/libexec/java_home `
20067    BOOT_JDK_FOUND=maybe
20068    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20069$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20070  fi
20071
20072
20073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20075      # Do we have a bin/java?
20076      if test ! -x "$BOOT_JDK/bin/java"; then
20077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20079        BOOT_JDK_FOUND=no
20080      else
20081        # Do we have a bin/javac?
20082        if test ! -x "$BOOT_JDK/bin/javac"; then
20083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20087          BOOT_JDK_FOUND=no
20088        else
20089          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20090          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20093            BOOT_JDK_FOUND=no
20094          else
20095            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20096            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20097
20098            # Extra M4 quote needed to protect [] in grep expression.
20099            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20100            if test "x$FOUND_CORRECT_VERSION" = x; then
20101              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20103              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20104$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20105              BOOT_JDK_FOUND=no
20106            else
20107              # We're done! :-)
20108              BOOT_JDK_FOUND=yes
20109
20110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20111
20112  # Input might be given as Windows format, start by converting to
20113  # unix format.
20114  path="$BOOT_JDK"
20115  new_path=`$CYGPATH -u "$path"`
20116
20117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20120  # "foo.exe" is OK but "foo" is an error.
20121  #
20122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20123  # It is also a way to make sure we got the proper file name for the real test later on.
20124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20125  if test "x$test_shortpath" = x; then
20126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20129  fi
20130
20131  # Call helper function which possibly converts this using DOS-style short mode.
20132  # If so, the updated path is stored in $new_path.
20133
20134  input_path="$new_path"
20135  # Check if we need to convert this using DOS-style short mode. If the path
20136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20137  # take no chances and rewrite it.
20138  # Note: m4 eats our [], so we need to use [ and ] instead.
20139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20140  if test "x$has_forbidden_chars" != x; then
20141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20145      # Going to short mode and back again did indeed matter. Since short mode is
20146      # case insensitive, let's make it lowercase to improve readability.
20147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20148      # Now convert it back to Unix-stile (cygpath)
20149      input_path=`$CYGPATH -u "$shortmode_path"`
20150      new_path="$input_path"
20151    fi
20152  fi
20153
20154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20155  if test "x$test_cygdrive_prefix" = x; then
20156    # As a simple fix, exclude /usr/bin since it's not a real path.
20157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20159      # a path prefixed by /cygdrive for fixpath to work.
20160      new_path="$CYGWIN_ROOT_PATH$input_path"
20161    fi
20162  fi
20163
20164
20165  if test "x$path" != "x$new_path"; then
20166    BOOT_JDK="$new_path"
20167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20169  fi
20170
20171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20172
20173  path="$BOOT_JDK"
20174  has_colon=`$ECHO $path | $GREP ^.:`
20175  new_path="$path"
20176  if test "x$has_colon" = x; then
20177    # Not in mixed or Windows style, start by that.
20178    new_path=`cmd //c echo $path`
20179  fi
20180
20181
20182  input_path="$new_path"
20183  # Check if we need to convert this using DOS-style short mode. If the path
20184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20185  # take no chances and rewrite it.
20186  # Note: m4 eats our [], so we need to use [ and ] instead.
20187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20188  if test "x$has_forbidden_chars" != x; then
20189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20191  fi
20192
20193
20194  windows_path="$new_path"
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    unix_path=`$CYGPATH -u "$windows_path"`
20197    new_path="$unix_path"
20198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20200    new_path="$unix_path"
20201  fi
20202
20203  if test "x$path" != "x$new_path"; then
20204    BOOT_JDK="$new_path"
20205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20207  fi
20208
20209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20211
20212  else
20213    # We're on a posix platform. Hooray! :)
20214    path="$BOOT_JDK"
20215    has_space=`$ECHO "$path" | $GREP " "`
20216    if test "x$has_space" != x; then
20217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20219      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20220    fi
20221
20222    # Use eval to expand a potential ~
20223    eval path="$path"
20224    if test ! -f "$path" && test ! -d "$path"; then
20225      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20226    fi
20227
20228    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20229  fi
20230
20231              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20232$as_echo_n "checking for Boot JDK... " >&6; }
20233              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20234$as_echo "$BOOT_JDK" >&6; }
20235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20236$as_echo_n "checking Boot JDK version... " >&6; }
20237              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20238              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20239$as_echo "$BOOT_JDK_VERSION" >&6; }
20240            fi # end check jdk version
20241          fi # end check rt.jar
20242        fi # end check javac
20243      fi # end check java
20244    fi # end check boot jdk found
20245  fi
20246
20247    # If that did not work out (e.g. too old), try explicit versions instead
20248
20249  if test "x$BOOT_JDK_FOUND" = xno; then
20250    # Now execute the test
20251
20252  if test -x /usr/libexec/java_home; then
20253    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20254    BOOT_JDK_FOUND=maybe
20255    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20256$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20257  fi
20258
20259
20260    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20261    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20262      # Do we have a bin/java?
20263      if test ! -x "$BOOT_JDK/bin/java"; then
20264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20266        BOOT_JDK_FOUND=no
20267      else
20268        # Do we have a bin/javac?
20269        if test ! -x "$BOOT_JDK/bin/javac"; then
20270          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20272          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20273$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20274          BOOT_JDK_FOUND=no
20275        else
20276          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20277          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20278            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20280            BOOT_JDK_FOUND=no
20281          else
20282            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20283            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20284
20285            # Extra M4 quote needed to protect [] in grep expression.
20286            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20287            if test "x$FOUND_CORRECT_VERSION" = x; then
20288              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20290              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20291$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20292              BOOT_JDK_FOUND=no
20293            else
20294              # We're done! :-)
20295              BOOT_JDK_FOUND=yes
20296
20297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20298
20299  # Input might be given as Windows format, start by converting to
20300  # unix format.
20301  path="$BOOT_JDK"
20302  new_path=`$CYGPATH -u "$path"`
20303
20304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20307  # "foo.exe" is OK but "foo" is an error.
20308  #
20309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20310  # It is also a way to make sure we got the proper file name for the real test later on.
20311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20312  if test "x$test_shortpath" = x; then
20313    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20315    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20316  fi
20317
20318  # Call helper function which possibly converts this using DOS-style short mode.
20319  # If so, the updated path is stored in $new_path.
20320
20321  input_path="$new_path"
20322  # Check if we need to convert this using DOS-style short mode. If the path
20323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20324  # take no chances and rewrite it.
20325  # Note: m4 eats our [], so we need to use [ and ] instead.
20326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20327  if test "x$has_forbidden_chars" != x; then
20328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20332      # Going to short mode and back again did indeed matter. Since short mode is
20333      # case insensitive, let's make it lowercase to improve readability.
20334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20335      # Now convert it back to Unix-stile (cygpath)
20336      input_path=`$CYGPATH -u "$shortmode_path"`
20337      new_path="$input_path"
20338    fi
20339  fi
20340
20341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20342  if test "x$test_cygdrive_prefix" = x; then
20343    # As a simple fix, exclude /usr/bin since it's not a real path.
20344    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20346      # a path prefixed by /cygdrive for fixpath to work.
20347      new_path="$CYGWIN_ROOT_PATH$input_path"
20348    fi
20349  fi
20350
20351
20352  if test "x$path" != "x$new_path"; then
20353    BOOT_JDK="$new_path"
20354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20355$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20356  fi
20357
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359
20360  path="$BOOT_JDK"
20361  has_colon=`$ECHO $path | $GREP ^.:`
20362  new_path="$path"
20363  if test "x$has_colon" = x; then
20364    # Not in mixed or Windows style, start by that.
20365    new_path=`cmd //c echo $path`
20366  fi
20367
20368
20369  input_path="$new_path"
20370  # Check if we need to convert this using DOS-style short mode. If the path
20371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20372  # take no chances and rewrite it.
20373  # Note: m4 eats our [], so we need to use [ and ] instead.
20374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20375  if test "x$has_forbidden_chars" != x; then
20376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20378  fi
20379
20380
20381  windows_path="$new_path"
20382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20383    unix_path=`$CYGPATH -u "$windows_path"`
20384    new_path="$unix_path"
20385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20387    new_path="$unix_path"
20388  fi
20389
20390  if test "x$path" != "x$new_path"; then
20391    BOOT_JDK="$new_path"
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20394  fi
20395
20396  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20397  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20398
20399  else
20400    # We're on a posix platform. Hooray! :)
20401    path="$BOOT_JDK"
20402    has_space=`$ECHO "$path" | $GREP " "`
20403    if test "x$has_space" != x; then
20404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20406      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20407    fi
20408
20409    # Use eval to expand a potential ~
20410    eval path="$path"
20411    if test ! -f "$path" && test ! -d "$path"; then
20412      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20413    fi
20414
20415    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20416  fi
20417
20418              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20419$as_echo_n "checking for Boot JDK... " >&6; }
20420              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20421$as_echo "$BOOT_JDK" >&6; }
20422              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20423$as_echo_n "checking Boot JDK version... " >&6; }
20424              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20425              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20426$as_echo "$BOOT_JDK_VERSION" >&6; }
20427            fi # end check jdk version
20428          fi # end check rt.jar
20429        fi # end check javac
20430      fi # end check java
20431    fi # end check boot jdk found
20432  fi
20433
20434
20435  if test "x$BOOT_JDK_FOUND" = xno; then
20436    # Now execute the test
20437
20438  if test -x /usr/libexec/java_home; then
20439    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20440    BOOT_JDK_FOUND=maybe
20441    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20442$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20443  fi
20444
20445
20446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20448      # Do we have a bin/java?
20449      if test ! -x "$BOOT_JDK/bin/java"; then
20450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20452        BOOT_JDK_FOUND=no
20453      else
20454        # Do we have a bin/javac?
20455        if test ! -x "$BOOT_JDK/bin/javac"; then
20456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20460          BOOT_JDK_FOUND=no
20461        else
20462          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20463          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20464            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20466            BOOT_JDK_FOUND=no
20467          else
20468            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20470
20471            # Extra M4 quote needed to protect [] in grep expression.
20472            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20473            if test "x$FOUND_CORRECT_VERSION" = x; then
20474              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20476              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20477$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20478              BOOT_JDK_FOUND=no
20479            else
20480              # We're done! :-)
20481              BOOT_JDK_FOUND=yes
20482
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484
20485  # Input might be given as Windows format, start by converting to
20486  # unix format.
20487  path="$BOOT_JDK"
20488  new_path=`$CYGPATH -u "$path"`
20489
20490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20493  # "foo.exe" is OK but "foo" is an error.
20494  #
20495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20496  # It is also a way to make sure we got the proper file name for the real test later on.
20497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20498  if test "x$test_shortpath" = x; then
20499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20502  fi
20503
20504  # Call helper function which possibly converts this using DOS-style short mode.
20505  # If so, the updated path is stored in $new_path.
20506
20507  input_path="$new_path"
20508  # Check if we need to convert this using DOS-style short mode. If the path
20509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20510  # take no chances and rewrite it.
20511  # Note: m4 eats our [], so we need to use [ and ] instead.
20512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20513  if test "x$has_forbidden_chars" != x; then
20514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20518      # Going to short mode and back again did indeed matter. Since short mode is
20519      # case insensitive, let's make it lowercase to improve readability.
20520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20521      # Now convert it back to Unix-stile (cygpath)
20522      input_path=`$CYGPATH -u "$shortmode_path"`
20523      new_path="$input_path"
20524    fi
20525  fi
20526
20527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20528  if test "x$test_cygdrive_prefix" = x; then
20529    # As a simple fix, exclude /usr/bin since it's not a real path.
20530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20532      # a path prefixed by /cygdrive for fixpath to work.
20533      new_path="$CYGWIN_ROOT_PATH$input_path"
20534    fi
20535  fi
20536
20537
20538  if test "x$path" != "x$new_path"; then
20539    BOOT_JDK="$new_path"
20540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20542  fi
20543
20544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20545
20546  path="$BOOT_JDK"
20547  has_colon=`$ECHO $path | $GREP ^.:`
20548  new_path="$path"
20549  if test "x$has_colon" = x; then
20550    # Not in mixed or Windows style, start by that.
20551    new_path=`cmd //c echo $path`
20552  fi
20553
20554
20555  input_path="$new_path"
20556  # Check if we need to convert this using DOS-style short mode. If the path
20557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20558  # take no chances and rewrite it.
20559  # Note: m4 eats our [], so we need to use [ and ] instead.
20560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20561  if test "x$has_forbidden_chars" != x; then
20562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20564  fi
20565
20566
20567  windows_path="$new_path"
20568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20569    unix_path=`$CYGPATH -u "$windows_path"`
20570    new_path="$unix_path"
20571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20573    new_path="$unix_path"
20574  fi
20575
20576  if test "x$path" != "x$new_path"; then
20577    BOOT_JDK="$new_path"
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20580  fi
20581
20582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20584
20585  else
20586    # We're on a posix platform. Hooray! :)
20587    path="$BOOT_JDK"
20588    has_space=`$ECHO "$path" | $GREP " "`
20589    if test "x$has_space" != x; then
20590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20593    fi
20594
20595    # Use eval to expand a potential ~
20596    eval path="$path"
20597    if test ! -f "$path" && test ! -d "$path"; then
20598      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20599    fi
20600
20601    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20602  fi
20603
20604              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20605$as_echo_n "checking for Boot JDK... " >&6; }
20606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20607$as_echo "$BOOT_JDK" >&6; }
20608              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20609$as_echo_n "checking Boot JDK version... " >&6; }
20610              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20611              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20612$as_echo "$BOOT_JDK_VERSION" >&6; }
20613            fi # end check jdk version
20614          fi # end check rt.jar
20615        fi # end check javac
20616      fi # end check java
20617    fi # end check boot jdk found
20618  fi
20619
20620
20621  if test "x$BOOT_JDK_FOUND" = xno; then
20622    # Now execute the test
20623
20624  if test -x /usr/libexec/java_home; then
20625    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20626    BOOT_JDK_FOUND=maybe
20627    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20628$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20629  fi
20630
20631
20632    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20633    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20634      # Do we have a bin/java?
20635      if test ! -x "$BOOT_JDK/bin/java"; then
20636        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20638        BOOT_JDK_FOUND=no
20639      else
20640        # Do we have a bin/javac?
20641        if test ! -x "$BOOT_JDK/bin/javac"; then
20642          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20644          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20645$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20646          BOOT_JDK_FOUND=no
20647        else
20648          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20649          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20652            BOOT_JDK_FOUND=no
20653          else
20654            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20656
20657            # Extra M4 quote needed to protect [] in grep expression.
20658            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20659            if test "x$FOUND_CORRECT_VERSION" = x; then
20660              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20662              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20663$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20664              BOOT_JDK_FOUND=no
20665            else
20666              # We're done! :-)
20667              BOOT_JDK_FOUND=yes
20668
20669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20670
20671  # Input might be given as Windows format, start by converting to
20672  # unix format.
20673  path="$BOOT_JDK"
20674  new_path=`$CYGPATH -u "$path"`
20675
20676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20679  # "foo.exe" is OK but "foo" is an error.
20680  #
20681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20682  # It is also a way to make sure we got the proper file name for the real test later on.
20683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20684  if test "x$test_shortpath" = x; then
20685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20688  fi
20689
20690  # Call helper function which possibly converts this using DOS-style short mode.
20691  # If so, the updated path is stored in $new_path.
20692
20693  input_path="$new_path"
20694  # Check if we need to convert this using DOS-style short mode. If the path
20695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20696  # take no chances and rewrite it.
20697  # Note: m4 eats our [], so we need to use [ and ] instead.
20698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20699  if test "x$has_forbidden_chars" != x; then
20700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20704      # Going to short mode and back again did indeed matter. Since short mode is
20705      # case insensitive, let's make it lowercase to improve readability.
20706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707      # Now convert it back to Unix-stile (cygpath)
20708      input_path=`$CYGPATH -u "$shortmode_path"`
20709      new_path="$input_path"
20710    fi
20711  fi
20712
20713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20714  if test "x$test_cygdrive_prefix" = x; then
20715    # As a simple fix, exclude /usr/bin since it's not a real path.
20716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20718      # a path prefixed by /cygdrive for fixpath to work.
20719      new_path="$CYGWIN_ROOT_PATH$input_path"
20720    fi
20721  fi
20722
20723
20724  if test "x$path" != "x$new_path"; then
20725    BOOT_JDK="$new_path"
20726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20728  fi
20729
20730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20731
20732  path="$BOOT_JDK"
20733  has_colon=`$ECHO $path | $GREP ^.:`
20734  new_path="$path"
20735  if test "x$has_colon" = x; then
20736    # Not in mixed or Windows style, start by that.
20737    new_path=`cmd //c echo $path`
20738  fi
20739
20740
20741  input_path="$new_path"
20742  # Check if we need to convert this using DOS-style short mode. If the path
20743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20744  # take no chances and rewrite it.
20745  # Note: m4 eats our [], so we need to use [ and ] instead.
20746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20747  if test "x$has_forbidden_chars" != x; then
20748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20750  fi
20751
20752
20753  windows_path="$new_path"
20754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20755    unix_path=`$CYGPATH -u "$windows_path"`
20756    new_path="$unix_path"
20757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20759    new_path="$unix_path"
20760  fi
20761
20762  if test "x$path" != "x$new_path"; then
20763    BOOT_JDK="$new_path"
20764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20766  fi
20767
20768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20770
20771  else
20772    # We're on a posix platform. Hooray! :)
20773    path="$BOOT_JDK"
20774    has_space=`$ECHO "$path" | $GREP " "`
20775    if test "x$has_space" != x; then
20776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20779    fi
20780
20781    # Use eval to expand a potential ~
20782    eval path="$path"
20783    if test ! -f "$path" && test ! -d "$path"; then
20784      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20785    fi
20786
20787    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20788  fi
20789
20790              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20791$as_echo_n "checking for Boot JDK... " >&6; }
20792              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20793$as_echo "$BOOT_JDK" >&6; }
20794              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20795$as_echo_n "checking Boot JDK version... " >&6; }
20796              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20797              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20798$as_echo "$BOOT_JDK_VERSION" >&6; }
20799            fi # end check jdk version
20800          fi # end check rt.jar
20801        fi # end check javac
20802      fi # end check java
20803    fi # end check boot jdk found
20804  fi
20805
20806  fi
20807
20808
20809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20811      # Do we have a bin/java?
20812      if test ! -x "$BOOT_JDK/bin/java"; then
20813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20815        BOOT_JDK_FOUND=no
20816      else
20817        # Do we have a bin/javac?
20818        if test ! -x "$BOOT_JDK/bin/javac"; then
20819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20823          BOOT_JDK_FOUND=no
20824        else
20825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20829            BOOT_JDK_FOUND=no
20830          else
20831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20833
20834            # Extra M4 quote needed to protect [] in grep expression.
20835            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20836            if test "x$FOUND_CORRECT_VERSION" = x; then
20837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20840$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20841              BOOT_JDK_FOUND=no
20842            else
20843              # We're done! :-)
20844              BOOT_JDK_FOUND=yes
20845
20846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20847
20848  # Input might be given as Windows format, start by converting to
20849  # unix format.
20850  path="$BOOT_JDK"
20851  new_path=`$CYGPATH -u "$path"`
20852
20853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20856  # "foo.exe" is OK but "foo" is an error.
20857  #
20858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20859  # It is also a way to make sure we got the proper file name for the real test later on.
20860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20861  if test "x$test_shortpath" = x; then
20862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20865  fi
20866
20867  # Call helper function which possibly converts this using DOS-style short mode.
20868  # If so, the updated path is stored in $new_path.
20869
20870  input_path="$new_path"
20871  # Check if we need to convert this using DOS-style short mode. If the path
20872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20873  # take no chances and rewrite it.
20874  # Note: m4 eats our [], so we need to use [ and ] instead.
20875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20876  if test "x$has_forbidden_chars" != x; then
20877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20881      # Going to short mode and back again did indeed matter. Since short mode is
20882      # case insensitive, let's make it lowercase to improve readability.
20883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20884      # Now convert it back to Unix-stile (cygpath)
20885      input_path=`$CYGPATH -u "$shortmode_path"`
20886      new_path="$input_path"
20887    fi
20888  fi
20889
20890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20891  if test "x$test_cygdrive_prefix" = x; then
20892    # As a simple fix, exclude /usr/bin since it's not a real path.
20893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20895      # a path prefixed by /cygdrive for fixpath to work.
20896      new_path="$CYGWIN_ROOT_PATH$input_path"
20897    fi
20898  fi
20899
20900
20901  if test "x$path" != "x$new_path"; then
20902    BOOT_JDK="$new_path"
20903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20905  fi
20906
20907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20908
20909  path="$BOOT_JDK"
20910  has_colon=`$ECHO $path | $GREP ^.:`
20911  new_path="$path"
20912  if test "x$has_colon" = x; then
20913    # Not in mixed or Windows style, start by that.
20914    new_path=`cmd //c echo $path`
20915  fi
20916
20917
20918  input_path="$new_path"
20919  # Check if we need to convert this using DOS-style short mode. If the path
20920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20921  # take no chances and rewrite it.
20922  # Note: m4 eats our [], so we need to use [ and ] instead.
20923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20924  if test "x$has_forbidden_chars" != x; then
20925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20927  fi
20928
20929
20930  windows_path="$new_path"
20931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20932    unix_path=`$CYGPATH -u "$windows_path"`
20933    new_path="$unix_path"
20934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20936    new_path="$unix_path"
20937  fi
20938
20939  if test "x$path" != "x$new_path"; then
20940    BOOT_JDK="$new_path"
20941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20943  fi
20944
20945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20947
20948  else
20949    # We're on a posix platform. Hooray! :)
20950    path="$BOOT_JDK"
20951    has_space=`$ECHO "$path" | $GREP " "`
20952    if test "x$has_space" != x; then
20953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20956    fi
20957
20958    # Use eval to expand a potential ~
20959    eval path="$path"
20960    if test ! -f "$path" && test ! -d "$path"; then
20961      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20962    fi
20963
20964    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20965  fi
20966
20967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20968$as_echo_n "checking for Boot JDK... " >&6; }
20969              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20970$as_echo "$BOOT_JDK" >&6; }
20971              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20972$as_echo_n "checking Boot JDK version... " >&6; }
20973              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20974              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20975$as_echo "$BOOT_JDK_VERSION" >&6; }
20976            fi # end check jdk version
20977          fi # end check rt.jar
20978        fi # end check javac
20979      fi # end check java
20980    fi # end check boot jdk found
20981  fi
20982
20983
20984  # Test: Is $JAVA_HOME set?
20985
20986  if test "x$BOOT_JDK_FOUND" = xno; then
20987    # Now execute the test
20988
20989  if test "x$JAVA_HOME" != x; then
20990    JAVA_HOME_PROCESSED="$JAVA_HOME"
20991
20992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20993
20994  # Input might be given as Windows format, start by converting to
20995  # unix format.
20996  path="$JAVA_HOME_PROCESSED"
20997  new_path=`$CYGPATH -u "$path"`
20998
20999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21002  # "foo.exe" is OK but "foo" is an error.
21003  #
21004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21005  # It is also a way to make sure we got the proper file name for the real test later on.
21006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21007  if test "x$test_shortpath" = x; then
21008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21009$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21010    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21011  fi
21012
21013  # Call helper function which possibly converts this using DOS-style short mode.
21014  # If so, the updated path is stored in $new_path.
21015
21016  input_path="$new_path"
21017  # Check if we need to convert this using DOS-style short mode. If the path
21018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21019  # take no chances and rewrite it.
21020  # Note: m4 eats our [], so we need to use [ and ] instead.
21021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21022  if test "x$has_forbidden_chars" != x; then
21023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21027      # Going to short mode and back again did indeed matter. Since short mode is
21028      # case insensitive, let's make it lowercase to improve readability.
21029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21030      # Now convert it back to Unix-stile (cygpath)
21031      input_path=`$CYGPATH -u "$shortmode_path"`
21032      new_path="$input_path"
21033    fi
21034  fi
21035
21036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21037  if test "x$test_cygdrive_prefix" = x; then
21038    # As a simple fix, exclude /usr/bin since it's not a real path.
21039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21041      # a path prefixed by /cygdrive for fixpath to work.
21042      new_path="$CYGWIN_ROOT_PATH$input_path"
21043    fi
21044  fi
21045
21046
21047  if test "x$path" != "x$new_path"; then
21048    JAVA_HOME_PROCESSED="$new_path"
21049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21050$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21051  fi
21052
21053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21054
21055  path="$JAVA_HOME_PROCESSED"
21056  has_colon=`$ECHO $path | $GREP ^.:`
21057  new_path="$path"
21058  if test "x$has_colon" = x; then
21059    # Not in mixed or Windows style, start by that.
21060    new_path=`cmd //c echo $path`
21061  fi
21062
21063
21064  input_path="$new_path"
21065  # Check if we need to convert this using DOS-style short mode. If the path
21066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21067  # take no chances and rewrite it.
21068  # Note: m4 eats our [], so we need to use [ and ] instead.
21069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21070  if test "x$has_forbidden_chars" != x; then
21071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21073  fi
21074
21075
21076  windows_path="$new_path"
21077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21078    unix_path=`$CYGPATH -u "$windows_path"`
21079    new_path="$unix_path"
21080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21082    new_path="$unix_path"
21083  fi
21084
21085  if test "x$path" != "x$new_path"; then
21086    JAVA_HOME_PROCESSED="$new_path"
21087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21088$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21089  fi
21090
21091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21093
21094  else
21095    # We're on a posix platform. Hooray! :)
21096    path="$JAVA_HOME_PROCESSED"
21097    has_space=`$ECHO "$path" | $GREP " "`
21098    if test "x$has_space" != x; then
21099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21100$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21101      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21102    fi
21103
21104    # Use eval to expand a potential ~
21105    eval path="$path"
21106    if test ! -f "$path" && test ! -d "$path"; then
21107      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21108    fi
21109
21110    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21111  fi
21112
21113    if test ! -d "$JAVA_HOME_PROCESSED"; then
21114      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21115$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21116    else
21117      # Aha, the user has set a JAVA_HOME
21118      # let us use that as the Boot JDK.
21119      BOOT_JDK="$JAVA_HOME_PROCESSED"
21120      BOOT_JDK_FOUND=maybe
21121      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21122$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21123    fi
21124  fi
21125
21126
21127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21129      # Do we have a bin/java?
21130      if test ! -x "$BOOT_JDK/bin/java"; then
21131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21133        BOOT_JDK_FOUND=no
21134      else
21135        # Do we have a bin/javac?
21136        if test ! -x "$BOOT_JDK/bin/javac"; then
21137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21141          BOOT_JDK_FOUND=no
21142        else
21143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21147            BOOT_JDK_FOUND=no
21148          else
21149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21151
21152            # Extra M4 quote needed to protect [] in grep expression.
21153            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21154            if test "x$FOUND_CORRECT_VERSION" = x; then
21155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21158$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21159              BOOT_JDK_FOUND=no
21160            else
21161              # We're done! :-)
21162              BOOT_JDK_FOUND=yes
21163
21164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21165
21166  # Input might be given as Windows format, start by converting to
21167  # unix format.
21168  path="$BOOT_JDK"
21169  new_path=`$CYGPATH -u "$path"`
21170
21171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21174  # "foo.exe" is OK but "foo" is an error.
21175  #
21176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21177  # It is also a way to make sure we got the proper file name for the real test later on.
21178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21179  if test "x$test_shortpath" = x; then
21180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21183  fi
21184
21185  # Call helper function which possibly converts this using DOS-style short mode.
21186  # If so, the updated path is stored in $new_path.
21187
21188  input_path="$new_path"
21189  # Check if we need to convert this using DOS-style short mode. If the path
21190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21191  # take no chances and rewrite it.
21192  # Note: m4 eats our [], so we need to use [ and ] instead.
21193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21194  if test "x$has_forbidden_chars" != x; then
21195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21199      # Going to short mode and back again did indeed matter. Since short mode is
21200      # case insensitive, let's make it lowercase to improve readability.
21201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21202      # Now convert it back to Unix-stile (cygpath)
21203      input_path=`$CYGPATH -u "$shortmode_path"`
21204      new_path="$input_path"
21205    fi
21206  fi
21207
21208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21209  if test "x$test_cygdrive_prefix" = x; then
21210    # As a simple fix, exclude /usr/bin since it's not a real path.
21211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21213      # a path prefixed by /cygdrive for fixpath to work.
21214      new_path="$CYGWIN_ROOT_PATH$input_path"
21215    fi
21216  fi
21217
21218
21219  if test "x$path" != "x$new_path"; then
21220    BOOT_JDK="$new_path"
21221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21223  fi
21224
21225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226
21227  path="$BOOT_JDK"
21228  has_colon=`$ECHO $path | $GREP ^.:`
21229  new_path="$path"
21230  if test "x$has_colon" = x; then
21231    # Not in mixed or Windows style, start by that.
21232    new_path=`cmd //c echo $path`
21233  fi
21234
21235
21236  input_path="$new_path"
21237  # Check if we need to convert this using DOS-style short mode. If the path
21238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21239  # take no chances and rewrite it.
21240  # Note: m4 eats our [], so we need to use [ and ] instead.
21241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21242  if test "x$has_forbidden_chars" != x; then
21243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21245  fi
21246
21247
21248  windows_path="$new_path"
21249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21250    unix_path=`$CYGPATH -u "$windows_path"`
21251    new_path="$unix_path"
21252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21254    new_path="$unix_path"
21255  fi
21256
21257  if test "x$path" != "x$new_path"; then
21258    BOOT_JDK="$new_path"
21259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21261  fi
21262
21263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21265
21266  else
21267    # We're on a posix platform. Hooray! :)
21268    path="$BOOT_JDK"
21269    has_space=`$ECHO "$path" | $GREP " "`
21270    if test "x$has_space" != x; then
21271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21273      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21274    fi
21275
21276    # Use eval to expand a potential ~
21277    eval path="$path"
21278    if test ! -f "$path" && test ! -d "$path"; then
21279      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21280    fi
21281
21282    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21283  fi
21284
21285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21286$as_echo_n "checking for Boot JDK... " >&6; }
21287              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21288$as_echo "$BOOT_JDK" >&6; }
21289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21290$as_echo_n "checking Boot JDK version... " >&6; }
21291              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21292              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21293$as_echo "$BOOT_JDK_VERSION" >&6; }
21294            fi # end check jdk version
21295          fi # end check rt.jar
21296        fi # end check javac
21297      fi # end check java
21298    fi # end check boot jdk found
21299  fi
21300
21301
21302  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21303
21304  if test "x$BOOT_JDK_FOUND" = xno; then
21305    # Now execute the test
21306
21307  # Extract the first word of "javac", so it can be a program name with args.
21308set dummy javac; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $JAVAC_CHECK in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21338if test -n "$JAVAC_CHECK"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21340$as_echo "$JAVAC_CHECK" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347  # Extract the first word of "java", so it can be a program name with args.
21348set dummy java; ac_word=$2
21349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21350$as_echo_n "checking for $ac_word... " >&6; }
21351if ${ac_cv_path_JAVA_CHECK+:} false; then :
21352  $as_echo_n "(cached) " >&6
21353else
21354  case $JAVA_CHECK in
21355  [\\/]* | ?:[\\/]*)
21356  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21357  ;;
21358  *)
21359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21360for as_dir in $PATH
21361do
21362  IFS=$as_save_IFS
21363  test -z "$as_dir" && as_dir=.
21364    for ac_exec_ext in '' $ac_executable_extensions; do
21365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21366    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21368    break 2
21369  fi
21370done
21371  done
21372IFS=$as_save_IFS
21373
21374  ;;
21375esac
21376fi
21377JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21378if test -n "$JAVA_CHECK"; then
21379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21380$as_echo "$JAVA_CHECK" >&6; }
21381else
21382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21383$as_echo "no" >&6; }
21384fi
21385
21386
21387  BINARY="$JAVAC_CHECK"
21388  if test "x$JAVAC_CHECK" = x; then
21389    BINARY="$JAVA_CHECK"
21390  fi
21391  if test "x$BINARY" != x; then
21392    # So there is a java(c) binary, it might be part of a JDK.
21393    # Lets find the JDK/JRE directory by following symbolic links.
21394    # Linux/GNU systems often have links from /usr/bin/java to
21395    # /etc/alternatives/java to the real JDK binary.
21396
21397  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21398    # Follow a chain of symbolic links. Use readlink
21399    # where it exists, else fall back to horribly
21400    # complicated shell code.
21401    if test "x$READLINK_TESTED" != yes; then
21402      # On MacOSX there is a readlink tool with a different
21403      # purpose than the GNU readlink tool. Check the found readlink.
21404      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21405      if test "x$ISGNU" = x; then
21406        # A readlink that we do not know how to use.
21407        # Are there other non-GNU readlinks out there?
21408        READLINK_TESTED=yes
21409        READLINK=
21410      fi
21411    fi
21412
21413    if test "x$READLINK" != x; then
21414      BINARY=`$READLINK -f $BINARY`
21415    else
21416      # Save the current directory for restoring afterwards
21417      STARTDIR=$PWD
21418      COUNTER=0
21419      sym_link_dir=`$DIRNAME $BINARY`
21420      sym_link_file=`$BASENAME $BINARY`
21421      cd $sym_link_dir
21422      # Use -P flag to resolve symlinks in directories.
21423      cd `$THEPWDCMD -P`
21424      sym_link_dir=`$THEPWDCMD -P`
21425      # Resolve file symlinks
21426      while test $COUNTER -lt 20; do
21427        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21428        if test "x$ISLINK" == x; then
21429          # This is not a symbolic link! We are done!
21430          break
21431        fi
21432        # Again resolve directory symlinks since the target of the just found
21433        # link could be in a different directory
21434        cd `$DIRNAME $ISLINK`
21435        sym_link_dir=`$THEPWDCMD -P`
21436        sym_link_file=`$BASENAME $ISLINK`
21437        let COUNTER=COUNTER+1
21438      done
21439      cd $STARTDIR
21440      BINARY=$sym_link_dir/$sym_link_file
21441    fi
21442  fi
21443
21444    BOOT_JDK=`dirname "$BINARY"`
21445    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21446    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21447      # Looks like we found ourselves an JDK
21448      BOOT_JDK_FOUND=maybe
21449      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21450$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21451    fi
21452  fi
21453
21454
21455    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21456    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21457      # Do we have a bin/java?
21458      if test ! -x "$BOOT_JDK/bin/java"; then
21459        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21461        BOOT_JDK_FOUND=no
21462      else
21463        # Do we have a bin/javac?
21464        if test ! -x "$BOOT_JDK/bin/javac"; then
21465          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21467          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21468$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21469          BOOT_JDK_FOUND=no
21470        else
21471          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21472          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21473            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21474$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21475            BOOT_JDK_FOUND=no
21476          else
21477            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21478            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21479
21480            # Extra M4 quote needed to protect [] in grep expression.
21481            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21482            if test "x$FOUND_CORRECT_VERSION" = x; then
21483              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21485              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21486$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21487              BOOT_JDK_FOUND=no
21488            else
21489              # We're done! :-)
21490              BOOT_JDK_FOUND=yes
21491
21492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21493
21494  # Input might be given as Windows format, start by converting to
21495  # unix format.
21496  path="$BOOT_JDK"
21497  new_path=`$CYGPATH -u "$path"`
21498
21499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21502  # "foo.exe" is OK but "foo" is an error.
21503  #
21504  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21505  # It is also a way to make sure we got the proper file name for the real test later on.
21506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21507  if test "x$test_shortpath" = x; then
21508    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21509$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21510    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21511  fi
21512
21513  # Call helper function which possibly converts this using DOS-style short mode.
21514  # If so, the updated path is stored in $new_path.
21515
21516  input_path="$new_path"
21517  # Check if we need to convert this using DOS-style short mode. If the path
21518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21519  # take no chances and rewrite it.
21520  # Note: m4 eats our [], so we need to use [ and ] instead.
21521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21522  if test "x$has_forbidden_chars" != x; then
21523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21527      # Going to short mode and back again did indeed matter. Since short mode is
21528      # case insensitive, let's make it lowercase to improve readability.
21529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21530      # Now convert it back to Unix-stile (cygpath)
21531      input_path=`$CYGPATH -u "$shortmode_path"`
21532      new_path="$input_path"
21533    fi
21534  fi
21535
21536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21537  if test "x$test_cygdrive_prefix" = x; then
21538    # As a simple fix, exclude /usr/bin since it's not a real path.
21539    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21541      # a path prefixed by /cygdrive for fixpath to work.
21542      new_path="$CYGWIN_ROOT_PATH$input_path"
21543    fi
21544  fi
21545
21546
21547  if test "x$path" != "x$new_path"; then
21548    BOOT_JDK="$new_path"
21549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21551  fi
21552
21553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21554
21555  path="$BOOT_JDK"
21556  has_colon=`$ECHO $path | $GREP ^.:`
21557  new_path="$path"
21558  if test "x$has_colon" = x; then
21559    # Not in mixed or Windows style, start by that.
21560    new_path=`cmd //c echo $path`
21561  fi
21562
21563
21564  input_path="$new_path"
21565  # Check if we need to convert this using DOS-style short mode. If the path
21566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21567  # take no chances and rewrite it.
21568  # Note: m4 eats our [], so we need to use [ and ] instead.
21569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21570  if test "x$has_forbidden_chars" != x; then
21571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21572    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21573  fi
21574
21575
21576  windows_path="$new_path"
21577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21578    unix_path=`$CYGPATH -u "$windows_path"`
21579    new_path="$unix_path"
21580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21582    new_path="$unix_path"
21583  fi
21584
21585  if test "x$path" != "x$new_path"; then
21586    BOOT_JDK="$new_path"
21587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21588$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21589  fi
21590
21591  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21592  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21593
21594  else
21595    # We're on a posix platform. Hooray! :)
21596    path="$BOOT_JDK"
21597    has_space=`$ECHO "$path" | $GREP " "`
21598    if test "x$has_space" != x; then
21599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21601      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21602    fi
21603
21604    # Use eval to expand a potential ~
21605    eval path="$path"
21606    if test ! -f "$path" && test ! -d "$path"; then
21607      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21608    fi
21609
21610    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21611  fi
21612
21613              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21614$as_echo_n "checking for Boot JDK... " >&6; }
21615              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21616$as_echo "$BOOT_JDK" >&6; }
21617              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21618$as_echo_n "checking Boot JDK version... " >&6; }
21619              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21620              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21621$as_echo "$BOOT_JDK_VERSION" >&6; }
21622            fi # end check jdk version
21623          fi # end check rt.jar
21624        fi # end check javac
21625      fi # end check java
21626    fi # end check boot jdk found
21627  fi
21628
21629
21630  # Test: Is there a JDK installed in default, well-known locations?
21631
21632  if test "x$BOOT_JDK_FOUND" = xno; then
21633    # Now execute the test
21634
21635  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21636
21637  if test "x$BOOT_JDK_FOUND" = xno; then
21638    # Now execute the test
21639
21640  if test "x$ProgramW6432" != x; then
21641    VIRTUAL_DIR="$ProgramW6432/Java"
21642
21643  windows_path="$VIRTUAL_DIR"
21644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21645    unix_path=`$CYGPATH -u "$windows_path"`
21646    VIRTUAL_DIR="$unix_path"
21647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21649    VIRTUAL_DIR="$unix_path"
21650  fi
21651
21652
21653  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21654  BOOT_JDK_SUFFIX=""
21655  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21656  if test "x$ALL_JDKS_FOUND" != x; then
21657    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21658
21659  if test "x$BOOT_JDK_FOUND" = xno; then
21660    # Now execute the test
21661
21662        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21663        if test -d "$BOOT_JDK"; then
21664          BOOT_JDK_FOUND=maybe
21665          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21666$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21667        fi
21668
21669
21670    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21671    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21672      # Do we have a bin/java?
21673      if test ! -x "$BOOT_JDK/bin/java"; then
21674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21676        BOOT_JDK_FOUND=no
21677      else
21678        # Do we have a bin/javac?
21679        if test ! -x "$BOOT_JDK/bin/javac"; then
21680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21682          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21683$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21684          BOOT_JDK_FOUND=no
21685        else
21686          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21687          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21690            BOOT_JDK_FOUND=no
21691          else
21692            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21694
21695            # Extra M4 quote needed to protect [] in grep expression.
21696            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21697            if test "x$FOUND_CORRECT_VERSION" = x; then
21698              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21700              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21701$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21702              BOOT_JDK_FOUND=no
21703            else
21704              # We're done! :-)
21705              BOOT_JDK_FOUND=yes
21706
21707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21708
21709  # Input might be given as Windows format, start by converting to
21710  # unix format.
21711  path="$BOOT_JDK"
21712  new_path=`$CYGPATH -u "$path"`
21713
21714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21717  # "foo.exe" is OK but "foo" is an error.
21718  #
21719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21720  # It is also a way to make sure we got the proper file name for the real test later on.
21721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21722  if test "x$test_shortpath" = x; then
21723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21725    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21726  fi
21727
21728  # Call helper function which possibly converts this using DOS-style short mode.
21729  # If so, the updated path is stored in $new_path.
21730
21731  input_path="$new_path"
21732  # Check if we need to convert this using DOS-style short mode. If the path
21733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21734  # take no chances and rewrite it.
21735  # Note: m4 eats our [], so we need to use [ and ] instead.
21736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21737  if test "x$has_forbidden_chars" != x; then
21738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21742      # Going to short mode and back again did indeed matter. Since short mode is
21743      # case insensitive, let's make it lowercase to improve readability.
21744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21745      # Now convert it back to Unix-stile (cygpath)
21746      input_path=`$CYGPATH -u "$shortmode_path"`
21747      new_path="$input_path"
21748    fi
21749  fi
21750
21751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21752  if test "x$test_cygdrive_prefix" = x; then
21753    # As a simple fix, exclude /usr/bin since it's not a real path.
21754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21756      # a path prefixed by /cygdrive for fixpath to work.
21757      new_path="$CYGWIN_ROOT_PATH$input_path"
21758    fi
21759  fi
21760
21761
21762  if test "x$path" != "x$new_path"; then
21763    BOOT_JDK="$new_path"
21764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21766  fi
21767
21768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21769
21770  path="$BOOT_JDK"
21771  has_colon=`$ECHO $path | $GREP ^.:`
21772  new_path="$path"
21773  if test "x$has_colon" = x; then
21774    # Not in mixed or Windows style, start by that.
21775    new_path=`cmd //c echo $path`
21776  fi
21777
21778
21779  input_path="$new_path"
21780  # Check if we need to convert this using DOS-style short mode. If the path
21781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21782  # take no chances and rewrite it.
21783  # Note: m4 eats our [], so we need to use [ and ] instead.
21784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21785  if test "x$has_forbidden_chars" != x; then
21786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21788  fi
21789
21790
21791  windows_path="$new_path"
21792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21793    unix_path=`$CYGPATH -u "$windows_path"`
21794    new_path="$unix_path"
21795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21797    new_path="$unix_path"
21798  fi
21799
21800  if test "x$path" != "x$new_path"; then
21801    BOOT_JDK="$new_path"
21802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21804  fi
21805
21806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21808
21809  else
21810    # We're on a posix platform. Hooray! :)
21811    path="$BOOT_JDK"
21812    has_space=`$ECHO "$path" | $GREP " "`
21813    if test "x$has_space" != x; then
21814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21816      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21817    fi
21818
21819    # Use eval to expand a potential ~
21820    eval path="$path"
21821    if test ! -f "$path" && test ! -d "$path"; then
21822      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21823    fi
21824
21825    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21826  fi
21827
21828              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21829$as_echo_n "checking for Boot JDK... " >&6; }
21830              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21831$as_echo "$BOOT_JDK" >&6; }
21832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21833$as_echo_n "checking Boot JDK version... " >&6; }
21834              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21835              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21836$as_echo "$BOOT_JDK_VERSION" >&6; }
21837            fi # end check jdk version
21838          fi # end check rt.jar
21839        fi # end check javac
21840      fi # end check java
21841    fi # end check boot jdk found
21842  fi
21843
21844    done
21845  fi
21846
21847  fi
21848
21849
21850    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21851    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21852      # Do we have a bin/java?
21853      if test ! -x "$BOOT_JDK/bin/java"; then
21854        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21856        BOOT_JDK_FOUND=no
21857      else
21858        # Do we have a bin/javac?
21859        if test ! -x "$BOOT_JDK/bin/javac"; then
21860          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21861$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21862          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21863$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21864          BOOT_JDK_FOUND=no
21865        else
21866          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21867          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21868            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21870            BOOT_JDK_FOUND=no
21871          else
21872            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21873            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21874
21875            # Extra M4 quote needed to protect [] in grep expression.
21876            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21877            if test "x$FOUND_CORRECT_VERSION" = x; then
21878              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21880              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21881$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21882              BOOT_JDK_FOUND=no
21883            else
21884              # We're done! :-)
21885              BOOT_JDK_FOUND=yes
21886
21887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21888
21889  # Input might be given as Windows format, start by converting to
21890  # unix format.
21891  path="$BOOT_JDK"
21892  new_path=`$CYGPATH -u "$path"`
21893
21894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21897  # "foo.exe" is OK but "foo" is an error.
21898  #
21899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21900  # It is also a way to make sure we got the proper file name for the real test later on.
21901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21902  if test "x$test_shortpath" = x; then
21903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21904$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21905    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21906  fi
21907
21908  # Call helper function which possibly converts this using DOS-style short mode.
21909  # If so, the updated path is stored in $new_path.
21910
21911  input_path="$new_path"
21912  # Check if we need to convert this using DOS-style short mode. If the path
21913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21914  # take no chances and rewrite it.
21915  # Note: m4 eats our [], so we need to use [ and ] instead.
21916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21917  if test "x$has_forbidden_chars" != x; then
21918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21922      # Going to short mode and back again did indeed matter. Since short mode is
21923      # case insensitive, let's make it lowercase to improve readability.
21924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21925      # Now convert it back to Unix-stile (cygpath)
21926      input_path=`$CYGPATH -u "$shortmode_path"`
21927      new_path="$input_path"
21928    fi
21929  fi
21930
21931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21932  if test "x$test_cygdrive_prefix" = x; then
21933    # As a simple fix, exclude /usr/bin since it's not a real path.
21934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21936      # a path prefixed by /cygdrive for fixpath to work.
21937      new_path="$CYGWIN_ROOT_PATH$input_path"
21938    fi
21939  fi
21940
21941
21942  if test "x$path" != "x$new_path"; then
21943    BOOT_JDK="$new_path"
21944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21946  fi
21947
21948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21949
21950  path="$BOOT_JDK"
21951  has_colon=`$ECHO $path | $GREP ^.:`
21952  new_path="$path"
21953  if test "x$has_colon" = x; then
21954    # Not in mixed or Windows style, start by that.
21955    new_path=`cmd //c echo $path`
21956  fi
21957
21958
21959  input_path="$new_path"
21960  # Check if we need to convert this using DOS-style short mode. If the path
21961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21962  # take no chances and rewrite it.
21963  # Note: m4 eats our [], so we need to use [ and ] instead.
21964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21965  if test "x$has_forbidden_chars" != x; then
21966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21968  fi
21969
21970
21971  windows_path="$new_path"
21972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21973    unix_path=`$CYGPATH -u "$windows_path"`
21974    new_path="$unix_path"
21975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21977    new_path="$unix_path"
21978  fi
21979
21980  if test "x$path" != "x$new_path"; then
21981    BOOT_JDK="$new_path"
21982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21983$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21984  fi
21985
21986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21988
21989  else
21990    # We're on a posix platform. Hooray! :)
21991    path="$BOOT_JDK"
21992    has_space=`$ECHO "$path" | $GREP " "`
21993    if test "x$has_space" != x; then
21994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21995$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21996      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21997    fi
21998
21999    # Use eval to expand a potential ~
22000    eval path="$path"
22001    if test ! -f "$path" && test ! -d "$path"; then
22002      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22003    fi
22004
22005    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22006  fi
22007
22008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22009$as_echo_n "checking for Boot JDK... " >&6; }
22010              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22011$as_echo "$BOOT_JDK" >&6; }
22012              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22013$as_echo_n "checking Boot JDK version... " >&6; }
22014              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22015              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22016$as_echo "$BOOT_JDK_VERSION" >&6; }
22017            fi # end check jdk version
22018          fi # end check rt.jar
22019        fi # end check javac
22020      fi # end check java
22021    fi # end check boot jdk found
22022  fi
22023
22024
22025  if test "x$BOOT_JDK_FOUND" = xno; then
22026    # Now execute the test
22027
22028  if test "x$PROGRAMW6432" != x; then
22029    VIRTUAL_DIR="$PROGRAMW6432/Java"
22030
22031  windows_path="$VIRTUAL_DIR"
22032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22033    unix_path=`$CYGPATH -u "$windows_path"`
22034    VIRTUAL_DIR="$unix_path"
22035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22037    VIRTUAL_DIR="$unix_path"
22038  fi
22039
22040
22041  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22042  BOOT_JDK_SUFFIX=""
22043  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22044  if test "x$ALL_JDKS_FOUND" != x; then
22045    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22046
22047  if test "x$BOOT_JDK_FOUND" = xno; then
22048    # Now execute the test
22049
22050        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22051        if test -d "$BOOT_JDK"; then
22052          BOOT_JDK_FOUND=maybe
22053          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22054$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22055        fi
22056
22057
22058    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22059    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22060      # Do we have a bin/java?
22061      if test ! -x "$BOOT_JDK/bin/java"; then
22062        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22064        BOOT_JDK_FOUND=no
22065      else
22066        # Do we have a bin/javac?
22067        if test ! -x "$BOOT_JDK/bin/javac"; then
22068          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22070          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22071$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22072          BOOT_JDK_FOUND=no
22073        else
22074          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22075          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22076            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22078            BOOT_JDK_FOUND=no
22079          else
22080            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22081            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22082
22083            # Extra M4 quote needed to protect [] in grep expression.
22084            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22085            if test "x$FOUND_CORRECT_VERSION" = x; then
22086              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22088              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22089$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22090              BOOT_JDK_FOUND=no
22091            else
22092              # We're done! :-)
22093              BOOT_JDK_FOUND=yes
22094
22095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22096
22097  # Input might be given as Windows format, start by converting to
22098  # unix format.
22099  path="$BOOT_JDK"
22100  new_path=`$CYGPATH -u "$path"`
22101
22102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22105  # "foo.exe" is OK but "foo" is an error.
22106  #
22107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22108  # It is also a way to make sure we got the proper file name for the real test later on.
22109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22110  if test "x$test_shortpath" = x; then
22111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22114  fi
22115
22116  # Call helper function which possibly converts this using DOS-style short mode.
22117  # If so, the updated path is stored in $new_path.
22118
22119  input_path="$new_path"
22120  # Check if we need to convert this using DOS-style short mode. If the path
22121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22122  # take no chances and rewrite it.
22123  # Note: m4 eats our [], so we need to use [ and ] instead.
22124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22125  if test "x$has_forbidden_chars" != x; then
22126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22130      # Going to short mode and back again did indeed matter. Since short mode is
22131      # case insensitive, let's make it lowercase to improve readability.
22132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22133      # Now convert it back to Unix-stile (cygpath)
22134      input_path=`$CYGPATH -u "$shortmode_path"`
22135      new_path="$input_path"
22136    fi
22137  fi
22138
22139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22140  if test "x$test_cygdrive_prefix" = x; then
22141    # As a simple fix, exclude /usr/bin since it's not a real path.
22142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22144      # a path prefixed by /cygdrive for fixpath to work.
22145      new_path="$CYGWIN_ROOT_PATH$input_path"
22146    fi
22147  fi
22148
22149
22150  if test "x$path" != "x$new_path"; then
22151    BOOT_JDK="$new_path"
22152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22154  fi
22155
22156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22157
22158  path="$BOOT_JDK"
22159  has_colon=`$ECHO $path | $GREP ^.:`
22160  new_path="$path"
22161  if test "x$has_colon" = x; then
22162    # Not in mixed or Windows style, start by that.
22163    new_path=`cmd //c echo $path`
22164  fi
22165
22166
22167  input_path="$new_path"
22168  # Check if we need to convert this using DOS-style short mode. If the path
22169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22170  # take no chances and rewrite it.
22171  # Note: m4 eats our [], so we need to use [ and ] instead.
22172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22173  if test "x$has_forbidden_chars" != x; then
22174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22176  fi
22177
22178
22179  windows_path="$new_path"
22180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22181    unix_path=`$CYGPATH -u "$windows_path"`
22182    new_path="$unix_path"
22183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22185    new_path="$unix_path"
22186  fi
22187
22188  if test "x$path" != "x$new_path"; then
22189    BOOT_JDK="$new_path"
22190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22192  fi
22193
22194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22196
22197  else
22198    # We're on a posix platform. Hooray! :)
22199    path="$BOOT_JDK"
22200    has_space=`$ECHO "$path" | $GREP " "`
22201    if test "x$has_space" != x; then
22202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22204      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22205    fi
22206
22207    # Use eval to expand a potential ~
22208    eval path="$path"
22209    if test ! -f "$path" && test ! -d "$path"; then
22210      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22211    fi
22212
22213    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22214  fi
22215
22216              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22217$as_echo_n "checking for Boot JDK... " >&6; }
22218              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22219$as_echo "$BOOT_JDK" >&6; }
22220              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22221$as_echo_n "checking Boot JDK version... " >&6; }
22222              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22223              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22224$as_echo "$BOOT_JDK_VERSION" >&6; }
22225            fi # end check jdk version
22226          fi # end check rt.jar
22227        fi # end check javac
22228      fi # end check java
22229    fi # end check boot jdk found
22230  fi
22231
22232    done
22233  fi
22234
22235  fi
22236
22237
22238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22240      # Do we have a bin/java?
22241      if test ! -x "$BOOT_JDK/bin/java"; then
22242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22244        BOOT_JDK_FOUND=no
22245      else
22246        # Do we have a bin/javac?
22247        if test ! -x "$BOOT_JDK/bin/javac"; then
22248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22252          BOOT_JDK_FOUND=no
22253        else
22254          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22255          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22256            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22258            BOOT_JDK_FOUND=no
22259          else
22260            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22262
22263            # Extra M4 quote needed to protect [] in grep expression.
22264            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22265            if test "x$FOUND_CORRECT_VERSION" = x; then
22266              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22267$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22268              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22269$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22270              BOOT_JDK_FOUND=no
22271            else
22272              # We're done! :-)
22273              BOOT_JDK_FOUND=yes
22274
22275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22276
22277  # Input might be given as Windows format, start by converting to
22278  # unix format.
22279  path="$BOOT_JDK"
22280  new_path=`$CYGPATH -u "$path"`
22281
22282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22285  # "foo.exe" is OK but "foo" is an error.
22286  #
22287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22288  # It is also a way to make sure we got the proper file name for the real test later on.
22289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22290  if test "x$test_shortpath" = x; then
22291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22293    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22294  fi
22295
22296  # Call helper function which possibly converts this using DOS-style short mode.
22297  # If so, the updated path is stored in $new_path.
22298
22299  input_path="$new_path"
22300  # Check if we need to convert this using DOS-style short mode. If the path
22301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22302  # take no chances and rewrite it.
22303  # Note: m4 eats our [], so we need to use [ and ] instead.
22304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22305  if test "x$has_forbidden_chars" != x; then
22306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22310      # Going to short mode and back again did indeed matter. Since short mode is
22311      # case insensitive, let's make it lowercase to improve readability.
22312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22313      # Now convert it back to Unix-stile (cygpath)
22314      input_path=`$CYGPATH -u "$shortmode_path"`
22315      new_path="$input_path"
22316    fi
22317  fi
22318
22319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22320  if test "x$test_cygdrive_prefix" = x; then
22321    # As a simple fix, exclude /usr/bin since it's not a real path.
22322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22324      # a path prefixed by /cygdrive for fixpath to work.
22325      new_path="$CYGWIN_ROOT_PATH$input_path"
22326    fi
22327  fi
22328
22329
22330  if test "x$path" != "x$new_path"; then
22331    BOOT_JDK="$new_path"
22332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22334  fi
22335
22336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22337
22338  path="$BOOT_JDK"
22339  has_colon=`$ECHO $path | $GREP ^.:`
22340  new_path="$path"
22341  if test "x$has_colon" = x; then
22342    # Not in mixed or Windows style, start by that.
22343    new_path=`cmd //c echo $path`
22344  fi
22345
22346
22347  input_path="$new_path"
22348  # Check if we need to convert this using DOS-style short mode. If the path
22349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22350  # take no chances and rewrite it.
22351  # Note: m4 eats our [], so we need to use [ and ] instead.
22352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22353  if test "x$has_forbidden_chars" != x; then
22354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22356  fi
22357
22358
22359  windows_path="$new_path"
22360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22361    unix_path=`$CYGPATH -u "$windows_path"`
22362    new_path="$unix_path"
22363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22365    new_path="$unix_path"
22366  fi
22367
22368  if test "x$path" != "x$new_path"; then
22369    BOOT_JDK="$new_path"
22370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22371$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22372  fi
22373
22374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22376
22377  else
22378    # We're on a posix platform. Hooray! :)
22379    path="$BOOT_JDK"
22380    has_space=`$ECHO "$path" | $GREP " "`
22381    if test "x$has_space" != x; then
22382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22384      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22385    fi
22386
22387    # Use eval to expand a potential ~
22388    eval path="$path"
22389    if test ! -f "$path" && test ! -d "$path"; then
22390      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22391    fi
22392
22393    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22394  fi
22395
22396              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22397$as_echo_n "checking for Boot JDK... " >&6; }
22398              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22399$as_echo "$BOOT_JDK" >&6; }
22400              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22401$as_echo_n "checking Boot JDK version... " >&6; }
22402              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22404$as_echo "$BOOT_JDK_VERSION" >&6; }
22405            fi # end check jdk version
22406          fi # end check rt.jar
22407        fi # end check javac
22408      fi # end check java
22409    fi # end check boot jdk found
22410  fi
22411
22412
22413  if test "x$BOOT_JDK_FOUND" = xno; then
22414    # Now execute the test
22415
22416  if test "x$PROGRAMFILES" != x; then
22417    VIRTUAL_DIR="$PROGRAMFILES/Java"
22418
22419  windows_path="$VIRTUAL_DIR"
22420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22421    unix_path=`$CYGPATH -u "$windows_path"`
22422    VIRTUAL_DIR="$unix_path"
22423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22425    VIRTUAL_DIR="$unix_path"
22426  fi
22427
22428
22429  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22430  BOOT_JDK_SUFFIX=""
22431  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22432  if test "x$ALL_JDKS_FOUND" != x; then
22433    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22434
22435  if test "x$BOOT_JDK_FOUND" = xno; then
22436    # Now execute the test
22437
22438        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22439        if test -d "$BOOT_JDK"; then
22440          BOOT_JDK_FOUND=maybe
22441          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22442$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22443        fi
22444
22445
22446    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22447    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22448      # Do we have a bin/java?
22449      if test ! -x "$BOOT_JDK/bin/java"; then
22450        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22452        BOOT_JDK_FOUND=no
22453      else
22454        # Do we have a bin/javac?
22455        if test ! -x "$BOOT_JDK/bin/javac"; then
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22457$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22458          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22459$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22460          BOOT_JDK_FOUND=no
22461        else
22462          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22463          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22464            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22466            BOOT_JDK_FOUND=no
22467          else
22468            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22470
22471            # Extra M4 quote needed to protect [] in grep expression.
22472            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22473            if test "x$FOUND_CORRECT_VERSION" = x; then
22474              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22476              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22477$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22478              BOOT_JDK_FOUND=no
22479            else
22480              # We're done! :-)
22481              BOOT_JDK_FOUND=yes
22482
22483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22484
22485  # Input might be given as Windows format, start by converting to
22486  # unix format.
22487  path="$BOOT_JDK"
22488  new_path=`$CYGPATH -u "$path"`
22489
22490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22493  # "foo.exe" is OK but "foo" is an error.
22494  #
22495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22496  # It is also a way to make sure we got the proper file name for the real test later on.
22497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22498  if test "x$test_shortpath" = x; then
22499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22502  fi
22503
22504  # Call helper function which possibly converts this using DOS-style short mode.
22505  # If so, the updated path is stored in $new_path.
22506
22507  input_path="$new_path"
22508  # Check if we need to convert this using DOS-style short mode. If the path
22509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22510  # take no chances and rewrite it.
22511  # Note: m4 eats our [], so we need to use [ and ] instead.
22512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22513  if test "x$has_forbidden_chars" != x; then
22514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22518      # Going to short mode and back again did indeed matter. Since short mode is
22519      # case insensitive, let's make it lowercase to improve readability.
22520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22521      # Now convert it back to Unix-stile (cygpath)
22522      input_path=`$CYGPATH -u "$shortmode_path"`
22523      new_path="$input_path"
22524    fi
22525  fi
22526
22527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22528  if test "x$test_cygdrive_prefix" = x; then
22529    # As a simple fix, exclude /usr/bin since it's not a real path.
22530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22532      # a path prefixed by /cygdrive for fixpath to work.
22533      new_path="$CYGWIN_ROOT_PATH$input_path"
22534    fi
22535  fi
22536
22537
22538  if test "x$path" != "x$new_path"; then
22539    BOOT_JDK="$new_path"
22540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22542  fi
22543
22544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22545
22546  path="$BOOT_JDK"
22547  has_colon=`$ECHO $path | $GREP ^.:`
22548  new_path="$path"
22549  if test "x$has_colon" = x; then
22550    # Not in mixed or Windows style, start by that.
22551    new_path=`cmd //c echo $path`
22552  fi
22553
22554
22555  input_path="$new_path"
22556  # Check if we need to convert this using DOS-style short mode. If the path
22557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22558  # take no chances and rewrite it.
22559  # Note: m4 eats our [], so we need to use [ and ] instead.
22560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22561  if test "x$has_forbidden_chars" != x; then
22562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22564  fi
22565
22566
22567  windows_path="$new_path"
22568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22569    unix_path=`$CYGPATH -u "$windows_path"`
22570    new_path="$unix_path"
22571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22573    new_path="$unix_path"
22574  fi
22575
22576  if test "x$path" != "x$new_path"; then
22577    BOOT_JDK="$new_path"
22578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22580  fi
22581
22582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22584
22585  else
22586    # We're on a posix platform. Hooray! :)
22587    path="$BOOT_JDK"
22588    has_space=`$ECHO "$path" | $GREP " "`
22589    if test "x$has_space" != x; then
22590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22593    fi
22594
22595    # Use eval to expand a potential ~
22596    eval path="$path"
22597    if test ! -f "$path" && test ! -d "$path"; then
22598      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22599    fi
22600
22601    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22602  fi
22603
22604              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22605$as_echo_n "checking for Boot JDK... " >&6; }
22606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22607$as_echo "$BOOT_JDK" >&6; }
22608              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22609$as_echo_n "checking Boot JDK version... " >&6; }
22610              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22611              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22612$as_echo "$BOOT_JDK_VERSION" >&6; }
22613            fi # end check jdk version
22614          fi # end check rt.jar
22615        fi # end check javac
22616      fi # end check java
22617    fi # end check boot jdk found
22618  fi
22619
22620    done
22621  fi
22622
22623  fi
22624
22625
22626    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22627    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22628      # Do we have a bin/java?
22629      if test ! -x "$BOOT_JDK/bin/java"; then
22630        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22632        BOOT_JDK_FOUND=no
22633      else
22634        # Do we have a bin/javac?
22635        if test ! -x "$BOOT_JDK/bin/javac"; then
22636          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22638          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22639$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22640          BOOT_JDK_FOUND=no
22641        else
22642          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22643          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22646            BOOT_JDK_FOUND=no
22647          else
22648            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22649            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22650
22651            # Extra M4 quote needed to protect [] in grep expression.
22652            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22653            if test "x$FOUND_CORRECT_VERSION" = x; then
22654              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22656              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22657$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22658              BOOT_JDK_FOUND=no
22659            else
22660              # We're done! :-)
22661              BOOT_JDK_FOUND=yes
22662
22663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22664
22665  # Input might be given as Windows format, start by converting to
22666  # unix format.
22667  path="$BOOT_JDK"
22668  new_path=`$CYGPATH -u "$path"`
22669
22670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22673  # "foo.exe" is OK but "foo" is an error.
22674  #
22675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22676  # It is also a way to make sure we got the proper file name for the real test later on.
22677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22678  if test "x$test_shortpath" = x; then
22679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22681    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22682  fi
22683
22684  # Call helper function which possibly converts this using DOS-style short mode.
22685  # If so, the updated path is stored in $new_path.
22686
22687  input_path="$new_path"
22688  # Check if we need to convert this using DOS-style short mode. If the path
22689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22690  # take no chances and rewrite it.
22691  # Note: m4 eats our [], so we need to use [ and ] instead.
22692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22693  if test "x$has_forbidden_chars" != x; then
22694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22698      # Going to short mode and back again did indeed matter. Since short mode is
22699      # case insensitive, let's make it lowercase to improve readability.
22700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22701      # Now convert it back to Unix-stile (cygpath)
22702      input_path=`$CYGPATH -u "$shortmode_path"`
22703      new_path="$input_path"
22704    fi
22705  fi
22706
22707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22708  if test "x$test_cygdrive_prefix" = x; then
22709    # As a simple fix, exclude /usr/bin since it's not a real path.
22710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22712      # a path prefixed by /cygdrive for fixpath to work.
22713      new_path="$CYGWIN_ROOT_PATH$input_path"
22714    fi
22715  fi
22716
22717
22718  if test "x$path" != "x$new_path"; then
22719    BOOT_JDK="$new_path"
22720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22722  fi
22723
22724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22725
22726  path="$BOOT_JDK"
22727  has_colon=`$ECHO $path | $GREP ^.:`
22728  new_path="$path"
22729  if test "x$has_colon" = x; then
22730    # Not in mixed or Windows style, start by that.
22731    new_path=`cmd //c echo $path`
22732  fi
22733
22734
22735  input_path="$new_path"
22736  # Check if we need to convert this using DOS-style short mode. If the path
22737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22738  # take no chances and rewrite it.
22739  # Note: m4 eats our [], so we need to use [ and ] instead.
22740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22741  if test "x$has_forbidden_chars" != x; then
22742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22744  fi
22745
22746
22747  windows_path="$new_path"
22748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22749    unix_path=`$CYGPATH -u "$windows_path"`
22750    new_path="$unix_path"
22751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22753    new_path="$unix_path"
22754  fi
22755
22756  if test "x$path" != "x$new_path"; then
22757    BOOT_JDK="$new_path"
22758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22760  fi
22761
22762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22764
22765  else
22766    # We're on a posix platform. Hooray! :)
22767    path="$BOOT_JDK"
22768    has_space=`$ECHO "$path" | $GREP " "`
22769    if test "x$has_space" != x; then
22770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22771$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22772      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22773    fi
22774
22775    # Use eval to expand a potential ~
22776    eval path="$path"
22777    if test ! -f "$path" && test ! -d "$path"; then
22778      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22779    fi
22780
22781    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22782  fi
22783
22784              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22785$as_echo_n "checking for Boot JDK... " >&6; }
22786              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22787$as_echo "$BOOT_JDK" >&6; }
22788              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22789$as_echo_n "checking Boot JDK version... " >&6; }
22790              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22791              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22792$as_echo "$BOOT_JDK_VERSION" >&6; }
22793            fi # end check jdk version
22794          fi # end check rt.jar
22795        fi # end check javac
22796      fi # end check java
22797    fi # end check boot jdk found
22798  fi
22799
22800
22801  if test "x$BOOT_JDK_FOUND" = xno; then
22802    # Now execute the test
22803
22804  if test "x$ProgramFiles" != x; then
22805    VIRTUAL_DIR="$ProgramFiles/Java"
22806
22807  windows_path="$VIRTUAL_DIR"
22808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22809    unix_path=`$CYGPATH -u "$windows_path"`
22810    VIRTUAL_DIR="$unix_path"
22811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22813    VIRTUAL_DIR="$unix_path"
22814  fi
22815
22816
22817  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22818  BOOT_JDK_SUFFIX=""
22819  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22820  if test "x$ALL_JDKS_FOUND" != x; then
22821    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22822
22823  if test "x$BOOT_JDK_FOUND" = xno; then
22824    # Now execute the test
22825
22826        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22827        if test -d "$BOOT_JDK"; then
22828          BOOT_JDK_FOUND=maybe
22829          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22830$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22831        fi
22832
22833
22834    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22835    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22836      # Do we have a bin/java?
22837      if test ! -x "$BOOT_JDK/bin/java"; then
22838        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22840        BOOT_JDK_FOUND=no
22841      else
22842        # Do we have a bin/javac?
22843        if test ! -x "$BOOT_JDK/bin/javac"; then
22844          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22846          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22847$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22848          BOOT_JDK_FOUND=no
22849        else
22850          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22851          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22852            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22853$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22854            BOOT_JDK_FOUND=no
22855          else
22856            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22858
22859            # Extra M4 quote needed to protect [] in grep expression.
22860            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22861            if test "x$FOUND_CORRECT_VERSION" = x; then
22862              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22864              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22865$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22866              BOOT_JDK_FOUND=no
22867            else
22868              # We're done! :-)
22869              BOOT_JDK_FOUND=yes
22870
22871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22872
22873  # Input might be given as Windows format, start by converting to
22874  # unix format.
22875  path="$BOOT_JDK"
22876  new_path=`$CYGPATH -u "$path"`
22877
22878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22881  # "foo.exe" is OK but "foo" is an error.
22882  #
22883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22884  # It is also a way to make sure we got the proper file name for the real test later on.
22885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22886  if test "x$test_shortpath" = x; then
22887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22890  fi
22891
22892  # Call helper function which possibly converts this using DOS-style short mode.
22893  # If so, the updated path is stored in $new_path.
22894
22895  input_path="$new_path"
22896  # Check if we need to convert this using DOS-style short mode. If the path
22897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22898  # take no chances and rewrite it.
22899  # Note: m4 eats our [], so we need to use [ and ] instead.
22900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22901  if test "x$has_forbidden_chars" != x; then
22902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22906      # Going to short mode and back again did indeed matter. Since short mode is
22907      # case insensitive, let's make it lowercase to improve readability.
22908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22909      # Now convert it back to Unix-stile (cygpath)
22910      input_path=`$CYGPATH -u "$shortmode_path"`
22911      new_path="$input_path"
22912    fi
22913  fi
22914
22915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22916  if test "x$test_cygdrive_prefix" = x; then
22917    # As a simple fix, exclude /usr/bin since it's not a real path.
22918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22920      # a path prefixed by /cygdrive for fixpath to work.
22921      new_path="$CYGWIN_ROOT_PATH$input_path"
22922    fi
22923  fi
22924
22925
22926  if test "x$path" != "x$new_path"; then
22927    BOOT_JDK="$new_path"
22928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22930  fi
22931
22932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22933
22934  path="$BOOT_JDK"
22935  has_colon=`$ECHO $path | $GREP ^.:`
22936  new_path="$path"
22937  if test "x$has_colon" = x; then
22938    # Not in mixed or Windows style, start by that.
22939    new_path=`cmd //c echo $path`
22940  fi
22941
22942
22943  input_path="$new_path"
22944  # Check if we need to convert this using DOS-style short mode. If the path
22945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22946  # take no chances and rewrite it.
22947  # Note: m4 eats our [], so we need to use [ and ] instead.
22948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22949  if test "x$has_forbidden_chars" != x; then
22950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22952  fi
22953
22954
22955  windows_path="$new_path"
22956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22957    unix_path=`$CYGPATH -u "$windows_path"`
22958    new_path="$unix_path"
22959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22961    new_path="$unix_path"
22962  fi
22963
22964  if test "x$path" != "x$new_path"; then
22965    BOOT_JDK="$new_path"
22966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22968  fi
22969
22970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22972
22973  else
22974    # We're on a posix platform. Hooray! :)
22975    path="$BOOT_JDK"
22976    has_space=`$ECHO "$path" | $GREP " "`
22977    if test "x$has_space" != x; then
22978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22980      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22981    fi
22982
22983    # Use eval to expand a potential ~
22984    eval path="$path"
22985    if test ! -f "$path" && test ! -d "$path"; then
22986      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22987    fi
22988
22989    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22990  fi
22991
22992              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22993$as_echo_n "checking for Boot JDK... " >&6; }
22994              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22995$as_echo "$BOOT_JDK" >&6; }
22996              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22997$as_echo_n "checking Boot JDK version... " >&6; }
22998              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22999              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23000$as_echo "$BOOT_JDK_VERSION" >&6; }
23001            fi # end check jdk version
23002          fi # end check rt.jar
23003        fi # end check javac
23004      fi # end check java
23005    fi # end check boot jdk found
23006  fi
23007
23008    done
23009  fi
23010
23011  fi
23012
23013
23014    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23015    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23016      # Do we have a bin/java?
23017      if test ! -x "$BOOT_JDK/bin/java"; then
23018        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23020        BOOT_JDK_FOUND=no
23021      else
23022        # Do we have a bin/javac?
23023        if test ! -x "$BOOT_JDK/bin/javac"; then
23024          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23026          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23027$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23028          BOOT_JDK_FOUND=no
23029        else
23030          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23031          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23032            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23034            BOOT_JDK_FOUND=no
23035          else
23036            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23038
23039            # Extra M4 quote needed to protect [] in grep expression.
23040            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23041            if test "x$FOUND_CORRECT_VERSION" = x; then
23042              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23044              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23045$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23046              BOOT_JDK_FOUND=no
23047            else
23048              # We're done! :-)
23049              BOOT_JDK_FOUND=yes
23050
23051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23052
23053  # Input might be given as Windows format, start by converting to
23054  # unix format.
23055  path="$BOOT_JDK"
23056  new_path=`$CYGPATH -u "$path"`
23057
23058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23061  # "foo.exe" is OK but "foo" is an error.
23062  #
23063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23064  # It is also a way to make sure we got the proper file name for the real test later on.
23065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23066  if test "x$test_shortpath" = x; then
23067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23069    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23070  fi
23071
23072  # Call helper function which possibly converts this using DOS-style short mode.
23073  # If so, the updated path is stored in $new_path.
23074
23075  input_path="$new_path"
23076  # Check if we need to convert this using DOS-style short mode. If the path
23077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23078  # take no chances and rewrite it.
23079  # Note: m4 eats our [], so we need to use [ and ] instead.
23080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23081  if test "x$has_forbidden_chars" != x; then
23082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23086      # Going to short mode and back again did indeed matter. Since short mode is
23087      # case insensitive, let's make it lowercase to improve readability.
23088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23089      # Now convert it back to Unix-stile (cygpath)
23090      input_path=`$CYGPATH -u "$shortmode_path"`
23091      new_path="$input_path"
23092    fi
23093  fi
23094
23095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23096  if test "x$test_cygdrive_prefix" = x; then
23097    # As a simple fix, exclude /usr/bin since it's not a real path.
23098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23100      # a path prefixed by /cygdrive for fixpath to work.
23101      new_path="$CYGWIN_ROOT_PATH$input_path"
23102    fi
23103  fi
23104
23105
23106  if test "x$path" != "x$new_path"; then
23107    BOOT_JDK="$new_path"
23108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23110  fi
23111
23112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23113
23114  path="$BOOT_JDK"
23115  has_colon=`$ECHO $path | $GREP ^.:`
23116  new_path="$path"
23117  if test "x$has_colon" = x; then
23118    # Not in mixed or Windows style, start by that.
23119    new_path=`cmd //c echo $path`
23120  fi
23121
23122
23123  input_path="$new_path"
23124  # Check if we need to convert this using DOS-style short mode. If the path
23125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23126  # take no chances and rewrite it.
23127  # Note: m4 eats our [], so we need to use [ and ] instead.
23128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23129  if test "x$has_forbidden_chars" != x; then
23130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23132  fi
23133
23134
23135  windows_path="$new_path"
23136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23137    unix_path=`$CYGPATH -u "$windows_path"`
23138    new_path="$unix_path"
23139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23141    new_path="$unix_path"
23142  fi
23143
23144  if test "x$path" != "x$new_path"; then
23145    BOOT_JDK="$new_path"
23146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23148  fi
23149
23150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23152
23153  else
23154    # We're on a posix platform. Hooray! :)
23155    path="$BOOT_JDK"
23156    has_space=`$ECHO "$path" | $GREP " "`
23157    if test "x$has_space" != x; then
23158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23160      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23161    fi
23162
23163    # Use eval to expand a potential ~
23164    eval path="$path"
23165    if test ! -f "$path" && test ! -d "$path"; then
23166      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23167    fi
23168
23169    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23170  fi
23171
23172              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23173$as_echo_n "checking for Boot JDK... " >&6; }
23174              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23175$as_echo "$BOOT_JDK" >&6; }
23176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23177$as_echo_n "checking Boot JDK version... " >&6; }
23178              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23179              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23180$as_echo "$BOOT_JDK_VERSION" >&6; }
23181            fi # end check jdk version
23182          fi # end check rt.jar
23183        fi # end check javac
23184      fi # end check java
23185    fi # end check boot jdk found
23186  fi
23187
23188
23189  if test "x$BOOT_JDK_FOUND" = xno; then
23190    # Now execute the test
23191
23192  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23193  BOOT_JDK_SUFFIX=""
23194  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23195  if test "x$ALL_JDKS_FOUND" != x; then
23196    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23197
23198  if test "x$BOOT_JDK_FOUND" = xno; then
23199    # Now execute the test
23200
23201        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23202        if test -d "$BOOT_JDK"; then
23203          BOOT_JDK_FOUND=maybe
23204          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23205$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23206        fi
23207
23208
23209    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23210    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23211      # Do we have a bin/java?
23212      if test ! -x "$BOOT_JDK/bin/java"; then
23213        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23215        BOOT_JDK_FOUND=no
23216      else
23217        # Do we have a bin/javac?
23218        if test ! -x "$BOOT_JDK/bin/javac"; then
23219          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23221          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23222$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23223          BOOT_JDK_FOUND=no
23224        else
23225          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23226          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23227            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23229            BOOT_JDK_FOUND=no
23230          else
23231            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23232            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23233
23234            # Extra M4 quote needed to protect [] in grep expression.
23235            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23236            if test "x$FOUND_CORRECT_VERSION" = x; then
23237              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23239              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23240$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23241              BOOT_JDK_FOUND=no
23242            else
23243              # We're done! :-)
23244              BOOT_JDK_FOUND=yes
23245
23246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23247
23248  # Input might be given as Windows format, start by converting to
23249  # unix format.
23250  path="$BOOT_JDK"
23251  new_path=`$CYGPATH -u "$path"`
23252
23253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23256  # "foo.exe" is OK but "foo" is an error.
23257  #
23258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23259  # It is also a way to make sure we got the proper file name for the real test later on.
23260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23261  if test "x$test_shortpath" = x; then
23262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23264    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23265  fi
23266
23267  # Call helper function which possibly converts this using DOS-style short mode.
23268  # If so, the updated path is stored in $new_path.
23269
23270  input_path="$new_path"
23271  # Check if we need to convert this using DOS-style short mode. If the path
23272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23273  # take no chances and rewrite it.
23274  # Note: m4 eats our [], so we need to use [ and ] instead.
23275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23276  if test "x$has_forbidden_chars" != x; then
23277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23281      # Going to short mode and back again did indeed matter. Since short mode is
23282      # case insensitive, let's make it lowercase to improve readability.
23283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23284      # Now convert it back to Unix-stile (cygpath)
23285      input_path=`$CYGPATH -u "$shortmode_path"`
23286      new_path="$input_path"
23287    fi
23288  fi
23289
23290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23291  if test "x$test_cygdrive_prefix" = x; then
23292    # As a simple fix, exclude /usr/bin since it's not a real path.
23293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23295      # a path prefixed by /cygdrive for fixpath to work.
23296      new_path="$CYGWIN_ROOT_PATH$input_path"
23297    fi
23298  fi
23299
23300
23301  if test "x$path" != "x$new_path"; then
23302    BOOT_JDK="$new_path"
23303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23305  fi
23306
23307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308
23309  path="$BOOT_JDK"
23310  has_colon=`$ECHO $path | $GREP ^.:`
23311  new_path="$path"
23312  if test "x$has_colon" = x; then
23313    # Not in mixed or Windows style, start by that.
23314    new_path=`cmd //c echo $path`
23315  fi
23316
23317
23318  input_path="$new_path"
23319  # Check if we need to convert this using DOS-style short mode. If the path
23320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23321  # take no chances and rewrite it.
23322  # Note: m4 eats our [], so we need to use [ and ] instead.
23323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23324  if test "x$has_forbidden_chars" != x; then
23325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23327  fi
23328
23329
23330  windows_path="$new_path"
23331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23332    unix_path=`$CYGPATH -u "$windows_path"`
23333    new_path="$unix_path"
23334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23336    new_path="$unix_path"
23337  fi
23338
23339  if test "x$path" != "x$new_path"; then
23340    BOOT_JDK="$new_path"
23341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23342$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23343  fi
23344
23345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23347
23348  else
23349    # We're on a posix platform. Hooray! :)
23350    path="$BOOT_JDK"
23351    has_space=`$ECHO "$path" | $GREP " "`
23352    if test "x$has_space" != x; then
23353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23354$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23355      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23356    fi
23357
23358    # Use eval to expand a potential ~
23359    eval path="$path"
23360    if test ! -f "$path" && test ! -d "$path"; then
23361      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23362    fi
23363
23364    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23365  fi
23366
23367              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23368$as_echo_n "checking for Boot JDK... " >&6; }
23369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23370$as_echo "$BOOT_JDK" >&6; }
23371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23372$as_echo_n "checking Boot JDK version... " >&6; }
23373              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23375$as_echo "$BOOT_JDK_VERSION" >&6; }
23376            fi # end check jdk version
23377          fi # end check rt.jar
23378        fi # end check javac
23379      fi # end check java
23380    fi # end check boot jdk found
23381  fi
23382
23383    done
23384  fi
23385
23386
23387    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23388    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23389      # Do we have a bin/java?
23390      if test ! -x "$BOOT_JDK/bin/java"; then
23391        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23393        BOOT_JDK_FOUND=no
23394      else
23395        # Do we have a bin/javac?
23396        if test ! -x "$BOOT_JDK/bin/javac"; then
23397          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23398$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23399          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23400$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23401          BOOT_JDK_FOUND=no
23402        else
23403          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23404          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23405            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23406$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23407            BOOT_JDK_FOUND=no
23408          else
23409            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23410            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23411
23412            # Extra M4 quote needed to protect [] in grep expression.
23413            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23414            if test "x$FOUND_CORRECT_VERSION" = x; then
23415              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23417              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23418$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23419              BOOT_JDK_FOUND=no
23420            else
23421              # We're done! :-)
23422              BOOT_JDK_FOUND=yes
23423
23424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23425
23426  # Input might be given as Windows format, start by converting to
23427  # unix format.
23428  path="$BOOT_JDK"
23429  new_path=`$CYGPATH -u "$path"`
23430
23431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23434  # "foo.exe" is OK but "foo" is an error.
23435  #
23436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23437  # It is also a way to make sure we got the proper file name for the real test later on.
23438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23439  if test "x$test_shortpath" = x; then
23440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23443  fi
23444
23445  # Call helper function which possibly converts this using DOS-style short mode.
23446  # If so, the updated path is stored in $new_path.
23447
23448  input_path="$new_path"
23449  # Check if we need to convert this using DOS-style short mode. If the path
23450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23451  # take no chances and rewrite it.
23452  # Note: m4 eats our [], so we need to use [ and ] instead.
23453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23454  if test "x$has_forbidden_chars" != x; then
23455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23459      # Going to short mode and back again did indeed matter. Since short mode is
23460      # case insensitive, let's make it lowercase to improve readability.
23461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23462      # Now convert it back to Unix-stile (cygpath)
23463      input_path=`$CYGPATH -u "$shortmode_path"`
23464      new_path="$input_path"
23465    fi
23466  fi
23467
23468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23469  if test "x$test_cygdrive_prefix" = x; then
23470    # As a simple fix, exclude /usr/bin since it's not a real path.
23471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23473      # a path prefixed by /cygdrive for fixpath to work.
23474      new_path="$CYGWIN_ROOT_PATH$input_path"
23475    fi
23476  fi
23477
23478
23479  if test "x$path" != "x$new_path"; then
23480    BOOT_JDK="$new_path"
23481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23483  fi
23484
23485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23486
23487  path="$BOOT_JDK"
23488  has_colon=`$ECHO $path | $GREP ^.:`
23489  new_path="$path"
23490  if test "x$has_colon" = x; then
23491    # Not in mixed or Windows style, start by that.
23492    new_path=`cmd //c echo $path`
23493  fi
23494
23495
23496  input_path="$new_path"
23497  # Check if we need to convert this using DOS-style short mode. If the path
23498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23499  # take no chances and rewrite it.
23500  # Note: m4 eats our [], so we need to use [ and ] instead.
23501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23502  if test "x$has_forbidden_chars" != x; then
23503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23505  fi
23506
23507
23508  windows_path="$new_path"
23509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23510    unix_path=`$CYGPATH -u "$windows_path"`
23511    new_path="$unix_path"
23512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23514    new_path="$unix_path"
23515  fi
23516
23517  if test "x$path" != "x$new_path"; then
23518    BOOT_JDK="$new_path"
23519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23521  fi
23522
23523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23525
23526  else
23527    # We're on a posix platform. Hooray! :)
23528    path="$BOOT_JDK"
23529    has_space=`$ECHO "$path" | $GREP " "`
23530    if test "x$has_space" != x; then
23531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23533      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23534    fi
23535
23536    # Use eval to expand a potential ~
23537    eval path="$path"
23538    if test ! -f "$path" && test ! -d "$path"; then
23539      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23540    fi
23541
23542    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23543  fi
23544
23545              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23546$as_echo_n "checking for Boot JDK... " >&6; }
23547              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23548$as_echo "$BOOT_JDK" >&6; }
23549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23550$as_echo_n "checking Boot JDK version... " >&6; }
23551              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23552              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23553$as_echo "$BOOT_JDK_VERSION" >&6; }
23554            fi # end check jdk version
23555          fi # end check rt.jar
23556        fi # end check javac
23557      fi # end check java
23558    fi # end check boot jdk found
23559  fi
23560
23561  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23562
23563  if test "x$BOOT_JDK_FOUND" = xno; then
23564    # Now execute the test
23565
23566  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23567  BOOT_JDK_SUFFIX="/Contents/Home"
23568  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23569  if test "x$ALL_JDKS_FOUND" != x; then
23570    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23571
23572  if test "x$BOOT_JDK_FOUND" = xno; then
23573    # Now execute the test
23574
23575        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23576        if test -d "$BOOT_JDK"; then
23577          BOOT_JDK_FOUND=maybe
23578          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23579$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23580        fi
23581
23582
23583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23585      # Do we have a bin/java?
23586      if test ! -x "$BOOT_JDK/bin/java"; then
23587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23589        BOOT_JDK_FOUND=no
23590      else
23591        # Do we have a bin/javac?
23592        if test ! -x "$BOOT_JDK/bin/javac"; then
23593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23597          BOOT_JDK_FOUND=no
23598        else
23599          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23600          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23603            BOOT_JDK_FOUND=no
23604          else
23605            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23607
23608            # Extra M4 quote needed to protect [] in grep expression.
23609            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23610            if test "x$FOUND_CORRECT_VERSION" = x; then
23611              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23613              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23614$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23615              BOOT_JDK_FOUND=no
23616            else
23617              # We're done! :-)
23618              BOOT_JDK_FOUND=yes
23619
23620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23621
23622  # Input might be given as Windows format, start by converting to
23623  # unix format.
23624  path="$BOOT_JDK"
23625  new_path=`$CYGPATH -u "$path"`
23626
23627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23630  # "foo.exe" is OK but "foo" is an error.
23631  #
23632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23633  # It is also a way to make sure we got the proper file name for the real test later on.
23634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23635  if test "x$test_shortpath" = x; then
23636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23639  fi
23640
23641  # Call helper function which possibly converts this using DOS-style short mode.
23642  # If so, the updated path is stored in $new_path.
23643
23644  input_path="$new_path"
23645  # Check if we need to convert this using DOS-style short mode. If the path
23646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23647  # take no chances and rewrite it.
23648  # Note: m4 eats our [], so we need to use [ and ] instead.
23649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23650  if test "x$has_forbidden_chars" != x; then
23651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23655      # Going to short mode and back again did indeed matter. Since short mode is
23656      # case insensitive, let's make it lowercase to improve readability.
23657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23658      # Now convert it back to Unix-stile (cygpath)
23659      input_path=`$CYGPATH -u "$shortmode_path"`
23660      new_path="$input_path"
23661    fi
23662  fi
23663
23664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23665  if test "x$test_cygdrive_prefix" = x; then
23666    # As a simple fix, exclude /usr/bin since it's not a real path.
23667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23669      # a path prefixed by /cygdrive for fixpath to work.
23670      new_path="$CYGWIN_ROOT_PATH$input_path"
23671    fi
23672  fi
23673
23674
23675  if test "x$path" != "x$new_path"; then
23676    BOOT_JDK="$new_path"
23677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23679  fi
23680
23681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23682
23683  path="$BOOT_JDK"
23684  has_colon=`$ECHO $path | $GREP ^.:`
23685  new_path="$path"
23686  if test "x$has_colon" = x; then
23687    # Not in mixed or Windows style, start by that.
23688    new_path=`cmd //c echo $path`
23689  fi
23690
23691
23692  input_path="$new_path"
23693  # Check if we need to convert this using DOS-style short mode. If the path
23694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23695  # take no chances and rewrite it.
23696  # Note: m4 eats our [], so we need to use [ and ] instead.
23697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23698  if test "x$has_forbidden_chars" != x; then
23699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23701  fi
23702
23703
23704  windows_path="$new_path"
23705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23706    unix_path=`$CYGPATH -u "$windows_path"`
23707    new_path="$unix_path"
23708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23710    new_path="$unix_path"
23711  fi
23712
23713  if test "x$path" != "x$new_path"; then
23714    BOOT_JDK="$new_path"
23715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23717  fi
23718
23719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23721
23722  else
23723    # We're on a posix platform. Hooray! :)
23724    path="$BOOT_JDK"
23725    has_space=`$ECHO "$path" | $GREP " "`
23726    if test "x$has_space" != x; then
23727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23730    fi
23731
23732    # Use eval to expand a potential ~
23733    eval path="$path"
23734    if test ! -f "$path" && test ! -d "$path"; then
23735      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23736    fi
23737
23738    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23739  fi
23740
23741              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23742$as_echo_n "checking for Boot JDK... " >&6; }
23743              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23744$as_echo "$BOOT_JDK" >&6; }
23745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23746$as_echo_n "checking Boot JDK version... " >&6; }
23747              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23749$as_echo "$BOOT_JDK_VERSION" >&6; }
23750            fi # end check jdk version
23751          fi # end check rt.jar
23752        fi # end check javac
23753      fi # end check java
23754    fi # end check boot jdk found
23755  fi
23756
23757    done
23758  fi
23759
23760
23761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23763      # Do we have a bin/java?
23764      if test ! -x "$BOOT_JDK/bin/java"; then
23765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23767        BOOT_JDK_FOUND=no
23768      else
23769        # Do we have a bin/javac?
23770        if test ! -x "$BOOT_JDK/bin/javac"; then
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23775          BOOT_JDK_FOUND=no
23776        else
23777          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23778          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23779            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23781            BOOT_JDK_FOUND=no
23782          else
23783            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23785
23786            # Extra M4 quote needed to protect [] in grep expression.
23787            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23788            if test "x$FOUND_CORRECT_VERSION" = x; then
23789              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23791              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23792$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23793              BOOT_JDK_FOUND=no
23794            else
23795              # We're done! :-)
23796              BOOT_JDK_FOUND=yes
23797
23798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23799
23800  # Input might be given as Windows format, start by converting to
23801  # unix format.
23802  path="$BOOT_JDK"
23803  new_path=`$CYGPATH -u "$path"`
23804
23805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23808  # "foo.exe" is OK but "foo" is an error.
23809  #
23810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23811  # It is also a way to make sure we got the proper file name for the real test later on.
23812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23813  if test "x$test_shortpath" = x; then
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23817  fi
23818
23819  # Call helper function which possibly converts this using DOS-style short mode.
23820  # If so, the updated path is stored in $new_path.
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23833      # Going to short mode and back again did indeed matter. Since short mode is
23834      # case insensitive, let's make it lowercase to improve readability.
23835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23836      # Now convert it back to Unix-stile (cygpath)
23837      input_path=`$CYGPATH -u "$shortmode_path"`
23838      new_path="$input_path"
23839    fi
23840  fi
23841
23842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23843  if test "x$test_cygdrive_prefix" = x; then
23844    # As a simple fix, exclude /usr/bin since it's not a real path.
23845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23847      # a path prefixed by /cygdrive for fixpath to work.
23848      new_path="$CYGWIN_ROOT_PATH$input_path"
23849    fi
23850  fi
23851
23852
23853  if test "x$path" != "x$new_path"; then
23854    BOOT_JDK="$new_path"
23855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23857  fi
23858
23859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23860
23861  path="$BOOT_JDK"
23862  has_colon=`$ECHO $path | $GREP ^.:`
23863  new_path="$path"
23864  if test "x$has_colon" = x; then
23865    # Not in mixed or Windows style, start by that.
23866    new_path=`cmd //c echo $path`
23867  fi
23868
23869
23870  input_path="$new_path"
23871  # Check if we need to convert this using DOS-style short mode. If the path
23872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23873  # take no chances and rewrite it.
23874  # Note: m4 eats our [], so we need to use [ and ] instead.
23875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23876  if test "x$has_forbidden_chars" != x; then
23877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23879  fi
23880
23881
23882  windows_path="$new_path"
23883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23884    unix_path=`$CYGPATH -u "$windows_path"`
23885    new_path="$unix_path"
23886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23888    new_path="$unix_path"
23889  fi
23890
23891  if test "x$path" != "x$new_path"; then
23892    BOOT_JDK="$new_path"
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23895  fi
23896
23897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23899
23900  else
23901    # We're on a posix platform. Hooray! :)
23902    path="$BOOT_JDK"
23903    has_space=`$ECHO "$path" | $GREP " "`
23904    if test "x$has_space" != x; then
23905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23907      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23908    fi
23909
23910    # Use eval to expand a potential ~
23911    eval path="$path"
23912    if test ! -f "$path" && test ! -d "$path"; then
23913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23914    fi
23915
23916    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23917  fi
23918
23919              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23920$as_echo_n "checking for Boot JDK... " >&6; }
23921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23922$as_echo "$BOOT_JDK" >&6; }
23923              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23924$as_echo_n "checking Boot JDK version... " >&6; }
23925              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23926              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23927$as_echo "$BOOT_JDK_VERSION" >&6; }
23928            fi # end check jdk version
23929          fi # end check rt.jar
23930        fi # end check javac
23931      fi # end check java
23932    fi # end check boot jdk found
23933  fi
23934
23935
23936  if test "x$BOOT_JDK_FOUND" = xno; then
23937    # Now execute the test
23938
23939  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23940  BOOT_JDK_SUFFIX="/Contents/Home"
23941  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23942  if test "x$ALL_JDKS_FOUND" != x; then
23943    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23944
23945  if test "x$BOOT_JDK_FOUND" = xno; then
23946    # Now execute the test
23947
23948        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23949        if test -d "$BOOT_JDK"; then
23950          BOOT_JDK_FOUND=maybe
23951          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23952$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23953        fi
23954
23955
23956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23958      # Do we have a bin/java?
23959      if test ! -x "$BOOT_JDK/bin/java"; then
23960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23962        BOOT_JDK_FOUND=no
23963      else
23964        # Do we have a bin/javac?
23965        if test ! -x "$BOOT_JDK/bin/javac"; then
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23970          BOOT_JDK_FOUND=no
23971        else
23972          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23973          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23976            BOOT_JDK_FOUND=no
23977          else
23978            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23980
23981            # Extra M4 quote needed to protect [] in grep expression.
23982            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23983            if test "x$FOUND_CORRECT_VERSION" = x; then
23984              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23986              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23987$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23988              BOOT_JDK_FOUND=no
23989            else
23990              # We're done! :-)
23991              BOOT_JDK_FOUND=yes
23992
23993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23994
23995  # Input might be given as Windows format, start by converting to
23996  # unix format.
23997  path="$BOOT_JDK"
23998  new_path=`$CYGPATH -u "$path"`
23999
24000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24003  # "foo.exe" is OK but "foo" is an error.
24004  #
24005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24006  # It is also a way to make sure we got the proper file name for the real test later on.
24007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24008  if test "x$test_shortpath" = x; then
24009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24012  fi
24013
24014  # Call helper function which possibly converts this using DOS-style short mode.
24015  # If so, the updated path is stored in $new_path.
24016
24017  input_path="$new_path"
24018  # Check if we need to convert this using DOS-style short mode. If the path
24019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24020  # take no chances and rewrite it.
24021  # Note: m4 eats our [], so we need to use [ and ] instead.
24022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24023  if test "x$has_forbidden_chars" != x; then
24024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24028      # Going to short mode and back again did indeed matter. Since short mode is
24029      # case insensitive, let's make it lowercase to improve readability.
24030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24031      # Now convert it back to Unix-stile (cygpath)
24032      input_path=`$CYGPATH -u "$shortmode_path"`
24033      new_path="$input_path"
24034    fi
24035  fi
24036
24037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24038  if test "x$test_cygdrive_prefix" = x; then
24039    # As a simple fix, exclude /usr/bin since it's not a real path.
24040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24042      # a path prefixed by /cygdrive for fixpath to work.
24043      new_path="$CYGWIN_ROOT_PATH$input_path"
24044    fi
24045  fi
24046
24047
24048  if test "x$path" != "x$new_path"; then
24049    BOOT_JDK="$new_path"
24050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24052  fi
24053
24054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24055
24056  path="$BOOT_JDK"
24057  has_colon=`$ECHO $path | $GREP ^.:`
24058  new_path="$path"
24059  if test "x$has_colon" = x; then
24060    # Not in mixed or Windows style, start by that.
24061    new_path=`cmd //c echo $path`
24062  fi
24063
24064
24065  input_path="$new_path"
24066  # Check if we need to convert this using DOS-style short mode. If the path
24067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24068  # take no chances and rewrite it.
24069  # Note: m4 eats our [], so we need to use [ and ] instead.
24070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24071  if test "x$has_forbidden_chars" != x; then
24072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24074  fi
24075
24076
24077  windows_path="$new_path"
24078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24079    unix_path=`$CYGPATH -u "$windows_path"`
24080    new_path="$unix_path"
24081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24083    new_path="$unix_path"
24084  fi
24085
24086  if test "x$path" != "x$new_path"; then
24087    BOOT_JDK="$new_path"
24088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24090  fi
24091
24092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24094
24095  else
24096    # We're on a posix platform. Hooray! :)
24097    path="$BOOT_JDK"
24098    has_space=`$ECHO "$path" | $GREP " "`
24099    if test "x$has_space" != x; then
24100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24103    fi
24104
24105    # Use eval to expand a potential ~
24106    eval path="$path"
24107    if test ! -f "$path" && test ! -d "$path"; then
24108      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24109    fi
24110
24111    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24112  fi
24113
24114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24115$as_echo_n "checking for Boot JDK... " >&6; }
24116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24117$as_echo "$BOOT_JDK" >&6; }
24118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24119$as_echo_n "checking Boot JDK version... " >&6; }
24120              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24122$as_echo "$BOOT_JDK_VERSION" >&6; }
24123            fi # end check jdk version
24124          fi # end check rt.jar
24125        fi # end check javac
24126      fi # end check java
24127    fi # end check boot jdk found
24128  fi
24129
24130    done
24131  fi
24132
24133
24134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24136      # Do we have a bin/java?
24137      if test ! -x "$BOOT_JDK/bin/java"; then
24138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24140        BOOT_JDK_FOUND=no
24141      else
24142        # Do we have a bin/javac?
24143        if test ! -x "$BOOT_JDK/bin/javac"; then
24144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24148          BOOT_JDK_FOUND=no
24149        else
24150          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24151          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24154            BOOT_JDK_FOUND=no
24155          else
24156            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24158
24159            # Extra M4 quote needed to protect [] in grep expression.
24160            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24161            if test "x$FOUND_CORRECT_VERSION" = x; then
24162              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24164              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24165$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24166              BOOT_JDK_FOUND=no
24167            else
24168              # We're done! :-)
24169              BOOT_JDK_FOUND=yes
24170
24171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24172
24173  # Input might be given as Windows format, start by converting to
24174  # unix format.
24175  path="$BOOT_JDK"
24176  new_path=`$CYGPATH -u "$path"`
24177
24178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24181  # "foo.exe" is OK but "foo" is an error.
24182  #
24183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24184  # It is also a way to make sure we got the proper file name for the real test later on.
24185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24186  if test "x$test_shortpath" = x; then
24187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24190  fi
24191
24192  # Call helper function which possibly converts this using DOS-style short mode.
24193  # If so, the updated path is stored in $new_path.
24194
24195  input_path="$new_path"
24196  # Check if we need to convert this using DOS-style short mode. If the path
24197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24198  # take no chances and rewrite it.
24199  # Note: m4 eats our [], so we need to use [ and ] instead.
24200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24201  if test "x$has_forbidden_chars" != x; then
24202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24206      # Going to short mode and back again did indeed matter. Since short mode is
24207      # case insensitive, let's make it lowercase to improve readability.
24208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24209      # Now convert it back to Unix-stile (cygpath)
24210      input_path=`$CYGPATH -u "$shortmode_path"`
24211      new_path="$input_path"
24212    fi
24213  fi
24214
24215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24216  if test "x$test_cygdrive_prefix" = x; then
24217    # As a simple fix, exclude /usr/bin since it's not a real path.
24218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24220      # a path prefixed by /cygdrive for fixpath to work.
24221      new_path="$CYGWIN_ROOT_PATH$input_path"
24222    fi
24223  fi
24224
24225
24226  if test "x$path" != "x$new_path"; then
24227    BOOT_JDK="$new_path"
24228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24230  fi
24231
24232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24233
24234  path="$BOOT_JDK"
24235  has_colon=`$ECHO $path | $GREP ^.:`
24236  new_path="$path"
24237  if test "x$has_colon" = x; then
24238    # Not in mixed or Windows style, start by that.
24239    new_path=`cmd //c echo $path`
24240  fi
24241
24242
24243  input_path="$new_path"
24244  # Check if we need to convert this using DOS-style short mode. If the path
24245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24246  # take no chances and rewrite it.
24247  # Note: m4 eats our [], so we need to use [ and ] instead.
24248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24249  if test "x$has_forbidden_chars" != x; then
24250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24252  fi
24253
24254
24255  windows_path="$new_path"
24256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24257    unix_path=`$CYGPATH -u "$windows_path"`
24258    new_path="$unix_path"
24259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24261    new_path="$unix_path"
24262  fi
24263
24264  if test "x$path" != "x$new_path"; then
24265    BOOT_JDK="$new_path"
24266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24268  fi
24269
24270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24272
24273  else
24274    # We're on a posix platform. Hooray! :)
24275    path="$BOOT_JDK"
24276    has_space=`$ECHO "$path" | $GREP " "`
24277    if test "x$has_space" != x; then
24278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24280      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24281    fi
24282
24283    # Use eval to expand a potential ~
24284    eval path="$path"
24285    if test ! -f "$path" && test ! -d "$path"; then
24286      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24287    fi
24288
24289    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24290  fi
24291
24292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24293$as_echo_n "checking for Boot JDK... " >&6; }
24294              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24295$as_echo "$BOOT_JDK" >&6; }
24296              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24297$as_echo_n "checking Boot JDK version... " >&6; }
24298              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24299              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24300$as_echo "$BOOT_JDK_VERSION" >&6; }
24301            fi # end check jdk version
24302          fi # end check rt.jar
24303        fi # end check javac
24304      fi # end check java
24305    fi # end check boot jdk found
24306  fi
24307
24308  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24309
24310  if test "x$BOOT_JDK_FOUND" = xno; then
24311    # Now execute the test
24312
24313  BOOT_JDK_PREFIX="/usr/lib/jvm"
24314  BOOT_JDK_SUFFIX=""
24315  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24316  if test "x$ALL_JDKS_FOUND" != x; then
24317    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24318
24319  if test "x$BOOT_JDK_FOUND" = xno; then
24320    # Now execute the test
24321
24322        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24323        if test -d "$BOOT_JDK"; then
24324          BOOT_JDK_FOUND=maybe
24325          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24326$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24327        fi
24328
24329
24330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24332      # Do we have a bin/java?
24333      if test ! -x "$BOOT_JDK/bin/java"; then
24334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24336        BOOT_JDK_FOUND=no
24337      else
24338        # Do we have a bin/javac?
24339        if test ! -x "$BOOT_JDK/bin/javac"; then
24340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24344          BOOT_JDK_FOUND=no
24345        else
24346          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24347          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24350            BOOT_JDK_FOUND=no
24351          else
24352            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24354
24355            # Extra M4 quote needed to protect [] in grep expression.
24356            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24357            if test "x$FOUND_CORRECT_VERSION" = x; then
24358              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24360              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24361$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24362              BOOT_JDK_FOUND=no
24363            else
24364              # We're done! :-)
24365              BOOT_JDK_FOUND=yes
24366
24367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24368
24369  # Input might be given as Windows format, start by converting to
24370  # unix format.
24371  path="$BOOT_JDK"
24372  new_path=`$CYGPATH -u "$path"`
24373
24374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24377  # "foo.exe" is OK but "foo" is an error.
24378  #
24379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24380  # It is also a way to make sure we got the proper file name for the real test later on.
24381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24382  if test "x$test_shortpath" = x; then
24383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24386  fi
24387
24388  # Call helper function which possibly converts this using DOS-style short mode.
24389  # If so, the updated path is stored in $new_path.
24390
24391  input_path="$new_path"
24392  # Check if we need to convert this using DOS-style short mode. If the path
24393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24394  # take no chances and rewrite it.
24395  # Note: m4 eats our [], so we need to use [ and ] instead.
24396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24397  if test "x$has_forbidden_chars" != x; then
24398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24402      # Going to short mode and back again did indeed matter. Since short mode is
24403      # case insensitive, let's make it lowercase to improve readability.
24404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24405      # Now convert it back to Unix-stile (cygpath)
24406      input_path=`$CYGPATH -u "$shortmode_path"`
24407      new_path="$input_path"
24408    fi
24409  fi
24410
24411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24412  if test "x$test_cygdrive_prefix" = x; then
24413    # As a simple fix, exclude /usr/bin since it's not a real path.
24414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24416      # a path prefixed by /cygdrive for fixpath to work.
24417      new_path="$CYGWIN_ROOT_PATH$input_path"
24418    fi
24419  fi
24420
24421
24422  if test "x$path" != "x$new_path"; then
24423    BOOT_JDK="$new_path"
24424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24426  fi
24427
24428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24429
24430  path="$BOOT_JDK"
24431  has_colon=`$ECHO $path | $GREP ^.:`
24432  new_path="$path"
24433  if test "x$has_colon" = x; then
24434    # Not in mixed or Windows style, start by that.
24435    new_path=`cmd //c echo $path`
24436  fi
24437
24438
24439  input_path="$new_path"
24440  # Check if we need to convert this using DOS-style short mode. If the path
24441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24442  # take no chances and rewrite it.
24443  # Note: m4 eats our [], so we need to use [ and ] instead.
24444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24445  if test "x$has_forbidden_chars" != x; then
24446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24448  fi
24449
24450
24451  windows_path="$new_path"
24452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24453    unix_path=`$CYGPATH -u "$windows_path"`
24454    new_path="$unix_path"
24455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24457    new_path="$unix_path"
24458  fi
24459
24460  if test "x$path" != "x$new_path"; then
24461    BOOT_JDK="$new_path"
24462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24464  fi
24465
24466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24468
24469  else
24470    # We're on a posix platform. Hooray! :)
24471    path="$BOOT_JDK"
24472    has_space=`$ECHO "$path" | $GREP " "`
24473    if test "x$has_space" != x; then
24474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24477    fi
24478
24479    # Use eval to expand a potential ~
24480    eval path="$path"
24481    if test ! -f "$path" && test ! -d "$path"; then
24482      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24483    fi
24484
24485    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24486  fi
24487
24488              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24489$as_echo_n "checking for Boot JDK... " >&6; }
24490              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24491$as_echo "$BOOT_JDK" >&6; }
24492              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24493$as_echo_n "checking Boot JDK version... " >&6; }
24494              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24495              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24496$as_echo "$BOOT_JDK_VERSION" >&6; }
24497            fi # end check jdk version
24498          fi # end check rt.jar
24499        fi # end check javac
24500      fi # end check java
24501    fi # end check boot jdk found
24502  fi
24503
24504    done
24505  fi
24506
24507
24508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24510      # Do we have a bin/java?
24511      if test ! -x "$BOOT_JDK/bin/java"; then
24512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24514        BOOT_JDK_FOUND=no
24515      else
24516        # Do we have a bin/javac?
24517        if test ! -x "$BOOT_JDK/bin/javac"; then
24518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24522          BOOT_JDK_FOUND=no
24523        else
24524          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24525          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24526            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24528            BOOT_JDK_FOUND=no
24529          else
24530            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24531            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24532
24533            # Extra M4 quote needed to protect [] in grep expression.
24534            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24535            if test "x$FOUND_CORRECT_VERSION" = x; then
24536              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24538              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24539$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24540              BOOT_JDK_FOUND=no
24541            else
24542              # We're done! :-)
24543              BOOT_JDK_FOUND=yes
24544
24545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24546
24547  # Input might be given as Windows format, start by converting to
24548  # unix format.
24549  path="$BOOT_JDK"
24550  new_path=`$CYGPATH -u "$path"`
24551
24552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24555  # "foo.exe" is OK but "foo" is an error.
24556  #
24557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24558  # It is also a way to make sure we got the proper file name for the real test later on.
24559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24560  if test "x$test_shortpath" = x; then
24561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24563    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24564  fi
24565
24566  # Call helper function which possibly converts this using DOS-style short mode.
24567  # If so, the updated path is stored in $new_path.
24568
24569  input_path="$new_path"
24570  # Check if we need to convert this using DOS-style short mode. If the path
24571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24572  # take no chances and rewrite it.
24573  # Note: m4 eats our [], so we need to use [ and ] instead.
24574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24575  if test "x$has_forbidden_chars" != x; then
24576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24580      # Going to short mode and back again did indeed matter. Since short mode is
24581      # case insensitive, let's make it lowercase to improve readability.
24582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24583      # Now convert it back to Unix-stile (cygpath)
24584      input_path=`$CYGPATH -u "$shortmode_path"`
24585      new_path="$input_path"
24586    fi
24587  fi
24588
24589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24590  if test "x$test_cygdrive_prefix" = x; then
24591    # As a simple fix, exclude /usr/bin since it's not a real path.
24592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24594      # a path prefixed by /cygdrive for fixpath to work.
24595      new_path="$CYGWIN_ROOT_PATH$input_path"
24596    fi
24597  fi
24598
24599
24600  if test "x$path" != "x$new_path"; then
24601    BOOT_JDK="$new_path"
24602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24604  fi
24605
24606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24607
24608  path="$BOOT_JDK"
24609  has_colon=`$ECHO $path | $GREP ^.:`
24610  new_path="$path"
24611  if test "x$has_colon" = x; then
24612    # Not in mixed or Windows style, start by that.
24613    new_path=`cmd //c echo $path`
24614  fi
24615
24616
24617  input_path="$new_path"
24618  # Check if we need to convert this using DOS-style short mode. If the path
24619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24620  # take no chances and rewrite it.
24621  # Note: m4 eats our [], so we need to use [ and ] instead.
24622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24623  if test "x$has_forbidden_chars" != x; then
24624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24626  fi
24627
24628
24629  windows_path="$new_path"
24630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24631    unix_path=`$CYGPATH -u "$windows_path"`
24632    new_path="$unix_path"
24633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24635    new_path="$unix_path"
24636  fi
24637
24638  if test "x$path" != "x$new_path"; then
24639    BOOT_JDK="$new_path"
24640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24642  fi
24643
24644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24646
24647  else
24648    # We're on a posix platform. Hooray! :)
24649    path="$BOOT_JDK"
24650    has_space=`$ECHO "$path" | $GREP " "`
24651    if test "x$has_space" != x; then
24652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24655    fi
24656
24657    # Use eval to expand a potential ~
24658    eval path="$path"
24659    if test ! -f "$path" && test ! -d "$path"; then
24660      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24661    fi
24662
24663    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24664  fi
24665
24666              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24667$as_echo_n "checking for Boot JDK... " >&6; }
24668              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24669$as_echo "$BOOT_JDK" >&6; }
24670              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24671$as_echo_n "checking Boot JDK version... " >&6; }
24672              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24673              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24674$as_echo "$BOOT_JDK_VERSION" >&6; }
24675            fi # end check jdk version
24676          fi # end check rt.jar
24677        fi # end check javac
24678      fi # end check java
24679    fi # end check boot jdk found
24680  fi
24681
24682  fi
24683
24684
24685    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24686    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24687      # Do we have a bin/java?
24688      if test ! -x "$BOOT_JDK/bin/java"; then
24689        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24691        BOOT_JDK_FOUND=no
24692      else
24693        # Do we have a bin/javac?
24694        if test ! -x "$BOOT_JDK/bin/javac"; then
24695          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24696$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24697          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24698$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24699          BOOT_JDK_FOUND=no
24700        else
24701          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24702          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24705            BOOT_JDK_FOUND=no
24706          else
24707            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24708            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24709
24710            # Extra M4 quote needed to protect [] in grep expression.
24711            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24712            if test "x$FOUND_CORRECT_VERSION" = x; then
24713              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24715              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24716$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24717              BOOT_JDK_FOUND=no
24718            else
24719              # We're done! :-)
24720              BOOT_JDK_FOUND=yes
24721
24722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24723
24724  # Input might be given as Windows format, start by converting to
24725  # unix format.
24726  path="$BOOT_JDK"
24727  new_path=`$CYGPATH -u "$path"`
24728
24729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24732  # "foo.exe" is OK but "foo" is an error.
24733  #
24734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24735  # It is also a way to make sure we got the proper file name for the real test later on.
24736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24737  if test "x$test_shortpath" = x; then
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24740    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24741  fi
24742
24743  # Call helper function which possibly converts this using DOS-style short mode.
24744  # If so, the updated path is stored in $new_path.
24745
24746  input_path="$new_path"
24747  # Check if we need to convert this using DOS-style short mode. If the path
24748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24749  # take no chances and rewrite it.
24750  # Note: m4 eats our [], so we need to use [ and ] instead.
24751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24752  if test "x$has_forbidden_chars" != x; then
24753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24757      # Going to short mode and back again did indeed matter. Since short mode is
24758      # case insensitive, let's make it lowercase to improve readability.
24759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24760      # Now convert it back to Unix-stile (cygpath)
24761      input_path=`$CYGPATH -u "$shortmode_path"`
24762      new_path="$input_path"
24763    fi
24764  fi
24765
24766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24767  if test "x$test_cygdrive_prefix" = x; then
24768    # As a simple fix, exclude /usr/bin since it's not a real path.
24769    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24771      # a path prefixed by /cygdrive for fixpath to work.
24772      new_path="$CYGWIN_ROOT_PATH$input_path"
24773    fi
24774  fi
24775
24776
24777  if test "x$path" != "x$new_path"; then
24778    BOOT_JDK="$new_path"
24779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24780$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24781  fi
24782
24783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24784
24785  path="$BOOT_JDK"
24786  has_colon=`$ECHO $path | $GREP ^.:`
24787  new_path="$path"
24788  if test "x$has_colon" = x; then
24789    # Not in mixed or Windows style, start by that.
24790    new_path=`cmd //c echo $path`
24791  fi
24792
24793
24794  input_path="$new_path"
24795  # Check if we need to convert this using DOS-style short mode. If the path
24796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24797  # take no chances and rewrite it.
24798  # Note: m4 eats our [], so we need to use [ and ] instead.
24799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24800  if test "x$has_forbidden_chars" != x; then
24801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24803  fi
24804
24805
24806  windows_path="$new_path"
24807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24808    unix_path=`$CYGPATH -u "$windows_path"`
24809    new_path="$unix_path"
24810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24812    new_path="$unix_path"
24813  fi
24814
24815  if test "x$path" != "x$new_path"; then
24816    BOOT_JDK="$new_path"
24817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24818$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24819  fi
24820
24821  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24822  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24823
24824  else
24825    # We're on a posix platform. Hooray! :)
24826    path="$BOOT_JDK"
24827    has_space=`$ECHO "$path" | $GREP " "`
24828    if test "x$has_space" != x; then
24829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24831      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24832    fi
24833
24834    # Use eval to expand a potential ~
24835    eval path="$path"
24836    if test ! -f "$path" && test ! -d "$path"; then
24837      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24838    fi
24839
24840    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24841  fi
24842
24843              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24844$as_echo_n "checking for Boot JDK... " >&6; }
24845              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24846$as_echo "$BOOT_JDK" >&6; }
24847              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24848$as_echo_n "checking Boot JDK version... " >&6; }
24849              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24850              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24851$as_echo "$BOOT_JDK_VERSION" >&6; }
24852            fi # end check jdk version
24853          fi # end check rt.jar
24854        fi # end check javac
24855      fi # end check java
24856    fi # end check boot jdk found
24857  fi
24858
24859
24860  # If we haven't found anything yet, we've truly lost. Give up.
24861  if test "x$BOOT_JDK_FOUND" = xno; then
24862
24863  # Print a helpful message on how to acquire the necessary build dependency.
24864  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24865  MISSING_DEPENDENCY=openjdk
24866
24867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24868    cygwin_help $MISSING_DEPENDENCY
24869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24870    msys_help $MISSING_DEPENDENCY
24871  else
24872    PKGHANDLER_COMMAND=
24873
24874    case $PKGHANDLER in
24875      apt-get)
24876        apt_help     $MISSING_DEPENDENCY ;;
24877      yum)
24878        yum_help     $MISSING_DEPENDENCY ;;
24879      port)
24880        port_help    $MISSING_DEPENDENCY ;;
24881      pkgutil)
24882        pkgutil_help $MISSING_DEPENDENCY ;;
24883      pkgadd)
24884        pkgadd_help  $MISSING_DEPENDENCY ;;
24885    esac
24886
24887    if test "x$PKGHANDLER_COMMAND" != x; then
24888      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24889    fi
24890  fi
24891
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24893$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24894    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24895$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24896    as_fn_error $? "Cannot continue" "$LINENO" 5
24897  fi
24898
24899  # Setup proper paths for what we found
24900  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24901  if test ! -f "$BOOT_RTJAR"; then
24902    # On MacOSX it is called classes.jar
24903    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24904    if test -f "$BOOT_RTJAR"; then
24905      # Remove the ..
24906      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24907    fi
24908  fi
24909  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24910  BOOT_JDK="$BOOT_JDK"
24911
24912
24913
24914
24915  # Setup tools from the Boot JDK.
24916
24917  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
24918
24919  # Publish this variable in the help.
24920
24921
24922  if test "x$JAVA" = x; then
24923    # The variable is not set by user, try to locate tool using the code snippet
24924
24925      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24926$as_echo_n "checking for java in Boot JDK... " >&6; }
24927      JAVA=$BOOT_JDK/bin/java
24928      if test ! -x $JAVA; then
24929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24930$as_echo "not found" >&6; }
24931        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24932$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24933        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24934      fi
24935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24936$as_echo "ok" >&6; }
24937
24938
24939  else
24940    # The variable is set, but is it from the command line or the environment?
24941
24942    # Try to remove the string !JAVA! from our list.
24943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
24944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24945      # If it failed, the variable was not from the command line. Ignore it,
24946      # but warn the user (except for BASH, which is always set by the calling BASH).
24947      if test "xJAVA" != xBASH; then
24948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
24949$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
24950      fi
24951      # Try to locate tool using the code snippet
24952
24953      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24954$as_echo_n "checking for java in Boot JDK... " >&6; }
24955      JAVA=$BOOT_JDK/bin/java
24956      if test ! -x $JAVA; then
24957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24958$as_echo "not found" >&6; }
24959        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24960$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24961        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24962      fi
24963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24964$as_echo "ok" >&6; }
24965
24966
24967    else
24968      # If it succeeded, then it was overridden by the user. We will use it
24969      # for the tool.
24970
24971      # First remove it from the list of overridden variables, so we can test
24972      # for unknown variables in the end.
24973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24974
24975      # Check if the provided tool contains a complete path.
24976      tool_specified="$JAVA"
24977      tool_basename="${tool_specified##*/}"
24978      if test "x$tool_basename" = "x$tool_specified"; then
24979        # A command without a complete path is provided, search $PATH.
24980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
24981$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
24982        # Extract the first word of "$tool_basename", so it can be a program name with args.
24983set dummy $tool_basename; ac_word=$2
24984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24985$as_echo_n "checking for $ac_word... " >&6; }
24986if ${ac_cv_path_JAVA+:} false; then :
24987  $as_echo_n "(cached) " >&6
24988else
24989  case $JAVA in
24990  [\\/]* | ?:[\\/]*)
24991  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
24992  ;;
24993  *)
24994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24995for as_dir in $PATH
24996do
24997  IFS=$as_save_IFS
24998  test -z "$as_dir" && as_dir=.
24999    for ac_exec_ext in '' $ac_executable_extensions; do
25000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25001    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25003    break 2
25004  fi
25005done
25006  done
25007IFS=$as_save_IFS
25008
25009  ;;
25010esac
25011fi
25012JAVA=$ac_cv_path_JAVA
25013if test -n "$JAVA"; then
25014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25015$as_echo "$JAVA" >&6; }
25016else
25017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25018$as_echo "no" >&6; }
25019fi
25020
25021
25022        if test "x$JAVA" = x; then
25023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25024        fi
25025      else
25026        # Otherwise we believe it is a complete path. Use it as it is.
25027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25028$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25030$as_echo_n "checking for JAVA... " >&6; }
25031        if test ! -x "$tool_specified"; then
25032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25033$as_echo "not found" >&6; }
25034          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25035        fi
25036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25037$as_echo "$tool_specified" >&6; }
25038      fi
25039    fi
25040  fi
25041
25042
25043
25044  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25045
25046  # Publish this variable in the help.
25047
25048
25049  if test "x$JAVAC" = x; then
25050    # The variable is not set by user, try to locate tool using the code snippet
25051
25052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25053$as_echo_n "checking for javac in Boot JDK... " >&6; }
25054      JAVAC=$BOOT_JDK/bin/javac
25055      if test ! -x $JAVAC; then
25056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25057$as_echo "not found" >&6; }
25058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25060        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25061      fi
25062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25063$as_echo "ok" >&6; }
25064
25065
25066  else
25067    # The variable is set, but is it from the command line or the environment?
25068
25069    # Try to remove the string !JAVAC! from our list.
25070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25072      # If it failed, the variable was not from the command line. Ignore it,
25073      # but warn the user (except for BASH, which is always set by the calling BASH).
25074      if test "xJAVAC" != xBASH; then
25075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25076$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25077      fi
25078      # Try to locate tool using the code snippet
25079
25080      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25081$as_echo_n "checking for javac in Boot JDK... " >&6; }
25082      JAVAC=$BOOT_JDK/bin/javac
25083      if test ! -x $JAVAC; then
25084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25085$as_echo "not found" >&6; }
25086        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25087$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25088        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25089      fi
25090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25091$as_echo "ok" >&6; }
25092
25093
25094    else
25095      # If it succeeded, then it was overridden by the user. We will use it
25096      # for the tool.
25097
25098      # First remove it from the list of overridden variables, so we can test
25099      # for unknown variables in the end.
25100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25101
25102      # Check if the provided tool contains a complete path.
25103      tool_specified="$JAVAC"
25104      tool_basename="${tool_specified##*/}"
25105      if test "x$tool_basename" = "x$tool_specified"; then
25106        # A command without a complete path is provided, search $PATH.
25107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25108$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25109        # Extract the first word of "$tool_basename", so it can be a program name with args.
25110set dummy $tool_basename; ac_word=$2
25111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25112$as_echo_n "checking for $ac_word... " >&6; }
25113if ${ac_cv_path_JAVAC+:} false; then :
25114  $as_echo_n "(cached) " >&6
25115else
25116  case $JAVAC in
25117  [\\/]* | ?:[\\/]*)
25118  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25119  ;;
25120  *)
25121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25122for as_dir in $PATH
25123do
25124  IFS=$as_save_IFS
25125  test -z "$as_dir" && as_dir=.
25126    for ac_exec_ext in '' $ac_executable_extensions; do
25127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25128    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25130    break 2
25131  fi
25132done
25133  done
25134IFS=$as_save_IFS
25135
25136  ;;
25137esac
25138fi
25139JAVAC=$ac_cv_path_JAVAC
25140if test -n "$JAVAC"; then
25141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25142$as_echo "$JAVAC" >&6; }
25143else
25144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25145$as_echo "no" >&6; }
25146fi
25147
25148
25149        if test "x$JAVAC" = x; then
25150          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25151        fi
25152      else
25153        # Otherwise we believe it is a complete path. Use it as it is.
25154        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25155$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25157$as_echo_n "checking for JAVAC... " >&6; }
25158        if test ! -x "$tool_specified"; then
25159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25160$as_echo "not found" >&6; }
25161          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25162        fi
25163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25164$as_echo "$tool_specified" >&6; }
25165      fi
25166    fi
25167  fi
25168
25169
25170
25171  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25172
25173  # Publish this variable in the help.
25174
25175
25176  if test "x$JAVAH" = x; then
25177    # The variable is not set by user, try to locate tool using the code snippet
25178
25179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25180$as_echo_n "checking for javah in Boot JDK... " >&6; }
25181      JAVAH=$BOOT_JDK/bin/javah
25182      if test ! -x $JAVAH; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25184$as_echo "not found" >&6; }
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25186$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25187        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25188      fi
25189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25190$as_echo "ok" >&6; }
25191
25192
25193  else
25194    # The variable is set, but is it from the command line or the environment?
25195
25196    # Try to remove the string !JAVAH! from our list.
25197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25199      # If it failed, the variable was not from the command line. Ignore it,
25200      # but warn the user (except for BASH, which is always set by the calling BASH).
25201      if test "xJAVAH" != xBASH; then
25202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25203$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25204      fi
25205      # Try to locate tool using the code snippet
25206
25207      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25208$as_echo_n "checking for javah in Boot JDK... " >&6; }
25209      JAVAH=$BOOT_JDK/bin/javah
25210      if test ! -x $JAVAH; then
25211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25212$as_echo "not found" >&6; }
25213        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25214$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25215        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25216      fi
25217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25218$as_echo "ok" >&6; }
25219
25220
25221    else
25222      # If it succeeded, then it was overridden by the user. We will use it
25223      # for the tool.
25224
25225      # First remove it from the list of overridden variables, so we can test
25226      # for unknown variables in the end.
25227      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25228
25229      # Check if the provided tool contains a complete path.
25230      tool_specified="$JAVAH"
25231      tool_basename="${tool_specified##*/}"
25232      if test "x$tool_basename" = "x$tool_specified"; then
25233        # A command without a complete path is provided, search $PATH.
25234        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25235$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25236        # Extract the first word of "$tool_basename", so it can be a program name with args.
25237set dummy $tool_basename; ac_word=$2
25238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25239$as_echo_n "checking for $ac_word... " >&6; }
25240if ${ac_cv_path_JAVAH+:} false; then :
25241  $as_echo_n "(cached) " >&6
25242else
25243  case $JAVAH in
25244  [\\/]* | ?:[\\/]*)
25245  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25246  ;;
25247  *)
25248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25249for as_dir in $PATH
25250do
25251  IFS=$as_save_IFS
25252  test -z "$as_dir" && as_dir=.
25253    for ac_exec_ext in '' $ac_executable_extensions; do
25254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25255    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25257    break 2
25258  fi
25259done
25260  done
25261IFS=$as_save_IFS
25262
25263  ;;
25264esac
25265fi
25266JAVAH=$ac_cv_path_JAVAH
25267if test -n "$JAVAH"; then
25268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25269$as_echo "$JAVAH" >&6; }
25270else
25271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25272$as_echo "no" >&6; }
25273fi
25274
25275
25276        if test "x$JAVAH" = x; then
25277          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25278        fi
25279      else
25280        # Otherwise we believe it is a complete path. Use it as it is.
25281        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25282$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25284$as_echo_n "checking for JAVAH... " >&6; }
25285        if test ! -x "$tool_specified"; then
25286          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25287$as_echo "not found" >&6; }
25288          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25289        fi
25290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25291$as_echo "$tool_specified" >&6; }
25292      fi
25293    fi
25294  fi
25295
25296
25297
25298  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25299
25300  # Publish this variable in the help.
25301
25302
25303  if test "x$JAR" = x; then
25304    # The variable is not set by user, try to locate tool using the code snippet
25305
25306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25307$as_echo_n "checking for jar in Boot JDK... " >&6; }
25308      JAR=$BOOT_JDK/bin/jar
25309      if test ! -x $JAR; then
25310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25311$as_echo "not found" >&6; }
25312        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25313$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25314        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25315      fi
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25317$as_echo "ok" >&6; }
25318
25319
25320  else
25321    # The variable is set, but is it from the command line or the environment?
25322
25323    # Try to remove the string !JAR! from our list.
25324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25326      # If it failed, the variable was not from the command line. Ignore it,
25327      # but warn the user (except for BASH, which is always set by the calling BASH).
25328      if test "xJAR" != xBASH; then
25329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25330$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25331      fi
25332      # Try to locate tool using the code snippet
25333
25334      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25335$as_echo_n "checking for jar in Boot JDK... " >&6; }
25336      JAR=$BOOT_JDK/bin/jar
25337      if test ! -x $JAR; then
25338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25339$as_echo "not found" >&6; }
25340        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25341$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25342        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25343      fi
25344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25345$as_echo "ok" >&6; }
25346
25347
25348    else
25349      # If it succeeded, then it was overridden by the user. We will use it
25350      # for the tool.
25351
25352      # First remove it from the list of overridden variables, so we can test
25353      # for unknown variables in the end.
25354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25355
25356      # Check if the provided tool contains a complete path.
25357      tool_specified="$JAR"
25358      tool_basename="${tool_specified##*/}"
25359      if test "x$tool_basename" = "x$tool_specified"; then
25360        # A command without a complete path is provided, search $PATH.
25361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25362$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25363        # Extract the first word of "$tool_basename", so it can be a program name with args.
25364set dummy $tool_basename; ac_word=$2
25365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25366$as_echo_n "checking for $ac_word... " >&6; }
25367if ${ac_cv_path_JAR+:} false; then :
25368  $as_echo_n "(cached) " >&6
25369else
25370  case $JAR in
25371  [\\/]* | ?:[\\/]*)
25372  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25373  ;;
25374  *)
25375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25376for as_dir in $PATH
25377do
25378  IFS=$as_save_IFS
25379  test -z "$as_dir" && as_dir=.
25380    for ac_exec_ext in '' $ac_executable_extensions; do
25381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25382    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25384    break 2
25385  fi
25386done
25387  done
25388IFS=$as_save_IFS
25389
25390  ;;
25391esac
25392fi
25393JAR=$ac_cv_path_JAR
25394if test -n "$JAR"; then
25395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25396$as_echo "$JAR" >&6; }
25397else
25398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25399$as_echo "no" >&6; }
25400fi
25401
25402
25403        if test "x$JAR" = x; then
25404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25405        fi
25406      else
25407        # Otherwise we believe it is a complete path. Use it as it is.
25408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25409$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25411$as_echo_n "checking for JAR... " >&6; }
25412        if test ! -x "$tool_specified"; then
25413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25414$as_echo "not found" >&6; }
25415          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25416        fi
25417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25418$as_echo "$tool_specified" >&6; }
25419      fi
25420    fi
25421  fi
25422
25423
25424
25425  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25426
25427  # Publish this variable in the help.
25428
25429
25430  if test "x$NATIVE2ASCII" = x; then
25431    # The variable is not set by user, try to locate tool using the code snippet
25432
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25434$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25435      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25436      if test ! -x $NATIVE2ASCII; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25438$as_echo "not found" >&6; }
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25440$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25441        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25442      fi
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25444$as_echo "ok" >&6; }
25445
25446
25447  else
25448    # The variable is set, but is it from the command line or the environment?
25449
25450    # Try to remove the string !NATIVE2ASCII! from our list.
25451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25453      # If it failed, the variable was not from the command line. Ignore it,
25454      # but warn the user (except for BASH, which is always set by the calling BASH).
25455      if test "xNATIVE2ASCII" != xBASH; then
25456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25457$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25458      fi
25459      # Try to locate tool using the code snippet
25460
25461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25462$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25463      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25464      if test ! -x $NATIVE2ASCII; then
25465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25466$as_echo "not found" >&6; }
25467        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25468$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25469        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25470      fi
25471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25472$as_echo "ok" >&6; }
25473
25474
25475    else
25476      # If it succeeded, then it was overridden by the user. We will use it
25477      # for the tool.
25478
25479      # First remove it from the list of overridden variables, so we can test
25480      # for unknown variables in the end.
25481      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25482
25483      # Check if the provided tool contains a complete path.
25484      tool_specified="$NATIVE2ASCII"
25485      tool_basename="${tool_specified##*/}"
25486      if test "x$tool_basename" = "x$tool_specified"; then
25487        # A command without a complete path is provided, search $PATH.
25488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25489$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25490        # Extract the first word of "$tool_basename", so it can be a program name with args.
25491set dummy $tool_basename; ac_word=$2
25492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25493$as_echo_n "checking for $ac_word... " >&6; }
25494if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25495  $as_echo_n "(cached) " >&6
25496else
25497  case $NATIVE2ASCII in
25498  [\\/]* | ?:[\\/]*)
25499  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25500  ;;
25501  *)
25502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25503for as_dir in $PATH
25504do
25505  IFS=$as_save_IFS
25506  test -z "$as_dir" && as_dir=.
25507    for ac_exec_ext in '' $ac_executable_extensions; do
25508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25509    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25511    break 2
25512  fi
25513done
25514  done
25515IFS=$as_save_IFS
25516
25517  ;;
25518esac
25519fi
25520NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25521if test -n "$NATIVE2ASCII"; then
25522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25523$as_echo "$NATIVE2ASCII" >&6; }
25524else
25525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25526$as_echo "no" >&6; }
25527fi
25528
25529
25530        if test "x$NATIVE2ASCII" = x; then
25531          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25532        fi
25533      else
25534        # Otherwise we believe it is a complete path. Use it as it is.
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25536$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25538$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25539        if test ! -x "$tool_specified"; then
25540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25541$as_echo "not found" >&6; }
25542          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25543        fi
25544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25545$as_echo "$tool_specified" >&6; }
25546      fi
25547    fi
25548  fi
25549
25550
25551
25552  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25553
25554  # Publish this variable in the help.
25555
25556
25557  if test "x$JARSIGNER" = x; then
25558    # The variable is not set by user, try to locate tool using the code snippet
25559
25560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25561$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25562      JARSIGNER=$BOOT_JDK/bin/jarsigner
25563      if test ! -x $JARSIGNER; then
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25565$as_echo "not found" >&6; }
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25567$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25568        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25569      fi
25570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25571$as_echo "ok" >&6; }
25572
25573
25574  else
25575    # The variable is set, but is it from the command line or the environment?
25576
25577    # Try to remove the string !JARSIGNER! from our list.
25578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25580      # If it failed, the variable was not from the command line. Ignore it,
25581      # but warn the user (except for BASH, which is always set by the calling BASH).
25582      if test "xJARSIGNER" != xBASH; then
25583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25584$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25585      fi
25586      # Try to locate tool using the code snippet
25587
25588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25589$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25590      JARSIGNER=$BOOT_JDK/bin/jarsigner
25591      if test ! -x $JARSIGNER; then
25592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25593$as_echo "not found" >&6; }
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25595$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25596        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25597      fi
25598      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25599$as_echo "ok" >&6; }
25600
25601
25602    else
25603      # If it succeeded, then it was overridden by the user. We will use it
25604      # for the tool.
25605
25606      # First remove it from the list of overridden variables, so we can test
25607      # for unknown variables in the end.
25608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25609
25610      # Check if the provided tool contains a complete path.
25611      tool_specified="$JARSIGNER"
25612      tool_basename="${tool_specified##*/}"
25613      if test "x$tool_basename" = "x$tool_specified"; then
25614        # A command without a complete path is provided, search $PATH.
25615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25616$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25617        # Extract the first word of "$tool_basename", so it can be a program name with args.
25618set dummy $tool_basename; ac_word=$2
25619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25620$as_echo_n "checking for $ac_word... " >&6; }
25621if ${ac_cv_path_JARSIGNER+:} false; then :
25622  $as_echo_n "(cached) " >&6
25623else
25624  case $JARSIGNER in
25625  [\\/]* | ?:[\\/]*)
25626  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25627  ;;
25628  *)
25629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25630for as_dir in $PATH
25631do
25632  IFS=$as_save_IFS
25633  test -z "$as_dir" && as_dir=.
25634    for ac_exec_ext in '' $ac_executable_extensions; do
25635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25636    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25638    break 2
25639  fi
25640done
25641  done
25642IFS=$as_save_IFS
25643
25644  ;;
25645esac
25646fi
25647JARSIGNER=$ac_cv_path_JARSIGNER
25648if test -n "$JARSIGNER"; then
25649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25650$as_echo "$JARSIGNER" >&6; }
25651else
25652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25653$as_echo "no" >&6; }
25654fi
25655
25656
25657        if test "x$JARSIGNER" = x; then
25658          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25659        fi
25660      else
25661        # Otherwise we believe it is a complete path. Use it as it is.
25662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25663$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25665$as_echo_n "checking for JARSIGNER... " >&6; }
25666        if test ! -x "$tool_specified"; then
25667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25668$as_echo "not found" >&6; }
25669          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25670        fi
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25672$as_echo "$tool_specified" >&6; }
25673      fi
25674    fi
25675  fi
25676
25677
25678
25679  # Finally, set some other options...
25680
25681  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25682  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25683
25684
25685
25686
25687  ##############################################################################
25688  #
25689  # Specify options for anything that is run with the Boot JDK.
25690  #
25691
25692# Check whether --with-boot-jdk-jvmargs was given.
25693if test "${with_boot_jdk_jvmargs+set}" = set; then :
25694  withval=$with_boot_jdk_jvmargs;
25695fi
25696
25697
25698  if test "x$with_boot_jdk_jvmargs" = x; then
25699    # Not all JVM:s accept the same arguments on the command line.
25700    # OpenJDK specific increase in thread stack for JDK build,
25701    # well more specifically, when running javac.
25702    if test "x$BUILD_NUM_BITS" = x32; then
25703      STACK_SIZE=768
25704    else
25705      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25706      # since 64-bit pointers are pushed on the stach. Apparently, we need
25707      # to increase the stack space when javacing the JDK....
25708      STACK_SIZE=1536
25709    fi
25710
25711    # Minimum amount of heap memory.
25712
25713  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25714  $ECHO "Command: $JAVA -Xms64M -version" >&5
25715  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25716  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25717  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25718  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25719    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25720    JVM_ARG_OK=true
25721  else
25722    $ECHO "Arg failed:" >&5
25723    $ECHO "$OUTPUT" >&5
25724    JVM_ARG_OK=false
25725  fi
25726
25727    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25728      # Why does macosx need more heap? Its the huge JDK batch.
25729
25730  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25731  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25732  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25733  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25734  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25735  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25736    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25737    JVM_ARG_OK=true
25738  else
25739    $ECHO "Arg failed:" >&5
25740    $ECHO "$OUTPUT" >&5
25741    JVM_ARG_OK=false
25742  fi
25743
25744    else
25745
25746  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25747  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25748  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25749  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25750  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25751  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25752    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25753    JVM_ARG_OK=true
25754  else
25755    $ECHO "Arg failed:" >&5
25756    $ECHO "$OUTPUT" >&5
25757    JVM_ARG_OK=false
25758  fi
25759
25760    fi
25761    # When is adding -client something that speeds up the JVM?
25762    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25763
25764  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25765  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25766  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25767  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25768  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25769  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25770    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25771    JVM_ARG_OK=true
25772  else
25773    $ECHO "Arg failed:" >&5
25774    $ECHO "$OUTPUT" >&5
25775    JVM_ARG_OK=false
25776  fi
25777
25778    # Disable special log output when a debug build is used as Boot JDK...
25779
25780  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25781  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25782  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25783  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25784  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25785  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25786    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25787    JVM_ARG_OK=true
25788  else
25789    $ECHO "Arg failed:" >&5
25790    $ECHO "$OUTPUT" >&5
25791    JVM_ARG_OK=false
25792  fi
25793
25794  fi
25795
25796  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25797
25798
25799
25800###############################################################################
25801#
25802# Configure the sources to use. We can add or override individual directories.
25803#
25804###############################################################################
25805
25806
25807  # Where are the sources. Any of these can be overridden
25808  # using --with-override-corba and the likes.
25809  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25810  CORBA_TOPDIR="$SRC_ROOT/corba"
25811  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25812  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25813  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25814  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25815  JDK_TOPDIR="$SRC_ROOT/jdk"
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826  ###############################################################################
25827  #
25828  # Pickup additional source for a component from outside of the source root
25829  # or override source for a component.
25830  #
25831
25832# Check whether --with-add-source-root was given.
25833if test "${with_add_source_root+set}" = set; then :
25834  withval=$with_add_source_root;
25835fi
25836
25837
25838
25839# Check whether --with-override-source-root was given.
25840if test "${with_override_source_root+set}" = set; then :
25841  withval=$with_override_source_root;
25842fi
25843
25844
25845
25846# Check whether --with-adds-and-overrides was given.
25847if test "${with_adds_and_overrides+set}" = set; then :
25848  withval=$with_adds_and_overrides;
25849fi
25850
25851
25852  if test "x$with_adds_and_overrides" != x; then
25853    with_add_source_root="$with_adds_and_overrides/adds"
25854    with_override_source_root="$with_adds_and_overrides/overrides"
25855  fi
25856
25857  if test "x$with_add_source_root" != x; then
25858    if ! test -d $with_add_source_root; then
25859      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25860    fi
25861    CURDIR="$PWD"
25862    cd "$with_add_source_root"
25863    ADD_SRC_ROOT="`pwd`"
25864    cd "$CURDIR"
25865    # Verify that the addon source root does not have any root makefiles.
25866    # If it does, then it is usually an error, prevent this.
25867    if test -f $with_add_source_root/langtools/make/Makefile; then
25868      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
25869    fi
25870    if test -f $with_add_source_root/corba/make/Makefile; then
25871      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
25872    fi
25873    if test -f $with_add_source_root/jaxp/make/Makefile; then
25874      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
25875    fi
25876    if test -f $with_add_source_root/jaxws/make/Makefile; then
25877      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
25878    fi
25879    if test -f $with_add_source_root/hotspot/make/Makefile; then
25880      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
25881    fi
25882    if test -f $with_add_source_root/nashorn/make/Makefile; then
25883      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
25884    fi
25885    if test -f $with_add_source_root/jdk/make/Makefile; then
25886      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
25887    fi
25888  fi
25889
25890
25891  if test "x$with_override_source_root" != x; then
25892    if ! test -d $with_override_source_root; then
25893      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25894    fi
25895    CURDIR="$PWD"
25896    cd "$with_override_source_root"
25897    OVERRIDE_SRC_ROOT="`pwd`"
25898    cd "$CURDIR"
25899    if test -f $with_override_source_root/langtools/make/Makefile; then
25900      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
25901    fi
25902    if test -f $with_override_source_root/corba/make/Makefile; then
25903      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
25904    fi
25905    if test -f $with_override_source_root/jaxp/make/Makefile; then
25906      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
25907    fi
25908    if test -f $with_override_source_root/jaxws/make/Makefile; then
25909      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
25910    fi
25911    if test -f $with_override_source_root/hotspot/make/Makefile; then
25912      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
25913    fi
25914    if test -f $with_override_source_root/nashorn/make/Makefile; then
25915      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
25916    fi
25917    if test -f $with_override_source_root/jdk/make/Makefile; then
25918      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
25919    fi
25920  fi
25921
25922
25923  ###############################################################################
25924  #
25925  # Override a repo completely, this is used for example when you have 3 small
25926  # development sandboxes of the langtools sources and want to avoid having 3 full
25927  # OpenJDK sources checked out on disk.
25928  #
25929  # Assuming that the 3 langtools sandboxes are located here:
25930  # /home/fredrik/sandbox1/langtools
25931  # /home/fredrik/sandbox2/langtools
25932  # /home/fredrik/sandbox3/langtools
25933  #
25934  # From the source root you create build subdirs manually:
25935  #     mkdir -p build1 build2 build3
25936  # in each build directory run:
25937  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25938  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25939  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25940  #
25941
25942
25943# Check whether --with-override-langtools was given.
25944if test "${with_override_langtools+set}" = set; then :
25945  withval=$with_override_langtools;
25946fi
25947
25948
25949
25950# Check whether --with-override-corba was given.
25951if test "${with_override_corba+set}" = set; then :
25952  withval=$with_override_corba;
25953fi
25954
25955
25956
25957# Check whether --with-override-jaxp was given.
25958if test "${with_override_jaxp+set}" = set; then :
25959  withval=$with_override_jaxp;
25960fi
25961
25962
25963
25964# Check whether --with-override-jaxws was given.
25965if test "${with_override_jaxws+set}" = set; then :
25966  withval=$with_override_jaxws;
25967fi
25968
25969
25970
25971# Check whether --with-override-hotspot was given.
25972if test "${with_override_hotspot+set}" = set; then :
25973  withval=$with_override_hotspot;
25974fi
25975
25976
25977
25978# Check whether --with-override-nashorn was given.
25979if test "${with_override_nashorn+set}" = set; then :
25980  withval=$with_override_nashorn;
25981fi
25982
25983
25984
25985# Check whether --with-override-jdk was given.
25986if test "${with_override_jdk+set}" = set; then :
25987  withval=$with_override_jdk;
25988fi
25989
25990
25991  if test "x$with_override_langtools" != x; then
25992    CURDIR="$PWD"
25993    cd "$with_override_langtools"
25994    LANGTOOLS_TOPDIR="`pwd`"
25995    cd "$CURDIR"
25996    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25997      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25998    fi
25999    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26000$as_echo_n "checking if langtools should be overridden... " >&6; }
26001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26002$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26003  fi
26004  if test "x$with_override_corba" != x; then
26005    CURDIR="$PWD"
26006    cd "$with_override_corba"
26007    CORBA_TOPDIR="`pwd`"
26008    cd "$CURDIR"
26009    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26010      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26011    fi
26012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26013$as_echo_n "checking if corba should be overridden... " >&6; }
26014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26015$as_echo "yes with $CORBA_TOPDIR" >&6; }
26016  fi
26017  if test "x$with_override_jaxp" != x; then
26018    CURDIR="$PWD"
26019    cd "$with_override_jaxp"
26020    JAXP_TOPDIR="`pwd`"
26021    cd "$CURDIR"
26022    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26023      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26024    fi
26025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26026$as_echo_n "checking if jaxp should be overridden... " >&6; }
26027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26028$as_echo "yes with $JAXP_TOPDIR" >&6; }
26029  fi
26030  if test "x$with_override_jaxws" != x; then
26031    CURDIR="$PWD"
26032    cd "$with_override_jaxws"
26033    JAXWS_TOPDIR="`pwd`"
26034    cd "$CURDIR"
26035    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26036      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26037    fi
26038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26039$as_echo_n "checking if jaxws should be overridden... " >&6; }
26040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26041$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26042  fi
26043  if test "x$with_override_hotspot" != x; then
26044    CURDIR="$PWD"
26045    cd "$with_override_hotspot"
26046    HOTSPOT_TOPDIR="`pwd`"
26047    cd "$CURDIR"
26048    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26049      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26050    fi
26051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26052$as_echo_n "checking if hotspot should be overridden... " >&6; }
26053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26054$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26055  fi
26056  if test "x$with_override_nashorn" != x; then
26057    CURDIR="$PWD"
26058    cd "$with_override_nashorn"
26059    NASHORN_TOPDIR="`pwd`"
26060    cd "$CURDIR"
26061    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26062      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26063    fi
26064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26065$as_echo_n "checking if nashorn should be overridden... " >&6; }
26066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26067$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26068  fi
26069  if test "x$with_override_jdk" != x; then
26070    CURDIR="$PWD"
26071    cd "$with_override_jdk"
26072    JDK_TOPDIR="`pwd`"
26073    cd "$CURDIR"
26074    if ! test -f $JDK_TOPDIR/make/Makefile; then
26075      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26076    fi
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26078$as_echo_n "checking if JDK should be overridden... " >&6; }
26079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26080$as_echo "yes with $JDK_TOPDIR" >&6; }
26081  fi
26082
26083
26084  BUILD_OUTPUT="$OUTPUT_ROOT"
26085
26086
26087  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26088  BUILD_HOTSPOT=true
26089
26090
26091
26092# Check whether --with-import-hotspot was given.
26093if test "${with_import_hotspot+set}" = set; then :
26094  withval=$with_import_hotspot;
26095fi
26096
26097  if test "x$with_import_hotspot" != x; then
26098    CURDIR="$PWD"
26099    cd "$with_import_hotspot"
26100    HOTSPOT_DIST="`pwd`"
26101    cd "$CURDIR"
26102    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26103      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26104    fi
26105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26106$as_echo_n "checking if hotspot should be imported... " >&6; }
26107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26108$as_echo "yes from $HOTSPOT_DIST" >&6; }
26109    BUILD_HOTSPOT=false
26110  fi
26111
26112  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26113
26114
26115###############################################################################
26116#
26117# Setup the toolchain (compilers etc), i.e. the tools that need to be
26118# cross-compilation aware.
26119#
26120###############################################################################
26121
26122
26123  ###############################################################################
26124  #
26125  # Configure the development tool paths and potential sysroot.
26126  #
26127  ac_ext=cpp
26128ac_cpp='$CXXCPP $CPPFLAGS'
26129ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26130ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26131ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26132
26133
26134  # The option used to specify the target .o,.a or .so file.
26135  # When compiling, how to specify the to be created object file.
26136  CC_OUT_OPTION='-o$(SPACE)'
26137  # When linking, how to specify the to be created executable.
26138  EXE_OUT_OPTION='-o$(SPACE)'
26139  # When linking, how to specify the to be created dynamically linkable library.
26140  LD_OUT_OPTION='-o$(SPACE)'
26141  # When archiving, how to specify the to be create static archive for object files.
26142  AR_OUT_OPTION='rcs$(SPACE)'
26143
26144
26145
26146
26147
26148# Locate the actual tools
26149
26150
26151# Check whether --with-jtreg was given.
26152if test "${with_jtreg+set}" = set; then :
26153  withval=$with_jtreg;
26154else
26155  with_jtreg=no
26156fi
26157
26158
26159  if test "x$with_jtreg" = xno; then
26160    # jtreg disabled
26161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26162$as_echo_n "checking for jtreg... " >&6; }
26163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26164$as_echo "no" >&6; }
26165  else
26166    if test "x$with_jtreg" != xyes; then
26167      # with path specified.
26168      JT_HOME="$with_jtreg"
26169    fi
26170
26171    if test "x$JT_HOME" != x; then
26172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26173$as_echo_n "checking for jtreg... " >&6; }
26174
26175      # use JT_HOME enviroment var.
26176
26177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26178
26179  # Input might be given as Windows format, start by converting to
26180  # unix format.
26181  path="$JT_HOME"
26182  new_path=`$CYGPATH -u "$path"`
26183
26184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26187  # "foo.exe" is OK but "foo" is an error.
26188  #
26189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26190  # It is also a way to make sure we got the proper file name for the real test later on.
26191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26192  if test "x$test_shortpath" = x; then
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26194$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26195    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
26196  fi
26197
26198  # Call helper function which possibly converts this using DOS-style short mode.
26199  # If so, the updated path is stored in $new_path.
26200
26201  input_path="$new_path"
26202  # Check if we need to convert this using DOS-style short mode. If the path
26203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26204  # take no chances and rewrite it.
26205  # Note: m4 eats our [], so we need to use [ and ] instead.
26206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26207  if test "x$has_forbidden_chars" != x; then
26208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26212      # Going to short mode and back again did indeed matter. Since short mode is
26213      # case insensitive, let's make it lowercase to improve readability.
26214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26215      # Now convert it back to Unix-stile (cygpath)
26216      input_path=`$CYGPATH -u "$shortmode_path"`
26217      new_path="$input_path"
26218    fi
26219  fi
26220
26221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26222  if test "x$test_cygdrive_prefix" = x; then
26223    # As a simple fix, exclude /usr/bin since it's not a real path.
26224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26226      # a path prefixed by /cygdrive for fixpath to work.
26227      new_path="$CYGWIN_ROOT_PATH$input_path"
26228    fi
26229  fi
26230
26231
26232  if test "x$path" != "x$new_path"; then
26233    JT_HOME="$new_path"
26234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26235$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26236  fi
26237
26238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26239
26240  path="$JT_HOME"
26241  has_colon=`$ECHO $path | $GREP ^.:`
26242  new_path="$path"
26243  if test "x$has_colon" = x; then
26244    # Not in mixed or Windows style, start by that.
26245    new_path=`cmd //c echo $path`
26246  fi
26247
26248
26249  input_path="$new_path"
26250  # Check if we need to convert this using DOS-style short mode. If the path
26251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26252  # take no chances and rewrite it.
26253  # Note: m4 eats our [], so we need to use [ and ] instead.
26254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26255  if test "x$has_forbidden_chars" != x; then
26256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26258  fi
26259
26260
26261  windows_path="$new_path"
26262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26263    unix_path=`$CYGPATH -u "$windows_path"`
26264    new_path="$unix_path"
26265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26267    new_path="$unix_path"
26268  fi
26269
26270  if test "x$path" != "x$new_path"; then
26271    JT_HOME="$new_path"
26272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26273$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26274  fi
26275
26276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26278
26279  else
26280    # We're on a posix platform. Hooray! :)
26281    path="$JT_HOME"
26282    has_space=`$ECHO "$path" | $GREP " "`
26283    if test "x$has_space" != x; then
26284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26285$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26286      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26287    fi
26288
26289    # Use eval to expand a potential ~
26290    eval path="$path"
26291    if test ! -f "$path" && test ! -d "$path"; then
26292      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
26293    fi
26294
26295    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
26296  fi
26297
26298
26299      # jtreg win32 script works for everybody
26300      JTREGEXE="$JT_HOME/win32/bin/jtreg"
26301
26302      if test ! -f "$JTREGEXE"; then
26303        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
26304      fi
26305
26306      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26307$as_echo "$JTREGEXE" >&6; }
26308    else
26309      # try to find jtreg on path
26310
26311
26312
26313  # Publish this variable in the help.
26314
26315
26316  if test "x$JTREGEXE" = x; then
26317    # The variable is not set by user, try to locate tool using the code snippet
26318    for ac_prog in jtreg
26319do
26320  # Extract the first word of "$ac_prog", so it can be a program name with args.
26321set dummy $ac_prog; ac_word=$2
26322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26323$as_echo_n "checking for $ac_word... " >&6; }
26324if ${ac_cv_path_JTREGEXE+:} false; then :
26325  $as_echo_n "(cached) " >&6
26326else
26327  case $JTREGEXE in
26328  [\\/]* | ?:[\\/]*)
26329  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26330  ;;
26331  *)
26332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26333for as_dir in $PATH
26334do
26335  IFS=$as_save_IFS
26336  test -z "$as_dir" && as_dir=.
26337    for ac_exec_ext in '' $ac_executable_extensions; do
26338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26339    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26341    break 2
26342  fi
26343done
26344  done
26345IFS=$as_save_IFS
26346
26347  ;;
26348esac
26349fi
26350JTREGEXE=$ac_cv_path_JTREGEXE
26351if test -n "$JTREGEXE"; then
26352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26353$as_echo "$JTREGEXE" >&6; }
26354else
26355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26356$as_echo "no" >&6; }
26357fi
26358
26359
26360  test -n "$JTREGEXE" && break
26361done
26362
26363  else
26364    # The variable is set, but is it from the command line or the environment?
26365
26366    # Try to remove the string !JTREGEXE! from our list.
26367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
26368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26369      # If it failed, the variable was not from the command line. Ignore it,
26370      # but warn the user (except for BASH, which is always set by the calling BASH).
26371      if test "xJTREGEXE" != xBASH; then
26372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
26373$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
26374      fi
26375      # Try to locate tool using the code snippet
26376      for ac_prog in jtreg
26377do
26378  # Extract the first word of "$ac_prog", so it can be a program name with args.
26379set dummy $ac_prog; ac_word=$2
26380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26381$as_echo_n "checking for $ac_word... " >&6; }
26382if ${ac_cv_path_JTREGEXE+:} false; then :
26383  $as_echo_n "(cached) " >&6
26384else
26385  case $JTREGEXE in
26386  [\\/]* | ?:[\\/]*)
26387  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26388  ;;
26389  *)
26390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26391for as_dir in $PATH
26392do
26393  IFS=$as_save_IFS
26394  test -z "$as_dir" && as_dir=.
26395    for ac_exec_ext in '' $ac_executable_extensions; do
26396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26397    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26399    break 2
26400  fi
26401done
26402  done
26403IFS=$as_save_IFS
26404
26405  ;;
26406esac
26407fi
26408JTREGEXE=$ac_cv_path_JTREGEXE
26409if test -n "$JTREGEXE"; then
26410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26411$as_echo "$JTREGEXE" >&6; }
26412else
26413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26414$as_echo "no" >&6; }
26415fi
26416
26417
26418  test -n "$JTREGEXE" && break
26419done
26420
26421    else
26422      # If it succeeded, then it was overridden by the user. We will use it
26423      # for the tool.
26424
26425      # First remove it from the list of overridden variables, so we can test
26426      # for unknown variables in the end.
26427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26428
26429      # Check if the provided tool contains a complete path.
26430      tool_specified="$JTREGEXE"
26431      tool_basename="${tool_specified##*/}"
26432      if test "x$tool_basename" = "x$tool_specified"; then
26433        # A command without a complete path is provided, search $PATH.
26434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
26435$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
26436        # Extract the first word of "$tool_basename", so it can be a program name with args.
26437set dummy $tool_basename; ac_word=$2
26438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26439$as_echo_n "checking for $ac_word... " >&6; }
26440if ${ac_cv_path_JTREGEXE+:} false; then :
26441  $as_echo_n "(cached) " >&6
26442else
26443  case $JTREGEXE in
26444  [\\/]* | ?:[\\/]*)
26445  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26446  ;;
26447  *)
26448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26449for as_dir in $PATH
26450do
26451  IFS=$as_save_IFS
26452  test -z "$as_dir" && as_dir=.
26453    for ac_exec_ext in '' $ac_executable_extensions; do
26454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26455    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26457    break 2
26458  fi
26459done
26460  done
26461IFS=$as_save_IFS
26462
26463  ;;
26464esac
26465fi
26466JTREGEXE=$ac_cv_path_JTREGEXE
26467if test -n "$JTREGEXE"; then
26468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26469$as_echo "$JTREGEXE" >&6; }
26470else
26471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26472$as_echo "no" >&6; }
26473fi
26474
26475
26476        if test "x$JTREGEXE" = x; then
26477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26478        fi
26479      else
26480        # Otherwise we believe it is a complete path. Use it as it is.
26481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
26482$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
26483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
26484$as_echo_n "checking for JTREGEXE... " >&6; }
26485        if test ! -x "$tool_specified"; then
26486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26487$as_echo "not found" >&6; }
26488          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
26489        fi
26490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26491$as_echo "$tool_specified" >&6; }
26492      fi
26493    fi
26494  fi
26495
26496
26497
26498  if test "x$JTREGEXE" = x; then
26499    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
26500  fi
26501
26502
26503      JT_HOME="`$DIRNAME $JTREGEXE`"
26504    fi
26505  fi
26506
26507
26508
26509
26510
26511  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
26512
26513  # Store path to cygwin link.exe to help excluding it when searching for
26514  # VS linker. This must be done before changing the PATH when looking for VS.
26515  # Extract the first word of "link", so it can be a program name with args.
26516set dummy link; ac_word=$2
26517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26518$as_echo_n "checking for $ac_word... " >&6; }
26519if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26520  $as_echo_n "(cached) " >&6
26521else
26522  case $CYGWIN_LINK in
26523  [\\/]* | ?:[\\/]*)
26524  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26525  ;;
26526  *)
26527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26528for as_dir in $PATH
26529do
26530  IFS=$as_save_IFS
26531  test -z "$as_dir" && as_dir=.
26532    for ac_exec_ext in '' $ac_executable_extensions; do
26533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26534    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26536    break 2
26537  fi
26538done
26539  done
26540IFS=$as_save_IFS
26541
26542  ;;
26543esac
26544fi
26545CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26546if test -n "$CYGWIN_LINK"; then
26547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26548$as_echo "$CYGWIN_LINK" >&6; }
26549else
26550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26551$as_echo "no" >&6; }
26552fi
26553
26554
26555  if test "x$CYGWIN_LINK" != x; then
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26557$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26558    "$CYGWIN_LINK" --version > /dev/null
26559    if test $? -eq 0 ; then
26560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26561$as_echo "yes" >&6; }
26562    else
26563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26564$as_echo "no" >&6; }
26565      # This might be the VS linker. Don't exclude it later on.
26566      CYGWIN_LINK=""
26567    fi
26568  fi
26569
26570  # First-hand choice is to locate and run the vsvars bat file.
26571
26572  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26573    VCVARSFILE="vc/bin/vcvars32.bat"
26574  else
26575    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26576  fi
26577
26578  VS_ENV_CMD=""
26579  VS_ENV_ARGS=""
26580  if test "x$with_toolsdir" != x; then
26581
26582  if test "x$VS_ENV_CMD" = x; then
26583    VS100BASE="$with_toolsdir/../.."
26584    METHOD="--with-tools-dir"
26585
26586  windows_path="$VS100BASE"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VS100BASE="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VS100BASE="$unix_path"
26593  fi
26594
26595    if test -d "$VS100BASE"; then
26596      if test -f "$VS100BASE/$VCVARSFILE"; then
26597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26598$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26599        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26600      else
26601        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26602$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26603        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26604$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26605      fi
26606    fi
26607  fi
26608
26609  fi
26610
26611  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26612    # Having specified an argument which is incorrect will produce an instant failure;
26613    # we should not go on looking
26614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26615$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26616    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26617$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26618    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26619  fi
26620
26621  if test "x$VS100COMNTOOLS" != x; then
26622
26623  if test "x$VS_ENV_CMD" = x; then
26624    VS100BASE="$VS100COMNTOOLS/../.."
26625    METHOD="VS100COMNTOOLS variable"
26626
26627  windows_path="$VS100BASE"
26628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26629    unix_path=`$CYGPATH -u "$windows_path"`
26630    VS100BASE="$unix_path"
26631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26633    VS100BASE="$unix_path"
26634  fi
26635
26636    if test -d "$VS100BASE"; then
26637      if test -f "$VS100BASE/$VCVARSFILE"; then
26638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26639$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26640        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26641      else
26642        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26643$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26644        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26645$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26646      fi
26647    fi
26648  fi
26649
26650  fi
26651  if test "x$PROGRAMFILES" != x; then
26652
26653  if test "x$VS_ENV_CMD" = x; then
26654    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26655    METHOD="well-known name"
26656
26657  windows_path="$VS100BASE"
26658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26659    unix_path=`$CYGPATH -u "$windows_path"`
26660    VS100BASE="$unix_path"
26661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26663    VS100BASE="$unix_path"
26664  fi
26665
26666    if test -d "$VS100BASE"; then
26667      if test -f "$VS100BASE/$VCVARSFILE"; then
26668        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26669$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26670        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26671      else
26672        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26673$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26674        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26675$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26676      fi
26677    fi
26678  fi
26679
26680  fi
26681
26682  if test "x$VS_ENV_CMD" = x; then
26683    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26684    METHOD="well-known name"
26685
26686  windows_path="$VS100BASE"
26687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26688    unix_path=`$CYGPATH -u "$windows_path"`
26689    VS100BASE="$unix_path"
26690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26692    VS100BASE="$unix_path"
26693  fi
26694
26695    if test -d "$VS100BASE"; then
26696      if test -f "$VS100BASE/$VCVARSFILE"; then
26697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26698$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26699        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26700      else
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26702$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26704$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26705      fi
26706    fi
26707  fi
26708
26709
26710  if test "x$VS_ENV_CMD" = x; then
26711    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26712    METHOD="well-known name"
26713
26714  windows_path="$VS100BASE"
26715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26716    unix_path=`$CYGPATH -u "$windows_path"`
26717    VS100BASE="$unix_path"
26718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26720    VS100BASE="$unix_path"
26721  fi
26722
26723    if test -d "$VS100BASE"; then
26724      if test -f "$VS100BASE/$VCVARSFILE"; then
26725        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26726$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26727        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26728      else
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26730$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26732$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26733      fi
26734    fi
26735  fi
26736
26737
26738  if test "x$ProgramW6432" != x; then
26739
26740  if test "x$VS_ENV_CMD" = x; then
26741    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26742    METHOD="well-known name"
26743
26744  windows_path="$WIN_SDK_BASE"
26745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26746    unix_path=`$CYGPATH -u "$windows_path"`
26747    WIN_SDK_BASE="$unix_path"
26748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26750    WIN_SDK_BASE="$unix_path"
26751  fi
26752
26753    if test -d "$WIN_SDK_BASE"; then
26754      # There have been cases of partial or broken SDK installations. A missing
26755      # lib dir is not going to work.
26756      if test ! -d "$WIN_SDK_BASE/../lib"; then
26757        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26758$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26759        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26760$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26761      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26763$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26764        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26765        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26766          VS_ENV_ARGS="/x86"
26767        else
26768          VS_ENV_ARGS="/x64"
26769        fi
26770      else
26771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26772$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26773        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26774$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26775      fi
26776    fi
26777  fi
26778
26779  fi
26780  if test "x$PROGRAMW6432" != x; then
26781
26782  if test "x$VS_ENV_CMD" = x; then
26783    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26784    METHOD="well-known name"
26785
26786  windows_path="$WIN_SDK_BASE"
26787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26788    unix_path=`$CYGPATH -u "$windows_path"`
26789    WIN_SDK_BASE="$unix_path"
26790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26792    WIN_SDK_BASE="$unix_path"
26793  fi
26794
26795    if test -d "$WIN_SDK_BASE"; then
26796      # There have been cases of partial or broken SDK installations. A missing
26797      # lib dir is not going to work.
26798      if test ! -d "$WIN_SDK_BASE/../lib"; then
26799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26800$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26802$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26803      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26805$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26806        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26807        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26808          VS_ENV_ARGS="/x86"
26809        else
26810          VS_ENV_ARGS="/x64"
26811        fi
26812      else
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26814$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26815        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26816$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26817      fi
26818    fi
26819  fi
26820
26821  fi
26822  if test "x$PROGRAMFILES" != x; then
26823
26824  if test "x$VS_ENV_CMD" = x; then
26825    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26826    METHOD="well-known name"
26827
26828  windows_path="$WIN_SDK_BASE"
26829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26830    unix_path=`$CYGPATH -u "$windows_path"`
26831    WIN_SDK_BASE="$unix_path"
26832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26834    WIN_SDK_BASE="$unix_path"
26835  fi
26836
26837    if test -d "$WIN_SDK_BASE"; then
26838      # There have been cases of partial or broken SDK installations. A missing
26839      # lib dir is not going to work.
26840      if test ! -d "$WIN_SDK_BASE/../lib"; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26842$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26844$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26845      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26847$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26848        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26849        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26850          VS_ENV_ARGS="/x86"
26851        else
26852          VS_ENV_ARGS="/x64"
26853        fi
26854      else
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26856$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26857        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26858$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26859      fi
26860    fi
26861  fi
26862
26863  fi
26864
26865  if test "x$VS_ENV_CMD" = x; then
26866    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26867    METHOD="well-known name"
26868
26869  windows_path="$WIN_SDK_BASE"
26870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26871    unix_path=`$CYGPATH -u "$windows_path"`
26872    WIN_SDK_BASE="$unix_path"
26873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26875    WIN_SDK_BASE="$unix_path"
26876  fi
26877
26878    if test -d "$WIN_SDK_BASE"; then
26879      # There have been cases of partial or broken SDK installations. A missing
26880      # lib dir is not going to work.
26881      if test ! -d "$WIN_SDK_BASE/../lib"; then
26882        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26883$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26884        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26885$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26886      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26889        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26890        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26891          VS_ENV_ARGS="/x86"
26892        else
26893          VS_ENV_ARGS="/x64"
26894        fi
26895      else
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26897$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26899$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26900      fi
26901    fi
26902  fi
26903
26904
26905  if test "x$VS_ENV_CMD" = x; then
26906    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26907    METHOD="well-known name"
26908
26909  windows_path="$WIN_SDK_BASE"
26910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26911    unix_path=`$CYGPATH -u "$windows_path"`
26912    WIN_SDK_BASE="$unix_path"
26913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26915    WIN_SDK_BASE="$unix_path"
26916  fi
26917
26918    if test -d "$WIN_SDK_BASE"; then
26919      # There have been cases of partial or broken SDK installations. A missing
26920      # lib dir is not going to work.
26921      if test ! -d "$WIN_SDK_BASE/../lib"; then
26922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26923$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26924        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26925$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26926      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26928$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26929        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26930        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26931          VS_ENV_ARGS="/x86"
26932        else
26933          VS_ENV_ARGS="/x64"
26934        fi
26935      else
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26937$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26938        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26939$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26940      fi
26941    fi
26942  fi
26943
26944
26945  if test "x$VS_ENV_CMD" != x; then
26946    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26947
26948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26949
26950  # First separate the path from the arguments. This will split at the first
26951  # space.
26952  complete="$VS_ENV_CMD"
26953  path="${complete%% *}"
26954  tmp="$complete EOL"
26955  arguments="${tmp#* }"
26956
26957  # Input might be given as Windows format, start by converting to
26958  # unix format.
26959  new_path=`$CYGPATH -u "$path"`
26960
26961  # Now try to locate executable using which
26962  new_path=`$WHICH "$new_path" 2> /dev/null`
26963  # bat and cmd files are not always considered executable in cygwin causing which
26964  # to not find them
26965  if test "x$new_path" = x \
26966      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26967      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26968    new_path=`$CYGPATH -u "$path"`
26969  fi
26970  if test "x$new_path" = x; then
26971    # Oops. Which didn't find the executable.
26972    # The splitting of arguments from the executable at a space might have been incorrect,
26973    # since paths with space are more likely in Windows. Give it another try with the whole
26974    # argument.
26975    path="$complete"
26976    arguments="EOL"
26977    new_path=`$CYGPATH -u "$path"`
26978    new_path=`$WHICH "$new_path" 2> /dev/null`
26979    # bat and cmd files are not always considered executable in cygwin causing which
26980    # to not find them
26981    if test "x$new_path" = x \
26982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26984      new_path=`$CYGPATH -u "$path"`
26985    fi
26986    if test "x$new_path" = x; then
26987      # It's still not found. Now this is an unrecoverable error.
26988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26989$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26990      has_space=`$ECHO "$complete" | $GREP " "`
26991      if test "x$has_space" != x; then
26992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26994      fi
26995      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26996    fi
26997  fi
26998
26999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27002  # "foo.exe" is OK but "foo" is an error.
27003  #
27004  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27005  # It is also a way to make sure we got the proper file name for the real test later on.
27006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27007  if test "x$test_shortpath" = x; then
27008    # Short path failed, file does not exist as specified.
27009    # Try adding .exe or .cmd
27010    if test -f "${new_path}.exe"; then
27011      input_to_shortpath="${new_path}.exe"
27012    elif test -f "${new_path}.cmd"; then
27013      input_to_shortpath="${new_path}.cmd"
27014    else
27015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27016$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27017      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27018$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27019      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27020    fi
27021  else
27022    input_to_shortpath="$new_path"
27023  fi
27024
27025  # Call helper function which possibly converts this using DOS-style short mode.
27026  # If so, the updated path is stored in $new_path.
27027  new_path="$input_to_shortpath"
27028
27029  input_path="$input_to_shortpath"
27030  # Check if we need to convert this using DOS-style short mode. If the path
27031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27032  # take no chances and rewrite it.
27033  # Note: m4 eats our [], so we need to use [ and ] instead.
27034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27035  if test "x$has_forbidden_chars" != x; then
27036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27040      # Going to short mode and back again did indeed matter. Since short mode is
27041      # case insensitive, let's make it lowercase to improve readability.
27042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27043      # Now convert it back to Unix-stile (cygpath)
27044      input_path=`$CYGPATH -u "$shortmode_path"`
27045      new_path="$input_path"
27046    fi
27047  fi
27048
27049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27050  if test "x$test_cygdrive_prefix" = x; then
27051    # As a simple fix, exclude /usr/bin since it's not a real path.
27052    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27054      # a path prefixed by /cygdrive for fixpath to work.
27055      new_path="$CYGWIN_ROOT_PATH$input_path"
27056    fi
27057  fi
27058
27059  # remove trailing .exe if any
27060  new_path="${new_path/%.exe/}"
27061
27062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27063
27064  # First separate the path from the arguments. This will split at the first
27065  # space.
27066  complete="$VS_ENV_CMD"
27067  path="${complete%% *}"
27068  tmp="$complete EOL"
27069  arguments="${tmp#* }"
27070
27071  # Input might be given as Windows format, start by converting to
27072  # unix format.
27073  new_path="$path"
27074
27075  windows_path="$new_path"
27076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27077    unix_path=`$CYGPATH -u "$windows_path"`
27078    new_path="$unix_path"
27079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27081    new_path="$unix_path"
27082  fi
27083
27084
27085  # Now try to locate executable using which
27086  new_path=`$WHICH "$new_path" 2> /dev/null`
27087
27088  if test "x$new_path" = x; then
27089    # Oops. Which didn't find the executable.
27090    # The splitting of arguments from the executable at a space might have been incorrect,
27091    # since paths with space are more likely in Windows. Give it another try with the whole
27092    # argument.
27093    path="$complete"
27094    arguments="EOL"
27095    new_path="$path"
27096
27097  windows_path="$new_path"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    new_path="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    new_path="$unix_path"
27104  fi
27105
27106
27107    new_path=`$WHICH "$new_path" 2> /dev/null`
27108
27109    if test "x$new_path" = x; then
27110      # It's still not found. Now this is an unrecoverable error.
27111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27112$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27113      has_space=`$ECHO "$complete" | $GREP " "`
27114      if test "x$has_space" != x; then
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27117      fi
27118      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27119    fi
27120  fi
27121
27122  # Now new_path has a complete unix path to the binary
27123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27124    # Keep paths in /bin as-is, but remove trailing .exe if any
27125    new_path="${new_path/%.exe/}"
27126    # Do not save /bin paths to all_fixpath_prefixes!
27127  else
27128    # Not in mixed or Windows style, start by that.
27129    new_path=`cmd //c echo $new_path`
27130
27131  input_path="$new_path"
27132  # Check if we need to convert this using DOS-style short mode. If the path
27133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27134  # take no chances and rewrite it.
27135  # Note: m4 eats our [], so we need to use [ and ] instead.
27136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27137  if test "x$has_forbidden_chars" != x; then
27138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27140  fi
27141
27142    # Output is in $new_path
27143
27144  windows_path="$new_path"
27145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27146    unix_path=`$CYGPATH -u "$windows_path"`
27147    new_path="$unix_path"
27148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27150    new_path="$unix_path"
27151  fi
27152
27153    # remove trailing .exe if any
27154    new_path="${new_path/%.exe/}"
27155
27156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27158  fi
27159
27160  else
27161    # We're on a posix platform. Hooray! :)
27162    # First separate the path from the arguments. This will split at the first
27163    # space.
27164    complete="$VS_ENV_CMD"
27165    path="${complete%% *}"
27166    tmp="$complete EOL"
27167    arguments="${tmp#* }"
27168
27169    # Cannot rely on the command "which" here since it doesn't always work.
27170    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27171    if test -z "$is_absolute_path"; then
27172      # Path to executable is not absolute. Find it.
27173      IFS_save="$IFS"
27174      IFS=:
27175      for p in $PATH; do
27176        if test -f "$p/$path" && test -x "$p/$path"; then
27177          new_path="$p/$path"
27178          break
27179        fi
27180      done
27181      IFS="$IFS_save"
27182    else
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
27184$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
27185      new_path="$path"
27186    fi
27187
27188    if test "x$new_path" = x; then
27189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27190$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27191      has_space=`$ECHO "$complete" | $GREP " "`
27192      if test "x$has_space" != x; then
27193        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27194$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27195      fi
27196      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27197    fi
27198  fi
27199
27200  # Now join together the path and the arguments once again
27201  if test "x$arguments" != xEOL; then
27202    new_complete="$new_path ${arguments% *}"
27203  else
27204    new_complete="$new_path"
27205  fi
27206
27207  if test "x$complete" != "x$new_complete"; then
27208    VS_ENV_CMD="$new_complete"
27209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27210$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27211  fi
27212
27213
27214    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27215    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27216$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27217    cd $OUTPUT_ROOT
27218    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27219    # to autoconf standards.
27220
27221    #----
27222
27223    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27224    # but calculate the difference in Cygwin environment before/after running it and then
27225    # apply the diff.
27226
27227    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27228      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27229      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27230      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27231    else
27232      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27233      _dosbash=`cmd //c echo \`which bash\``
27234    fi
27235
27236    # generate the set of exported vars before/after the vs10 setup
27237    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27238    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27239    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27240    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27241
27242    # Now execute the newly created bat file.
27243    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27244    cmd /c localdevenvtmp.bat | cat
27245
27246    # apply the diff (less some non-vs10 vars named by "!")
27247    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27248    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27249    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27250
27251    # cleanup
27252    $RM localdevenvtmp*
27253    #----
27254    cd $CURDIR
27255    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27257$as_echo "no" >&6; }
27258      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27259$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27260      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27261$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27262      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27263$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27264      as_fn_error $? "Cannot continue" "$LINENO" 5
27265    fi
27266
27267    # Now set all paths and other env variables. This will allow the rest of
27268    # the configure script to find and run the compiler in the proper way.
27269    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27270$as_echo "$as_me: Setting extracted environment variables" >&6;}
27271    . $OUTPUT_ROOT/localdevenv.sh
27272  else
27273    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27274    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27275$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27276  fi
27277
27278  # At this point, we should have corrent variables in the environment, or we can't continue.
27279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27280$as_echo_n "checking for Visual Studio variables... " >&6; }
27281
27282  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27283    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27285$as_echo "present but broken" >&6; }
27286      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27287    else
27288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27289$as_echo "ok" >&6; }
27290      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27291      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27292      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27293      # Remove any paths containing # (typically F#) as that messes up make
27294      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27295      VS_PATH="$PATH"
27296
27297
27298
27299    fi
27300  else
27301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27302$as_echo "not found" >&6; }
27303
27304    if test "x$VS_ENV_CMD" = x; then
27305      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27306$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27307      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27308$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27309    else
27310      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27311$as_echo "$as_me: Running the extraction script failed." >&6;}
27312    fi
27313    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27314$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27315    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27316$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27317    as_fn_error $? "Cannot continue" "$LINENO" 5
27318  fi
27319
27320
27321
27322# Check whether --with-msvcr-dll was given.
27323if test "${with_msvcr_dll+set}" = set; then :
27324  withval=$with_msvcr_dll;
27325fi
27326
27327
27328  if test "x$with_msvcr_dll" != x; then
27329    # If given explicitely by user, do not probe. If not present, fail directly.
27330
27331  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
27332  METHOD="--with-msvcr-dll"
27333  if test -e "$POSSIBLE_MSVCR_DLL"; then
27334    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27335$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27336
27337    # Need to check if the found msvcr is correct architecture
27338    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27339$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27340    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27341    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27342      CORRECT_MSVCR_ARCH=386
27343    else
27344      CORRECT_MSVCR_ARCH=x86-64
27345    fi
27346    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27348$as_echo "ok" >&6; }
27349      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27351$as_echo_n "checking for msvcr100.dll... " >&6; }
27352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27353$as_echo "$MSVCR_DLL" >&6; }
27354    else
27355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27356$as_echo "incorrect, ignoring" >&6; }
27357      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27358$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27359    fi
27360  fi
27361
27362    if test "x$MSVCR_DLL" = x; then
27363      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
27364    fi
27365  fi
27366
27367  if test "x$MSVCR_DLL" = x; then
27368    # Probe: Using well-known location from Visual Studio 10.0
27369    if test "x$VCINSTALLDIR" != x; then
27370      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
27371
27372  windows_path="$CYGWIN_VC_INSTALL_DIR"
27373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27374    unix_path=`$CYGPATH -u "$windows_path"`
27375    CYGWIN_VC_INSTALL_DIR="$unix_path"
27376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27378    CYGWIN_VC_INSTALL_DIR="$unix_path"
27379  fi
27380
27381      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27382        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
27383      else
27384        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
27385      fi
27386
27387  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27388  METHOD="well-known location in VCINSTALLDIR"
27389  if test -e "$POSSIBLE_MSVCR_DLL"; then
27390    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27391$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27392
27393    # Need to check if the found msvcr is correct architecture
27394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27395$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27396    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27397    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27398      CORRECT_MSVCR_ARCH=386
27399    else
27400      CORRECT_MSVCR_ARCH=x86-64
27401    fi
27402    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27404$as_echo "ok" >&6; }
27405      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27407$as_echo_n "checking for msvcr100.dll... " >&6; }
27408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27409$as_echo "$MSVCR_DLL" >&6; }
27410    else
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27412$as_echo "incorrect, ignoring" >&6; }
27413      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27414$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27415    fi
27416  fi
27417
27418    fi
27419  fi
27420
27421  if test "x$MSVCR_DLL" = x; then
27422    # Probe: Check in the Boot JDK directory.
27423    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
27424
27425  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27426  METHOD="well-known location in Boot JDK"
27427  if test -e "$POSSIBLE_MSVCR_DLL"; then
27428    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27429$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27430
27431    # Need to check if the found msvcr is correct architecture
27432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27433$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27434    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27435    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27436      CORRECT_MSVCR_ARCH=386
27437    else
27438      CORRECT_MSVCR_ARCH=x86-64
27439    fi
27440    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27442$as_echo "ok" >&6; }
27443      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27444      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27445$as_echo_n "checking for msvcr100.dll... " >&6; }
27446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27447$as_echo "$MSVCR_DLL" >&6; }
27448    else
27449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27450$as_echo "incorrect, ignoring" >&6; }
27451      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27452$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27453    fi
27454  fi
27455
27456  fi
27457
27458  if test "x$MSVCR_DLL" = x; then
27459    # Probe: Look in the Windows system32 directory
27460    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
27461
27462  windows_path="$CYGWIN_SYSTEMROOT"
27463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27464    unix_path=`$CYGPATH -u "$windows_path"`
27465    CYGWIN_SYSTEMROOT="$unix_path"
27466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27468    CYGWIN_SYSTEMROOT="$unix_path"
27469  fi
27470
27471    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
27472
27473  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27474  METHOD="well-known location in SYSTEMROOT"
27475  if test -e "$POSSIBLE_MSVCR_DLL"; then
27476    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27477$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27478
27479    # Need to check if the found msvcr is correct architecture
27480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27481$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27482    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27483    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27484      CORRECT_MSVCR_ARCH=386
27485    else
27486      CORRECT_MSVCR_ARCH=x86-64
27487    fi
27488    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27490$as_echo "ok" >&6; }
27491      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27493$as_echo_n "checking for msvcr100.dll... " >&6; }
27494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27495$as_echo "$MSVCR_DLL" >&6; }
27496    else
27497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27498$as_echo "incorrect, ignoring" >&6; }
27499      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27500$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27501    fi
27502  fi
27503
27504  fi
27505
27506  if test "x$MSVCR_DLL" = x; then
27507    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
27508    if test "x$VS100COMNTOOLS" != x; then
27509      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
27510
27511  windows_path="$CYGWIN_VS_TOOLS_DIR"
27512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27513    unix_path=`$CYGPATH -u "$windows_path"`
27514    CYGWIN_VS_TOOLS_DIR="$unix_path"
27515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27517    CYGWIN_VS_TOOLS_DIR="$unix_path"
27518  fi
27519
27520      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27521        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
27522      else
27523        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
27524      fi
27525
27526  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27527  METHOD="search of VS100COMNTOOLS"
27528  if test -e "$POSSIBLE_MSVCR_DLL"; then
27529    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27530$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27531
27532    # Need to check if the found msvcr is correct architecture
27533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27534$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27535    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27536    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27537      CORRECT_MSVCR_ARCH=386
27538    else
27539      CORRECT_MSVCR_ARCH=x86-64
27540    fi
27541    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27543$as_echo "ok" >&6; }
27544      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27545      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27546$as_echo_n "checking for msvcr100.dll... " >&6; }
27547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27548$as_echo "$MSVCR_DLL" >&6; }
27549    else
27550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27551$as_echo "incorrect, ignoring" >&6; }
27552      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27553$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27554    fi
27555  fi
27556
27557    fi
27558  fi
27559
27560  if test "x$MSVCR_DLL" = x; then
27561    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
27562    # (This was the original behaviour; kept since it might turn up something)
27563    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
27564      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27565        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
27566      else
27567        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
27568        if test "x$POSSIBLE_MSVCR_DLL" = x; then
27569          # We're grasping at straws now...
27570          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
27571        fi
27572      fi
27573
27574
27575  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27576  METHOD="search of VCINSTALLDIR"
27577  if test -e "$POSSIBLE_MSVCR_DLL"; then
27578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27579$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27580
27581    # Need to check if the found msvcr is correct architecture
27582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27583$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27584    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27585    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27586      CORRECT_MSVCR_ARCH=386
27587    else
27588      CORRECT_MSVCR_ARCH=x86-64
27589    fi
27590    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27592$as_echo "ok" >&6; }
27593      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27595$as_echo_n "checking for msvcr100.dll... " >&6; }
27596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27597$as_echo "$MSVCR_DLL" >&6; }
27598    else
27599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27600$as_echo "incorrect, ignoring" >&6; }
27601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27602$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27603    fi
27604  fi
27605
27606    fi
27607  fi
27608
27609  if test "x$MSVCR_DLL" = x; then
27610    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27611$as_echo_n "checking for msvcr100.dll... " >&6; }
27612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27613$as_echo "no" >&6; }
27614    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
27615  fi
27616
27617
27618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619
27620  # Input might be given as Windows format, start by converting to
27621  # unix format.
27622  path="$MSVCR_DLL"
27623  new_path=`$CYGPATH -u "$path"`
27624
27625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27628  # "foo.exe" is OK but "foo" is an error.
27629  #
27630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27631  # It is also a way to make sure we got the proper file name for the real test later on.
27632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27633  if test "x$test_shortpath" = x; then
27634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27635$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27636    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
27637  fi
27638
27639  # Call helper function which possibly converts this using DOS-style short mode.
27640  # If so, the updated path is stored in $new_path.
27641
27642  input_path="$new_path"
27643  # Check if we need to convert this using DOS-style short mode. If the path
27644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27645  # take no chances and rewrite it.
27646  # Note: m4 eats our [], so we need to use [ and ] instead.
27647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27648  if test "x$has_forbidden_chars" != x; then
27649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27653      # Going to short mode and back again did indeed matter. Since short mode is
27654      # case insensitive, let's make it lowercase to improve readability.
27655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27656      # Now convert it back to Unix-stile (cygpath)
27657      input_path=`$CYGPATH -u "$shortmode_path"`
27658      new_path="$input_path"
27659    fi
27660  fi
27661
27662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27663  if test "x$test_cygdrive_prefix" = x; then
27664    # As a simple fix, exclude /usr/bin since it's not a real path.
27665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27667      # a path prefixed by /cygdrive for fixpath to work.
27668      new_path="$CYGWIN_ROOT_PATH$input_path"
27669    fi
27670  fi
27671
27672
27673  if test "x$path" != "x$new_path"; then
27674    MSVCR_DLL="$new_path"
27675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27676$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27677  fi
27678
27679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680
27681  path="$MSVCR_DLL"
27682  has_colon=`$ECHO $path | $GREP ^.:`
27683  new_path="$path"
27684  if test "x$has_colon" = x; then
27685    # Not in mixed or Windows style, start by that.
27686    new_path=`cmd //c echo $path`
27687  fi
27688
27689
27690  input_path="$new_path"
27691  # Check if we need to convert this using DOS-style short mode. If the path
27692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27693  # take no chances and rewrite it.
27694  # Note: m4 eats our [], so we need to use [ and ] instead.
27695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27696  if test "x$has_forbidden_chars" != x; then
27697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27699  fi
27700
27701
27702  windows_path="$new_path"
27703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27704    unix_path=`$CYGPATH -u "$windows_path"`
27705    new_path="$unix_path"
27706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27708    new_path="$unix_path"
27709  fi
27710
27711  if test "x$path" != "x$new_path"; then
27712    MSVCR_DLL="$new_path"
27713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27714$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27715  fi
27716
27717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27719
27720  else
27721    # We're on a posix platform. Hooray! :)
27722    path="$MSVCR_DLL"
27723    has_space=`$ECHO "$path" | $GREP " "`
27724    if test "x$has_space" != x; then
27725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27726$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27727      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27728    fi
27729
27730    # Use eval to expand a potential ~
27731    eval path="$path"
27732    if test ! -f "$path" && test ! -d "$path"; then
27733      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
27734    fi
27735
27736    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
27737  fi
27738
27739
27740
27741
27742# Check whether --with-dxsdk was given.
27743if test "${with_dxsdk+set}" = set; then :
27744  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
27745$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
27746fi
27747
27748
27749
27750
27751# Check whether --with-dxsdk-lib was given.
27752if test "${with_dxsdk_lib+set}" = set; then :
27753  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
27754$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
27755fi
27756
27757
27758
27759
27760# Check whether --with-dxsdk-include was given.
27761if test "${with_dxsdk_include+set}" = set; then :
27762  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
27763$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
27764fi
27765
27766
27767  fi
27768
27769
27770
27771  # If --build AND --host is set, then the configure script will find any
27772  # cross compilation tools in the PATH. Cross compilation tools
27773  # follows the cross compilation standard where they are prefixed with ${host}.
27774  # For example the binary i686-sun-solaris2.10-gcc
27775  # will cross compile for i686-sun-solaris2.10
27776  # If neither of build and host is not set, then build=host and the
27777  # default compiler found in the path will be used.
27778  # Setting only --host, does not seem to be really supported.
27779  # Please set both --build and --host if you want to cross compile.
27780
27781  if test "x$COMPILE_TYPE" = "xcross"; then
27782    # Now we to find a C/C++ compiler that can build executables for the build
27783    # platform. We can't use the AC_PROG_CC macro, since it can only be used
27784    # once. Also, we need to do this before adding a tools dir to the path,
27785    # otherwise we might pick up cross-compilers which don't use standard naming.
27786    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
27787    # to wait until they are properly discovered.
27788
27789
27790  # Publish this variable in the help.
27791
27792
27793  if test "x$BUILD_CC" = x; then
27794    # The variable is not set by user, try to locate tool using the code snippet
27795    for ac_prog in cl cc gcc
27796do
27797  # Extract the first word of "$ac_prog", so it can be a program name with args.
27798set dummy $ac_prog; ac_word=$2
27799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27800$as_echo_n "checking for $ac_word... " >&6; }
27801if ${ac_cv_path_BUILD_CC+:} false; then :
27802  $as_echo_n "(cached) " >&6
27803else
27804  case $BUILD_CC in
27805  [\\/]* | ?:[\\/]*)
27806  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27807  ;;
27808  *)
27809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27810for as_dir in $PATH
27811do
27812  IFS=$as_save_IFS
27813  test -z "$as_dir" && as_dir=.
27814    for ac_exec_ext in '' $ac_executable_extensions; do
27815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27816    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27818    break 2
27819  fi
27820done
27821  done
27822IFS=$as_save_IFS
27823
27824  ;;
27825esac
27826fi
27827BUILD_CC=$ac_cv_path_BUILD_CC
27828if test -n "$BUILD_CC"; then
27829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27830$as_echo "$BUILD_CC" >&6; }
27831else
27832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27833$as_echo "no" >&6; }
27834fi
27835
27836
27837  test -n "$BUILD_CC" && break
27838done
27839
27840  else
27841    # The variable is set, but is it from the command line or the environment?
27842
27843    # Try to remove the string !BUILD_CC! from our list.
27844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
27845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27846      # If it failed, the variable was not from the command line. Ignore it,
27847      # but warn the user (except for BASH, which is always set by the calling BASH).
27848      if test "xBUILD_CC" != xBASH; then
27849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
27850$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
27851      fi
27852      # Try to locate tool using the code snippet
27853      for ac_prog in cl cc gcc
27854do
27855  # Extract the first word of "$ac_prog", so it can be a program name with args.
27856set dummy $ac_prog; ac_word=$2
27857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27858$as_echo_n "checking for $ac_word... " >&6; }
27859if ${ac_cv_path_BUILD_CC+:} false; then :
27860  $as_echo_n "(cached) " >&6
27861else
27862  case $BUILD_CC in
27863  [\\/]* | ?:[\\/]*)
27864  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27865  ;;
27866  *)
27867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27868for as_dir in $PATH
27869do
27870  IFS=$as_save_IFS
27871  test -z "$as_dir" && as_dir=.
27872    for ac_exec_ext in '' $ac_executable_extensions; do
27873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27874    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27876    break 2
27877  fi
27878done
27879  done
27880IFS=$as_save_IFS
27881
27882  ;;
27883esac
27884fi
27885BUILD_CC=$ac_cv_path_BUILD_CC
27886if test -n "$BUILD_CC"; then
27887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27888$as_echo "$BUILD_CC" >&6; }
27889else
27890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27891$as_echo "no" >&6; }
27892fi
27893
27894
27895  test -n "$BUILD_CC" && break
27896done
27897
27898    else
27899      # If it succeeded, then it was overridden by the user. We will use it
27900      # for the tool.
27901
27902      # First remove it from the list of overridden variables, so we can test
27903      # for unknown variables in the end.
27904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27905
27906      # Check if the provided tool contains a complete path.
27907      tool_specified="$BUILD_CC"
27908      tool_basename="${tool_specified##*/}"
27909      if test "x$tool_basename" = "x$tool_specified"; then
27910        # A command without a complete path is provided, search $PATH.
27911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
27912$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
27913        # Extract the first word of "$tool_basename", so it can be a program name with args.
27914set dummy $tool_basename; ac_word=$2
27915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27916$as_echo_n "checking for $ac_word... " >&6; }
27917if ${ac_cv_path_BUILD_CC+:} false; then :
27918  $as_echo_n "(cached) " >&6
27919else
27920  case $BUILD_CC in
27921  [\\/]* | ?:[\\/]*)
27922  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27923  ;;
27924  *)
27925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27926for as_dir in $PATH
27927do
27928  IFS=$as_save_IFS
27929  test -z "$as_dir" && as_dir=.
27930    for ac_exec_ext in '' $ac_executable_extensions; do
27931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27932    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27934    break 2
27935  fi
27936done
27937  done
27938IFS=$as_save_IFS
27939
27940  ;;
27941esac
27942fi
27943BUILD_CC=$ac_cv_path_BUILD_CC
27944if test -n "$BUILD_CC"; then
27945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27946$as_echo "$BUILD_CC" >&6; }
27947else
27948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27949$as_echo "no" >&6; }
27950fi
27951
27952
27953        if test "x$BUILD_CC" = x; then
27954          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27955        fi
27956      else
27957        # Otherwise we believe it is a complete path. Use it as it is.
27958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
27959$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
27961$as_echo_n "checking for BUILD_CC... " >&6; }
27962        if test ! -x "$tool_specified"; then
27963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27964$as_echo "not found" >&6; }
27965          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
27966        fi
27967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27968$as_echo "$tool_specified" >&6; }
27969      fi
27970    fi
27971  fi
27972
27973
27974
27975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27976
27977  # First separate the path from the arguments. This will split at the first
27978  # space.
27979  complete="$BUILD_CC"
27980  path="${complete%% *}"
27981  tmp="$complete EOL"
27982  arguments="${tmp#* }"
27983
27984  # Input might be given as Windows format, start by converting to
27985  # unix format.
27986  new_path=`$CYGPATH -u "$path"`
27987
27988  # Now try to locate executable using which
27989  new_path=`$WHICH "$new_path" 2> /dev/null`
27990  # bat and cmd files are not always considered executable in cygwin causing which
27991  # to not find them
27992  if test "x$new_path" = x \
27993      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27994      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27995    new_path=`$CYGPATH -u "$path"`
27996  fi
27997  if test "x$new_path" = x; then
27998    # Oops. Which didn't find the executable.
27999    # The splitting of arguments from the executable at a space might have been incorrect,
28000    # since paths with space are more likely in Windows. Give it another try with the whole
28001    # argument.
28002    path="$complete"
28003    arguments="EOL"
28004    new_path=`$CYGPATH -u "$path"`
28005    new_path=`$WHICH "$new_path" 2> /dev/null`
28006    # bat and cmd files are not always considered executable in cygwin causing which
28007    # to not find them
28008    if test "x$new_path" = x \
28009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28011      new_path=`$CYGPATH -u "$path"`
28012    fi
28013    if test "x$new_path" = x; then
28014      # It's still not found. Now this is an unrecoverable error.
28015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28016$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28017      has_space=`$ECHO "$complete" | $GREP " "`
28018      if test "x$has_space" != x; then
28019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28021      fi
28022      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28023    fi
28024  fi
28025
28026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28029  # "foo.exe" is OK but "foo" is an error.
28030  #
28031  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28032  # It is also a way to make sure we got the proper file name for the real test later on.
28033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28034  if test "x$test_shortpath" = x; then
28035    # Short path failed, file does not exist as specified.
28036    # Try adding .exe or .cmd
28037    if test -f "${new_path}.exe"; then
28038      input_to_shortpath="${new_path}.exe"
28039    elif test -f "${new_path}.cmd"; then
28040      input_to_shortpath="${new_path}.cmd"
28041    else
28042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
28043$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
28044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28046      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28047    fi
28048  else
28049    input_to_shortpath="$new_path"
28050  fi
28051
28052  # Call helper function which possibly converts this using DOS-style short mode.
28053  # If so, the updated path is stored in $new_path.
28054  new_path="$input_to_shortpath"
28055
28056  input_path="$input_to_shortpath"
28057  # Check if we need to convert this using DOS-style short mode. If the path
28058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28059  # take no chances and rewrite it.
28060  # Note: m4 eats our [], so we need to use [ and ] instead.
28061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28062  if test "x$has_forbidden_chars" != x; then
28063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28067      # Going to short mode and back again did indeed matter. Since short mode is
28068      # case insensitive, let's make it lowercase to improve readability.
28069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28070      # Now convert it back to Unix-stile (cygpath)
28071      input_path=`$CYGPATH -u "$shortmode_path"`
28072      new_path="$input_path"
28073    fi
28074  fi
28075
28076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28077  if test "x$test_cygdrive_prefix" = x; then
28078    # As a simple fix, exclude /usr/bin since it's not a real path.
28079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28081      # a path prefixed by /cygdrive for fixpath to work.
28082      new_path="$CYGWIN_ROOT_PATH$input_path"
28083    fi
28084  fi
28085
28086  # remove trailing .exe if any
28087  new_path="${new_path/%.exe/}"
28088
28089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28090
28091  # First separate the path from the arguments. This will split at the first
28092  # space.
28093  complete="$BUILD_CC"
28094  path="${complete%% *}"
28095  tmp="$complete EOL"
28096  arguments="${tmp#* }"
28097
28098  # Input might be given as Windows format, start by converting to
28099  # unix format.
28100  new_path="$path"
28101
28102  windows_path="$new_path"
28103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104    unix_path=`$CYGPATH -u "$windows_path"`
28105    new_path="$unix_path"
28106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28108    new_path="$unix_path"
28109  fi
28110
28111
28112  # Now try to locate executable using which
28113  new_path=`$WHICH "$new_path" 2> /dev/null`
28114
28115  if test "x$new_path" = x; then
28116    # Oops. Which didn't find the executable.
28117    # The splitting of arguments from the executable at a space might have been incorrect,
28118    # since paths with space are more likely in Windows. Give it another try with the whole
28119    # argument.
28120    path="$complete"
28121    arguments="EOL"
28122    new_path="$path"
28123
28124  windows_path="$new_path"
28125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28126    unix_path=`$CYGPATH -u "$windows_path"`
28127    new_path="$unix_path"
28128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28130    new_path="$unix_path"
28131  fi
28132
28133
28134    new_path=`$WHICH "$new_path" 2> /dev/null`
28135
28136    if test "x$new_path" = x; then
28137      # It's still not found. Now this is an unrecoverable error.
28138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28139$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28140      has_space=`$ECHO "$complete" | $GREP " "`
28141      if test "x$has_space" != x; then
28142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28144      fi
28145      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28146    fi
28147  fi
28148
28149  # Now new_path has a complete unix path to the binary
28150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28151    # Keep paths in /bin as-is, but remove trailing .exe if any
28152    new_path="${new_path/%.exe/}"
28153    # Do not save /bin paths to all_fixpath_prefixes!
28154  else
28155    # Not in mixed or Windows style, start by that.
28156    new_path=`cmd //c echo $new_path`
28157
28158  input_path="$new_path"
28159  # Check if we need to convert this using DOS-style short mode. If the path
28160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28161  # take no chances and rewrite it.
28162  # Note: m4 eats our [], so we need to use [ and ] instead.
28163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28164  if test "x$has_forbidden_chars" != x; then
28165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28167  fi
28168
28169    # Output is in $new_path
28170
28171  windows_path="$new_path"
28172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28173    unix_path=`$CYGPATH -u "$windows_path"`
28174    new_path="$unix_path"
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28177    new_path="$unix_path"
28178  fi
28179
28180    # remove trailing .exe if any
28181    new_path="${new_path/%.exe/}"
28182
28183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28185  fi
28186
28187  else
28188    # We're on a posix platform. Hooray! :)
28189    # First separate the path from the arguments. This will split at the first
28190    # space.
28191    complete="$BUILD_CC"
28192    path="${complete%% *}"
28193    tmp="$complete EOL"
28194    arguments="${tmp#* }"
28195
28196    # Cannot rely on the command "which" here since it doesn't always work.
28197    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28198    if test -z "$is_absolute_path"; then
28199      # Path to executable is not absolute. Find it.
28200      IFS_save="$IFS"
28201      IFS=:
28202      for p in $PATH; do
28203        if test -f "$p/$path" && test -x "$p/$path"; then
28204          new_path="$p/$path"
28205          break
28206        fi
28207      done
28208      IFS="$IFS_save"
28209    else
28210      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
28211$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
28212      new_path="$path"
28213    fi
28214
28215    if test "x$new_path" = x; then
28216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28217$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28218      has_space=`$ECHO "$complete" | $GREP " "`
28219      if test "x$has_space" != x; then
28220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28222      fi
28223      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28224    fi
28225  fi
28226
28227  # Now join together the path and the arguments once again
28228  if test "x$arguments" != xEOL; then
28229    new_complete="$new_path ${arguments% *}"
28230  else
28231    new_complete="$new_path"
28232  fi
28233
28234  if test "x$complete" != "x$new_complete"; then
28235    BUILD_CC="$new_complete"
28236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
28237$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
28238  fi
28239
28240
28241
28242  # Publish this variable in the help.
28243
28244
28245  if test "x$BUILD_CXX" = x; then
28246    # The variable is not set by user, try to locate tool using the code snippet
28247    for ac_prog in cl CC g++
28248do
28249  # Extract the first word of "$ac_prog", so it can be a program name with args.
28250set dummy $ac_prog; ac_word=$2
28251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28252$as_echo_n "checking for $ac_word... " >&6; }
28253if ${ac_cv_path_BUILD_CXX+:} false; then :
28254  $as_echo_n "(cached) " >&6
28255else
28256  case $BUILD_CXX in
28257  [\\/]* | ?:[\\/]*)
28258  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28259  ;;
28260  *)
28261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28262for as_dir in $PATH
28263do
28264  IFS=$as_save_IFS
28265  test -z "$as_dir" && as_dir=.
28266    for ac_exec_ext in '' $ac_executable_extensions; do
28267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28268    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28270    break 2
28271  fi
28272done
28273  done
28274IFS=$as_save_IFS
28275
28276  ;;
28277esac
28278fi
28279BUILD_CXX=$ac_cv_path_BUILD_CXX
28280if test -n "$BUILD_CXX"; then
28281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28282$as_echo "$BUILD_CXX" >&6; }
28283else
28284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28285$as_echo "no" >&6; }
28286fi
28287
28288
28289  test -n "$BUILD_CXX" && break
28290done
28291
28292  else
28293    # The variable is set, but is it from the command line or the environment?
28294
28295    # Try to remove the string !BUILD_CXX! from our list.
28296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
28297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28298      # If it failed, the variable was not from the command line. Ignore it,
28299      # but warn the user (except for BASH, which is always set by the calling BASH).
28300      if test "xBUILD_CXX" != xBASH; then
28301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
28302$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
28303      fi
28304      # Try to locate tool using the code snippet
28305      for ac_prog in cl CC g++
28306do
28307  # Extract the first word of "$ac_prog", so it can be a program name with args.
28308set dummy $ac_prog; ac_word=$2
28309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28310$as_echo_n "checking for $ac_word... " >&6; }
28311if ${ac_cv_path_BUILD_CXX+:} false; then :
28312  $as_echo_n "(cached) " >&6
28313else
28314  case $BUILD_CXX in
28315  [\\/]* | ?:[\\/]*)
28316  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28317  ;;
28318  *)
28319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28320for as_dir in $PATH
28321do
28322  IFS=$as_save_IFS
28323  test -z "$as_dir" && as_dir=.
28324    for ac_exec_ext in '' $ac_executable_extensions; do
28325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28326    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28328    break 2
28329  fi
28330done
28331  done
28332IFS=$as_save_IFS
28333
28334  ;;
28335esac
28336fi
28337BUILD_CXX=$ac_cv_path_BUILD_CXX
28338if test -n "$BUILD_CXX"; then
28339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28340$as_echo "$BUILD_CXX" >&6; }
28341else
28342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28343$as_echo "no" >&6; }
28344fi
28345
28346
28347  test -n "$BUILD_CXX" && break
28348done
28349
28350    else
28351      # If it succeeded, then it was overridden by the user. We will use it
28352      # for the tool.
28353
28354      # First remove it from the list of overridden variables, so we can test
28355      # for unknown variables in the end.
28356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28357
28358      # Check if the provided tool contains a complete path.
28359      tool_specified="$BUILD_CXX"
28360      tool_basename="${tool_specified##*/}"
28361      if test "x$tool_basename" = "x$tool_specified"; then
28362        # A command without a complete path is provided, search $PATH.
28363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
28364$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
28365        # Extract the first word of "$tool_basename", so it can be a program name with args.
28366set dummy $tool_basename; ac_word=$2
28367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28368$as_echo_n "checking for $ac_word... " >&6; }
28369if ${ac_cv_path_BUILD_CXX+:} false; then :
28370  $as_echo_n "(cached) " >&6
28371else
28372  case $BUILD_CXX in
28373  [\\/]* | ?:[\\/]*)
28374  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28375  ;;
28376  *)
28377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28378for as_dir in $PATH
28379do
28380  IFS=$as_save_IFS
28381  test -z "$as_dir" && as_dir=.
28382    for ac_exec_ext in '' $ac_executable_extensions; do
28383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28384    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28386    break 2
28387  fi
28388done
28389  done
28390IFS=$as_save_IFS
28391
28392  ;;
28393esac
28394fi
28395BUILD_CXX=$ac_cv_path_BUILD_CXX
28396if test -n "$BUILD_CXX"; then
28397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28398$as_echo "$BUILD_CXX" >&6; }
28399else
28400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28401$as_echo "no" >&6; }
28402fi
28403
28404
28405        if test "x$BUILD_CXX" = x; then
28406          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28407        fi
28408      else
28409        # Otherwise we believe it is a complete path. Use it as it is.
28410        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
28411$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
28412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
28413$as_echo_n "checking for BUILD_CXX... " >&6; }
28414        if test ! -x "$tool_specified"; then
28415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28416$as_echo "not found" >&6; }
28417          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
28418        fi
28419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28420$as_echo "$tool_specified" >&6; }
28421      fi
28422    fi
28423  fi
28424
28425
28426
28427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28428
28429  # First separate the path from the arguments. This will split at the first
28430  # space.
28431  complete="$BUILD_CXX"
28432  path="${complete%% *}"
28433  tmp="$complete EOL"
28434  arguments="${tmp#* }"
28435
28436  # Input might be given as Windows format, start by converting to
28437  # unix format.
28438  new_path=`$CYGPATH -u "$path"`
28439
28440  # Now try to locate executable using which
28441  new_path=`$WHICH "$new_path" 2> /dev/null`
28442  # bat and cmd files are not always considered executable in cygwin causing which
28443  # to not find them
28444  if test "x$new_path" = x \
28445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28447    new_path=`$CYGPATH -u "$path"`
28448  fi
28449  if test "x$new_path" = x; then
28450    # Oops. Which didn't find the executable.
28451    # The splitting of arguments from the executable at a space might have been incorrect,
28452    # since paths with space are more likely in Windows. Give it another try with the whole
28453    # argument.
28454    path="$complete"
28455    arguments="EOL"
28456    new_path=`$CYGPATH -u "$path"`
28457    new_path=`$WHICH "$new_path" 2> /dev/null`
28458    # bat and cmd files are not always considered executable in cygwin causing which
28459    # to not find them
28460    if test "x$new_path" = x \
28461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28463      new_path=`$CYGPATH -u "$path"`
28464    fi
28465    if test "x$new_path" = x; then
28466      # It's still not found. Now this is an unrecoverable error.
28467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28468$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28469      has_space=`$ECHO "$complete" | $GREP " "`
28470      if test "x$has_space" != x; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28473      fi
28474      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28475    fi
28476  fi
28477
28478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28481  # "foo.exe" is OK but "foo" is an error.
28482  #
28483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28484  # It is also a way to make sure we got the proper file name for the real test later on.
28485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28486  if test "x$test_shortpath" = x; then
28487    # Short path failed, file does not exist as specified.
28488    # Try adding .exe or .cmd
28489    if test -f "${new_path}.exe"; then
28490      input_to_shortpath="${new_path}.exe"
28491    elif test -f "${new_path}.cmd"; then
28492      input_to_shortpath="${new_path}.cmd"
28493    else
28494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
28495$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
28496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28498      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28499    fi
28500  else
28501    input_to_shortpath="$new_path"
28502  fi
28503
28504  # Call helper function which possibly converts this using DOS-style short mode.
28505  # If so, the updated path is stored in $new_path.
28506  new_path="$input_to_shortpath"
28507
28508  input_path="$input_to_shortpath"
28509  # Check if we need to convert this using DOS-style short mode. If the path
28510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28511  # take no chances and rewrite it.
28512  # Note: m4 eats our [], so we need to use [ and ] instead.
28513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28514  if test "x$has_forbidden_chars" != x; then
28515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28519      # Going to short mode and back again did indeed matter. Since short mode is
28520      # case insensitive, let's make it lowercase to improve readability.
28521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28522      # Now convert it back to Unix-stile (cygpath)
28523      input_path=`$CYGPATH -u "$shortmode_path"`
28524      new_path="$input_path"
28525    fi
28526  fi
28527
28528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28529  if test "x$test_cygdrive_prefix" = x; then
28530    # As a simple fix, exclude /usr/bin since it's not a real path.
28531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28533      # a path prefixed by /cygdrive for fixpath to work.
28534      new_path="$CYGWIN_ROOT_PATH$input_path"
28535    fi
28536  fi
28537
28538  # remove trailing .exe if any
28539  new_path="${new_path/%.exe/}"
28540
28541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28542
28543  # First separate the path from the arguments. This will split at the first
28544  # space.
28545  complete="$BUILD_CXX"
28546  path="${complete%% *}"
28547  tmp="$complete EOL"
28548  arguments="${tmp#* }"
28549
28550  # Input might be given as Windows format, start by converting to
28551  # unix format.
28552  new_path="$path"
28553
28554  windows_path="$new_path"
28555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28556    unix_path=`$CYGPATH -u "$windows_path"`
28557    new_path="$unix_path"
28558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28560    new_path="$unix_path"
28561  fi
28562
28563
28564  # Now try to locate executable using which
28565  new_path=`$WHICH "$new_path" 2> /dev/null`
28566
28567  if test "x$new_path" = x; then
28568    # Oops. Which didn't find the executable.
28569    # The splitting of arguments from the executable at a space might have been incorrect,
28570    # since paths with space are more likely in Windows. Give it another try with the whole
28571    # argument.
28572    path="$complete"
28573    arguments="EOL"
28574    new_path="$path"
28575
28576  windows_path="$new_path"
28577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28578    unix_path=`$CYGPATH -u "$windows_path"`
28579    new_path="$unix_path"
28580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28582    new_path="$unix_path"
28583  fi
28584
28585
28586    new_path=`$WHICH "$new_path" 2> /dev/null`
28587
28588    if test "x$new_path" = x; then
28589      # It's still not found. Now this is an unrecoverable error.
28590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28591$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28592      has_space=`$ECHO "$complete" | $GREP " "`
28593      if test "x$has_space" != x; then
28594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28596      fi
28597      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28598    fi
28599  fi
28600
28601  # Now new_path has a complete unix path to the binary
28602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28603    # Keep paths in /bin as-is, but remove trailing .exe if any
28604    new_path="${new_path/%.exe/}"
28605    # Do not save /bin paths to all_fixpath_prefixes!
28606  else
28607    # Not in mixed or Windows style, start by that.
28608    new_path=`cmd //c echo $new_path`
28609
28610  input_path="$new_path"
28611  # Check if we need to convert this using DOS-style short mode. If the path
28612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28613  # take no chances and rewrite it.
28614  # Note: m4 eats our [], so we need to use [ and ] instead.
28615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28616  if test "x$has_forbidden_chars" != x; then
28617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28619  fi
28620
28621    # Output is in $new_path
28622
28623  windows_path="$new_path"
28624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28625    unix_path=`$CYGPATH -u "$windows_path"`
28626    new_path="$unix_path"
28627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28629    new_path="$unix_path"
28630  fi
28631
28632    # remove trailing .exe if any
28633    new_path="${new_path/%.exe/}"
28634
28635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28637  fi
28638
28639  else
28640    # We're on a posix platform. Hooray! :)
28641    # First separate the path from the arguments. This will split at the first
28642    # space.
28643    complete="$BUILD_CXX"
28644    path="${complete%% *}"
28645    tmp="$complete EOL"
28646    arguments="${tmp#* }"
28647
28648    # Cannot rely on the command "which" here since it doesn't always work.
28649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28650    if test -z "$is_absolute_path"; then
28651      # Path to executable is not absolute. Find it.
28652      IFS_save="$IFS"
28653      IFS=:
28654      for p in $PATH; do
28655        if test -f "$p/$path" && test -x "$p/$path"; then
28656          new_path="$p/$path"
28657          break
28658        fi
28659      done
28660      IFS="$IFS_save"
28661    else
28662      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
28663$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
28664      new_path="$path"
28665    fi
28666
28667    if test "x$new_path" = x; then
28668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28669$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28670      has_space=`$ECHO "$complete" | $GREP " "`
28671      if test "x$has_space" != x; then
28672        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28673$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28674      fi
28675      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28676    fi
28677  fi
28678
28679  # Now join together the path and the arguments once again
28680  if test "x$arguments" != xEOL; then
28681    new_complete="$new_path ${arguments% *}"
28682  else
28683    new_complete="$new_path"
28684  fi
28685
28686  if test "x$complete" != "x$new_complete"; then
28687    BUILD_CXX="$new_complete"
28688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
28689$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
28690  fi
28691
28692
28693
28694  # Publish this variable in the help.
28695
28696
28697  if test "x$BUILD_LD" = x; then
28698    # The variable is not set by user, try to locate tool using the code snippet
28699    for ac_prog in ld
28700do
28701  # Extract the first word of "$ac_prog", so it can be a program name with args.
28702set dummy $ac_prog; ac_word=$2
28703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28704$as_echo_n "checking for $ac_word... " >&6; }
28705if ${ac_cv_path_BUILD_LD+:} false; then :
28706  $as_echo_n "(cached) " >&6
28707else
28708  case $BUILD_LD in
28709  [\\/]* | ?:[\\/]*)
28710  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28711  ;;
28712  *)
28713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28714for as_dir in $PATH
28715do
28716  IFS=$as_save_IFS
28717  test -z "$as_dir" && as_dir=.
28718    for ac_exec_ext in '' $ac_executable_extensions; do
28719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28720    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28722    break 2
28723  fi
28724done
28725  done
28726IFS=$as_save_IFS
28727
28728  ;;
28729esac
28730fi
28731BUILD_LD=$ac_cv_path_BUILD_LD
28732if test -n "$BUILD_LD"; then
28733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28734$as_echo "$BUILD_LD" >&6; }
28735else
28736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28737$as_echo "no" >&6; }
28738fi
28739
28740
28741  test -n "$BUILD_LD" && break
28742done
28743
28744  else
28745    # The variable is set, but is it from the command line or the environment?
28746
28747    # Try to remove the string !BUILD_LD! from our list.
28748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
28749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28750      # If it failed, the variable was not from the command line. Ignore it,
28751      # but warn the user (except for BASH, which is always set by the calling BASH).
28752      if test "xBUILD_LD" != xBASH; then
28753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
28754$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
28755      fi
28756      # Try to locate tool using the code snippet
28757      for ac_prog in ld
28758do
28759  # Extract the first word of "$ac_prog", so it can be a program name with args.
28760set dummy $ac_prog; ac_word=$2
28761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28762$as_echo_n "checking for $ac_word... " >&6; }
28763if ${ac_cv_path_BUILD_LD+:} false; then :
28764  $as_echo_n "(cached) " >&6
28765else
28766  case $BUILD_LD in
28767  [\\/]* | ?:[\\/]*)
28768  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28769  ;;
28770  *)
28771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28772for as_dir in $PATH
28773do
28774  IFS=$as_save_IFS
28775  test -z "$as_dir" && as_dir=.
28776    for ac_exec_ext in '' $ac_executable_extensions; do
28777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28778    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28780    break 2
28781  fi
28782done
28783  done
28784IFS=$as_save_IFS
28785
28786  ;;
28787esac
28788fi
28789BUILD_LD=$ac_cv_path_BUILD_LD
28790if test -n "$BUILD_LD"; then
28791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28792$as_echo "$BUILD_LD" >&6; }
28793else
28794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28795$as_echo "no" >&6; }
28796fi
28797
28798
28799  test -n "$BUILD_LD" && break
28800done
28801
28802    else
28803      # If it succeeded, then it was overridden by the user. We will use it
28804      # for the tool.
28805
28806      # First remove it from the list of overridden variables, so we can test
28807      # for unknown variables in the end.
28808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28809
28810      # Check if the provided tool contains a complete path.
28811      tool_specified="$BUILD_LD"
28812      tool_basename="${tool_specified##*/}"
28813      if test "x$tool_basename" = "x$tool_specified"; then
28814        # A command without a complete path is provided, search $PATH.
28815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
28816$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
28817        # Extract the first word of "$tool_basename", so it can be a program name with args.
28818set dummy $tool_basename; ac_word=$2
28819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28820$as_echo_n "checking for $ac_word... " >&6; }
28821if ${ac_cv_path_BUILD_LD+:} false; then :
28822  $as_echo_n "(cached) " >&6
28823else
28824  case $BUILD_LD in
28825  [\\/]* | ?:[\\/]*)
28826  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28827  ;;
28828  *)
28829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28830for as_dir in $PATH
28831do
28832  IFS=$as_save_IFS
28833  test -z "$as_dir" && as_dir=.
28834    for ac_exec_ext in '' $ac_executable_extensions; do
28835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28836    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28838    break 2
28839  fi
28840done
28841  done
28842IFS=$as_save_IFS
28843
28844  ;;
28845esac
28846fi
28847BUILD_LD=$ac_cv_path_BUILD_LD
28848if test -n "$BUILD_LD"; then
28849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28850$as_echo "$BUILD_LD" >&6; }
28851else
28852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28853$as_echo "no" >&6; }
28854fi
28855
28856
28857        if test "x$BUILD_LD" = x; then
28858          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28859        fi
28860      else
28861        # Otherwise we believe it is a complete path. Use it as it is.
28862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
28863$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
28864        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
28865$as_echo_n "checking for BUILD_LD... " >&6; }
28866        if test ! -x "$tool_specified"; then
28867          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28868$as_echo "not found" >&6; }
28869          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
28870        fi
28871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28872$as_echo "$tool_specified" >&6; }
28873      fi
28874    fi
28875  fi
28876
28877
28878
28879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28880
28881  # First separate the path from the arguments. This will split at the first
28882  # space.
28883  complete="$BUILD_LD"
28884  path="${complete%% *}"
28885  tmp="$complete EOL"
28886  arguments="${tmp#* }"
28887
28888  # Input might be given as Windows format, start by converting to
28889  # unix format.
28890  new_path=`$CYGPATH -u "$path"`
28891
28892  # Now try to locate executable using which
28893  new_path=`$WHICH "$new_path" 2> /dev/null`
28894  # bat and cmd files are not always considered executable in cygwin causing which
28895  # to not find them
28896  if test "x$new_path" = x \
28897      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28898      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28899    new_path=`$CYGPATH -u "$path"`
28900  fi
28901  if test "x$new_path" = x; then
28902    # Oops. Which didn't find the executable.
28903    # The splitting of arguments from the executable at a space might have been incorrect,
28904    # since paths with space are more likely in Windows. Give it another try with the whole
28905    # argument.
28906    path="$complete"
28907    arguments="EOL"
28908    new_path=`$CYGPATH -u "$path"`
28909    new_path=`$WHICH "$new_path" 2> /dev/null`
28910    # bat and cmd files are not always considered executable in cygwin causing which
28911    # to not find them
28912    if test "x$new_path" = x \
28913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28915      new_path=`$CYGPATH -u "$path"`
28916    fi
28917    if test "x$new_path" = x; then
28918      # It's still not found. Now this is an unrecoverable error.
28919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
28920$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
28921      has_space=`$ECHO "$complete" | $GREP " "`
28922      if test "x$has_space" != x; then
28923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28925      fi
28926      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28927    fi
28928  fi
28929
28930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28933  # "foo.exe" is OK but "foo" is an error.
28934  #
28935  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28936  # It is also a way to make sure we got the proper file name for the real test later on.
28937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28938  if test "x$test_shortpath" = x; then
28939    # Short path failed, file does not exist as specified.
28940    # Try adding .exe or .cmd
28941    if test -f "${new_path}.exe"; then
28942      input_to_shortpath="${new_path}.exe"
28943    elif test -f "${new_path}.cmd"; then
28944      input_to_shortpath="${new_path}.cmd"
28945    else
28946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
28947$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
28948      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28949$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28950      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28951    fi
28952  else
28953    input_to_shortpath="$new_path"
28954  fi
28955
28956  # Call helper function which possibly converts this using DOS-style short mode.
28957  # If so, the updated path is stored in $new_path.
28958  new_path="$input_to_shortpath"
28959
28960  input_path="$input_to_shortpath"
28961  # Check if we need to convert this using DOS-style short mode. If the path
28962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28963  # take no chances and rewrite it.
28964  # Note: m4 eats our [], so we need to use [ and ] instead.
28965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28966  if test "x$has_forbidden_chars" != x; then
28967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28971      # Going to short mode and back again did indeed matter. Since short mode is
28972      # case insensitive, let's make it lowercase to improve readability.
28973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28974      # Now convert it back to Unix-stile (cygpath)
28975      input_path=`$CYGPATH -u "$shortmode_path"`
28976      new_path="$input_path"
28977    fi
28978  fi
28979
28980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28981  if test "x$test_cygdrive_prefix" = x; then
28982    # As a simple fix, exclude /usr/bin since it's not a real path.
28983    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28985      # a path prefixed by /cygdrive for fixpath to work.
28986      new_path="$CYGWIN_ROOT_PATH$input_path"
28987    fi
28988  fi
28989
28990  # remove trailing .exe if any
28991  new_path="${new_path/%.exe/}"
28992
28993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28994
28995  # First separate the path from the arguments. This will split at the first
28996  # space.
28997  complete="$BUILD_LD"
28998  path="${complete%% *}"
28999  tmp="$complete EOL"
29000  arguments="${tmp#* }"
29001
29002  # Input might be given as Windows format, start by converting to
29003  # unix format.
29004  new_path="$path"
29005
29006  windows_path="$new_path"
29007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29008    unix_path=`$CYGPATH -u "$windows_path"`
29009    new_path="$unix_path"
29010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29012    new_path="$unix_path"
29013  fi
29014
29015
29016  # Now try to locate executable using which
29017  new_path=`$WHICH "$new_path" 2> /dev/null`
29018
29019  if test "x$new_path" = x; then
29020    # Oops. Which didn't find the executable.
29021    # The splitting of arguments from the executable at a space might have been incorrect,
29022    # since paths with space are more likely in Windows. Give it another try with the whole
29023    # argument.
29024    path="$complete"
29025    arguments="EOL"
29026    new_path="$path"
29027
29028  windows_path="$new_path"
29029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29030    unix_path=`$CYGPATH -u "$windows_path"`
29031    new_path="$unix_path"
29032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29034    new_path="$unix_path"
29035  fi
29036
29037
29038    new_path=`$WHICH "$new_path" 2> /dev/null`
29039
29040    if test "x$new_path" = x; then
29041      # It's still not found. Now this is an unrecoverable error.
29042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29043$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29044      has_space=`$ECHO "$complete" | $GREP " "`
29045      if test "x$has_space" != x; then
29046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29048      fi
29049      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29050    fi
29051  fi
29052
29053  # Now new_path has a complete unix path to the binary
29054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29055    # Keep paths in /bin as-is, but remove trailing .exe if any
29056    new_path="${new_path/%.exe/}"
29057    # Do not save /bin paths to all_fixpath_prefixes!
29058  else
29059    # Not in mixed or Windows style, start by that.
29060    new_path=`cmd //c echo $new_path`
29061
29062  input_path="$new_path"
29063  # Check if we need to convert this using DOS-style short mode. If the path
29064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29065  # take no chances and rewrite it.
29066  # Note: m4 eats our [], so we need to use [ and ] instead.
29067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29068  if test "x$has_forbidden_chars" != x; then
29069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29071  fi
29072
29073    # Output is in $new_path
29074
29075  windows_path="$new_path"
29076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29077    unix_path=`$CYGPATH -u "$windows_path"`
29078    new_path="$unix_path"
29079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29081    new_path="$unix_path"
29082  fi
29083
29084    # remove trailing .exe if any
29085    new_path="${new_path/%.exe/}"
29086
29087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29089  fi
29090
29091  else
29092    # We're on a posix platform. Hooray! :)
29093    # First separate the path from the arguments. This will split at the first
29094    # space.
29095    complete="$BUILD_LD"
29096    path="${complete%% *}"
29097    tmp="$complete EOL"
29098    arguments="${tmp#* }"
29099
29100    # Cannot rely on the command "which" here since it doesn't always work.
29101    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29102    if test -z "$is_absolute_path"; then
29103      # Path to executable is not absolute. Find it.
29104      IFS_save="$IFS"
29105      IFS=:
29106      for p in $PATH; do
29107        if test -f "$p/$path" && test -x "$p/$path"; then
29108          new_path="$p/$path"
29109          break
29110        fi
29111      done
29112      IFS="$IFS_save"
29113    else
29114      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
29115$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
29116      new_path="$path"
29117    fi
29118
29119    if test "x$new_path" = x; then
29120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29121$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29122      has_space=`$ECHO "$complete" | $GREP " "`
29123      if test "x$has_space" != x; then
29124        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29125$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29126      fi
29127      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29128    fi
29129  fi
29130
29131  # Now join together the path and the arguments once again
29132  if test "x$arguments" != xEOL; then
29133    new_complete="$new_path ${arguments% *}"
29134  else
29135    new_complete="$new_path"
29136  fi
29137
29138  if test "x$complete" != "x$new_complete"; then
29139    BUILD_LD="$new_complete"
29140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
29141$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
29142  fi
29143
29144  fi
29145
29146
29147
29148
29149  # If a devkit is found on the builddeps server, then prepend its path to the
29150  # PATH variable. If there are cross compilers available in the devkit, these
29151  # will be found by AC_PROG_CC et al.
29152  DEVKIT=
29153
29154
29155  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29156    # Source the builddeps file again, to make sure it uses the latest variables!
29157    . $builddepsfile
29158    # Look for a target and build machine specific resource!
29159    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29160    if test "x$resource" = x; then
29161      # Ok, lets instead look for a target specific resource
29162      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
29163    fi
29164    if test "x$resource" = x; then
29165      # Ok, lets instead look for a build specific resource
29166      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
29167    fi
29168    if test "x$resource" = x; then
29169      # Ok, lets instead look for a generic resource
29170      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
29171      resource=${builddep_devkit}
29172    fi
29173    if test "x$resource" != x; then
29174      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
29175$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
29176      # If the resource in the builddeps.conf file is an existing directory,
29177      # for example /java/linux/cups
29178      if test -d ${resource}; then
29179        depdir=${resource}
29180      else
29181
29182  # devkit is for example mymodule
29183  # $resource is for example libs/general/libmymod_1_2_3.zip
29184  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29185  # $with_builddeps_dir is for example /localhome/builddeps
29186  # depdir is the name of the variable into which we store the depdir, eg MYMOD
29187  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29188  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29189  filename=`basename $resource`
29190  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29191  filebase=${filename%%.*}
29192  extension=${filename#*.}
29193  installdir=$with_builddeps_dir/$filebase
29194  if test ! -f $installdir/$filename.unpacked; then
29195    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
29196$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29197    if test ! -d $installdir; then
29198      mkdir -p $installdir
29199    fi
29200    if test ! -d $installdir; then
29201      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29202    fi
29203    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
29204    touch $tmpfile
29205    if test ! -f $tmpfile; then
29206      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29207    fi
29208
29209  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29210  # $tmpfile is the local file name for the downloaded file.
29211  VALID_TOOL=no
29212  if test "x$BDEPS_FTP" = xwget; then
29213    VALID_TOOL=yes
29214    wget -O $tmpfile $with_builddeps_server/$resource
29215  fi
29216  if test "x$BDEPS_FTP" = xlftp; then
29217    VALID_TOOL=yes
29218    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29219  fi
29220  if test "x$BDEPS_FTP" = xftp; then
29221    VALID_TOOL=yes
29222    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29223    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29224    FTPUSERPWD=${FTPSERVER%%@*}
29225    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29226      FTPUSER=${userpwd%%:*}
29227      FTPPWD=${userpwd#*@}
29228      FTPSERVER=${FTPSERVER#*@}
29229    else
29230      FTPUSER=ftp
29231      FTPPWD=ftp
29232    fi
29233    # the "pass" command does not work on some
29234    # ftp clients (read ftp.exe) but if it works,
29235    # passive mode is better!
29236    ( \
29237        echo "user $FTPUSER $FTPPWD"        ; \
29238        echo "pass"                         ; \
29239        echo "bin"                          ; \
29240        echo "get $FTPPATH $tmpfile"              ; \
29241    ) | ftp -in $FTPSERVER
29242  fi
29243  if test "x$VALID_TOOL" != xyes; then
29244    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29245  fi
29246
29247    mv $tmpfile $installdir/$filename
29248    if test ! -s $installdir/$filename; then
29249      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29250    fi
29251    case "$extension" in
29252      zip)  echo "Unzipping $installdir/$filename..."
29253        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29254        ;;
29255      tar.gz) echo "Untaring $installdir/$filename..."
29256        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29257        ;;
29258      tgz) echo "Untaring $installdir/$filename..."
29259        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29260        ;;
29261      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29262        ;;
29263    esac
29264  fi
29265  if test -f $installdir/$filename.unpacked; then
29266    depdir=$installdir
29267  fi
29268
29269      fi
29270      # Source the builddeps file again, because in the previous command, the depdir
29271      # was updated to point at the current build dependency install directory.
29272      . $builddepsfile
29273      # Now extract variables from the builddeps.conf files.
29274      theroot=${builddep_devkit_ROOT}
29275      thecflags=${builddep_devkit_CFLAGS}
29276      thelibs=${builddep_devkit_LIBS}
29277      if test "x$depdir" = x; then
29278        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
29279      fi
29280      DEVKIT=$depdir
29281      if test "x$theroot" != x; then
29282        DEVKIT="$theroot"
29283      fi
29284      if test "x$thecflags" != x; then
29285        DEVKIT_CFLAGS="$thecflags"
29286      fi
29287      if test "x$thelibs" != x; then
29288        DEVKIT_LIBS="$thelibs"
29289      fi
29290
29291        # Found devkit
29292        PATH="$DEVKIT/bin:$PATH"
29293        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
29294        if test "x$x_includes" = "xNONE"; then
29295          x_includes="$SYS_ROOT/usr/include/X11"
29296        fi
29297        if test "x$x_libraries" = "xNONE"; then
29298          x_libraries="$SYS_ROOT/usr/lib"
29299        fi
29300
29301
29302    fi
29303
29304  fi
29305
29306
29307  # Store the CFLAGS etal passed to the configure script.
29308  ORG_CFLAGS="$CFLAGS"
29309  ORG_CXXFLAGS="$CXXFLAGS"
29310  ORG_OBJCFLAGS="$OBJCFLAGS"
29311
29312  # autoconf magic only relies on PATH, so update it if tools dir is specified
29313  OLD_PATH="$PATH"
29314  if test "x$TOOLS_DIR" != x; then
29315    PATH=$TOOLS_DIR:$PATH
29316  fi
29317
29318
29319  ### Locate C compiler (CC)
29320
29321  # On windows, only cl.exe is supported.
29322  # On Solaris, cc is preferred to gcc.
29323  # Elsewhere, gcc is preferred to cc.
29324
29325  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29326    COMPILER_CHECK_LIST="cl"
29327  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29328    COMPILER_CHECK_LIST="cc gcc"
29329  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29330    # Do not probe for cc on AIX.
29331    COMPILER_CHECK_LIST="xlc_r"
29332  else
29333    COMPILER_CHECK_LIST="gcc cc"
29334  fi
29335
29336
29337  COMPILER_NAME=C
29338  SEARCH_LIST="$COMPILER_CHECK_LIST"
29339
29340  if test "x$CC" != x; then
29341    # User has supplied compiler name already, always let that override.
29342    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29343$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29344    if test "x`basename $CC`" = "x$CC"; then
29345      # A command without a complete path is provided, search $PATH.
29346
29347      for ac_prog in $CC
29348do
29349  # Extract the first word of "$ac_prog", so it can be a program name with args.
29350set dummy $ac_prog; ac_word=$2
29351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29352$as_echo_n "checking for $ac_word... " >&6; }
29353if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29354  $as_echo_n "(cached) " >&6
29355else
29356  case $POTENTIAL_CC in
29357  [\\/]* | ?:[\\/]*)
29358  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29359  ;;
29360  *)
29361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29362for as_dir in $PATH
29363do
29364  IFS=$as_save_IFS
29365  test -z "$as_dir" && as_dir=.
29366    for ac_exec_ext in '' $ac_executable_extensions; do
29367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29368    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29370    break 2
29371  fi
29372done
29373  done
29374IFS=$as_save_IFS
29375
29376  ;;
29377esac
29378fi
29379POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29380if test -n "$POTENTIAL_CC"; then
29381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29382$as_echo "$POTENTIAL_CC" >&6; }
29383else
29384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29385$as_echo "no" >&6; }
29386fi
29387
29388
29389  test -n "$POTENTIAL_CC" && break
29390done
29391
29392      if test "x$POTENTIAL_CC" != x; then
29393        CC=$POTENTIAL_CC
29394      else
29395        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29396      fi
29397    else
29398      # Otherwise it might already be a complete path
29399      if test ! -x "$CC"; then
29400        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29401      fi
29402    fi
29403  else
29404    # No user supplied value. Locate compiler ourselves
29405    CC=
29406    # If TOOLS_DIR is set, check for all compiler names in there first
29407    # before checking the rest of the PATH.
29408    if test -n "$TOOLS_DIR"; then
29409      PATH_save="$PATH"
29410      PATH="$TOOLS_DIR"
29411      for ac_prog in $SEARCH_LIST
29412do
29413  # Extract the first word of "$ac_prog", so it can be a program name with args.
29414set dummy $ac_prog; ac_word=$2
29415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29416$as_echo_n "checking for $ac_word... " >&6; }
29417if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
29418  $as_echo_n "(cached) " >&6
29419else
29420  case $TOOLS_DIR_CC in
29421  [\\/]* | ?:[\\/]*)
29422  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
29423  ;;
29424  *)
29425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29426for as_dir in $PATH
29427do
29428  IFS=$as_save_IFS
29429  test -z "$as_dir" && as_dir=.
29430    for ac_exec_ext in '' $ac_executable_extensions; do
29431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29432    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
29433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29434    break 2
29435  fi
29436done
29437  done
29438IFS=$as_save_IFS
29439
29440  ;;
29441esac
29442fi
29443TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
29444if test -n "$TOOLS_DIR_CC"; then
29445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
29446$as_echo "$TOOLS_DIR_CC" >&6; }
29447else
29448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29449$as_echo "no" >&6; }
29450fi
29451
29452
29453  test -n "$TOOLS_DIR_CC" && break
29454done
29455
29456      CC=$TOOLS_DIR_CC
29457      PATH="$PATH_save"
29458    fi
29459
29460    # AC_PATH_PROGS can't be run multiple times with the same variable,
29461    # so create a new name for this run.
29462    if test "x$CC" = x; then
29463      for ac_prog in $SEARCH_LIST
29464do
29465  # Extract the first word of "$ac_prog", so it can be a program name with args.
29466set dummy $ac_prog; ac_word=$2
29467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29468$as_echo_n "checking for $ac_word... " >&6; }
29469if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29470  $as_echo_n "(cached) " >&6
29471else
29472  case $POTENTIAL_CC in
29473  [\\/]* | ?:[\\/]*)
29474  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29475  ;;
29476  *)
29477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29478for as_dir in $PATH
29479do
29480  IFS=$as_save_IFS
29481  test -z "$as_dir" && as_dir=.
29482    for ac_exec_ext in '' $ac_executable_extensions; do
29483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29484    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29486    break 2
29487  fi
29488done
29489  done
29490IFS=$as_save_IFS
29491
29492  ;;
29493esac
29494fi
29495POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29496if test -n "$POTENTIAL_CC"; then
29497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29498$as_echo "$POTENTIAL_CC" >&6; }
29499else
29500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29501$as_echo "no" >&6; }
29502fi
29503
29504
29505  test -n "$POTENTIAL_CC" && break
29506done
29507
29508      CC=$POTENTIAL_CC
29509    fi
29510
29511    if test "x$CC" = x; then
29512
29513  # Print a helpful message on how to acquire the necessary build dependency.
29514  # devkit is the help tag: freetype, cups, pulse, alsa etc
29515  MISSING_DEPENDENCY=devkit
29516
29517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29518    cygwin_help $MISSING_DEPENDENCY
29519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29520    msys_help $MISSING_DEPENDENCY
29521  else
29522    PKGHANDLER_COMMAND=
29523
29524    case $PKGHANDLER in
29525      apt-get)
29526        apt_help     $MISSING_DEPENDENCY ;;
29527      yum)
29528        yum_help     $MISSING_DEPENDENCY ;;
29529      port)
29530        port_help    $MISSING_DEPENDENCY ;;
29531      pkgutil)
29532        pkgutil_help $MISSING_DEPENDENCY ;;
29533      pkgadd)
29534        pkgadd_help  $MISSING_DEPENDENCY ;;
29535    esac
29536
29537    if test "x$PKGHANDLER_COMMAND" != x; then
29538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29539    fi
29540  fi
29541
29542      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29543    fi
29544  fi
29545
29546  # Now we have a compiler binary in CC. Make sure it's okay.
29547
29548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29549
29550  # First separate the path from the arguments. This will split at the first
29551  # space.
29552  complete="$CC"
29553  path="${complete%% *}"
29554  tmp="$complete EOL"
29555  arguments="${tmp#* }"
29556
29557  # Input might be given as Windows format, start by converting to
29558  # unix format.
29559  new_path=`$CYGPATH -u "$path"`
29560
29561  # Now try to locate executable using which
29562  new_path=`$WHICH "$new_path" 2> /dev/null`
29563  # bat and cmd files are not always considered executable in cygwin causing which
29564  # to not find them
29565  if test "x$new_path" = x \
29566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29568    new_path=`$CYGPATH -u "$path"`
29569  fi
29570  if test "x$new_path" = x; then
29571    # Oops. Which didn't find the executable.
29572    # The splitting of arguments from the executable at a space might have been incorrect,
29573    # since paths with space are more likely in Windows. Give it another try with the whole
29574    # argument.
29575    path="$complete"
29576    arguments="EOL"
29577    new_path=`$CYGPATH -u "$path"`
29578    new_path=`$WHICH "$new_path" 2> /dev/null`
29579    # bat and cmd files are not always considered executable in cygwin causing which
29580    # to not find them
29581    if test "x$new_path" = x \
29582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29584      new_path=`$CYGPATH -u "$path"`
29585    fi
29586    if test "x$new_path" = x; then
29587      # It's still not found. Now this is an unrecoverable error.
29588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29589$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29590      has_space=`$ECHO "$complete" | $GREP " "`
29591      if test "x$has_space" != x; then
29592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29594      fi
29595      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29596    fi
29597  fi
29598
29599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29602  # "foo.exe" is OK but "foo" is an error.
29603  #
29604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29605  # It is also a way to make sure we got the proper file name for the real test later on.
29606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29607  if test "x$test_shortpath" = x; then
29608    # Short path failed, file does not exist as specified.
29609    # Try adding .exe or .cmd
29610    if test -f "${new_path}.exe"; then
29611      input_to_shortpath="${new_path}.exe"
29612    elif test -f "${new_path}.cmd"; then
29613      input_to_shortpath="${new_path}.cmd"
29614    else
29615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29616$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29619      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29620    fi
29621  else
29622    input_to_shortpath="$new_path"
29623  fi
29624
29625  # Call helper function which possibly converts this using DOS-style short mode.
29626  # If so, the updated path is stored in $new_path.
29627  new_path="$input_to_shortpath"
29628
29629  input_path="$input_to_shortpath"
29630  # Check if we need to convert this using DOS-style short mode. If the path
29631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29632  # take no chances and rewrite it.
29633  # Note: m4 eats our [], so we need to use [ and ] instead.
29634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29635  if test "x$has_forbidden_chars" != x; then
29636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29640      # Going to short mode and back again did indeed matter. Since short mode is
29641      # case insensitive, let's make it lowercase to improve readability.
29642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29643      # Now convert it back to Unix-stile (cygpath)
29644      input_path=`$CYGPATH -u "$shortmode_path"`
29645      new_path="$input_path"
29646    fi
29647  fi
29648
29649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29650  if test "x$test_cygdrive_prefix" = x; then
29651    # As a simple fix, exclude /usr/bin since it's not a real path.
29652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29654      # a path prefixed by /cygdrive for fixpath to work.
29655      new_path="$CYGWIN_ROOT_PATH$input_path"
29656    fi
29657  fi
29658
29659  # remove trailing .exe if any
29660  new_path="${new_path/%.exe/}"
29661
29662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29663
29664  # First separate the path from the arguments. This will split at the first
29665  # space.
29666  complete="$CC"
29667  path="${complete%% *}"
29668  tmp="$complete EOL"
29669  arguments="${tmp#* }"
29670
29671  # Input might be given as Windows format, start by converting to
29672  # unix format.
29673  new_path="$path"
29674
29675  windows_path="$new_path"
29676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29677    unix_path=`$CYGPATH -u "$windows_path"`
29678    new_path="$unix_path"
29679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29681    new_path="$unix_path"
29682  fi
29683
29684
29685  # Now try to locate executable using which
29686  new_path=`$WHICH "$new_path" 2> /dev/null`
29687
29688  if test "x$new_path" = x; then
29689    # Oops. Which didn't find the executable.
29690    # The splitting of arguments from the executable at a space might have been incorrect,
29691    # since paths with space are more likely in Windows. Give it another try with the whole
29692    # argument.
29693    path="$complete"
29694    arguments="EOL"
29695    new_path="$path"
29696
29697  windows_path="$new_path"
29698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29699    unix_path=`$CYGPATH -u "$windows_path"`
29700    new_path="$unix_path"
29701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29703    new_path="$unix_path"
29704  fi
29705
29706
29707    new_path=`$WHICH "$new_path" 2> /dev/null`
29708
29709    if test "x$new_path" = x; then
29710      # It's still not found. Now this is an unrecoverable error.
29711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29712$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29713      has_space=`$ECHO "$complete" | $GREP " "`
29714      if test "x$has_space" != x; then
29715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29717      fi
29718      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29719    fi
29720  fi
29721
29722  # Now new_path has a complete unix path to the binary
29723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29724    # Keep paths in /bin as-is, but remove trailing .exe if any
29725    new_path="${new_path/%.exe/}"
29726    # Do not save /bin paths to all_fixpath_prefixes!
29727  else
29728    # Not in mixed or Windows style, start by that.
29729    new_path=`cmd //c echo $new_path`
29730
29731  input_path="$new_path"
29732  # Check if we need to convert this using DOS-style short mode. If the path
29733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29734  # take no chances and rewrite it.
29735  # Note: m4 eats our [], so we need to use [ and ] instead.
29736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29737  if test "x$has_forbidden_chars" != x; then
29738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29740  fi
29741
29742    # Output is in $new_path
29743
29744  windows_path="$new_path"
29745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29746    unix_path=`$CYGPATH -u "$windows_path"`
29747    new_path="$unix_path"
29748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29750    new_path="$unix_path"
29751  fi
29752
29753    # remove trailing .exe if any
29754    new_path="${new_path/%.exe/}"
29755
29756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29758  fi
29759
29760  else
29761    # We're on a posix platform. Hooray! :)
29762    # First separate the path from the arguments. This will split at the first
29763    # space.
29764    complete="$CC"
29765    path="${complete%% *}"
29766    tmp="$complete EOL"
29767    arguments="${tmp#* }"
29768
29769    # Cannot rely on the command "which" here since it doesn't always work.
29770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29771    if test -z "$is_absolute_path"; then
29772      # Path to executable is not absolute. Find it.
29773      IFS_save="$IFS"
29774      IFS=:
29775      for p in $PATH; do
29776        if test -f "$p/$path" && test -x "$p/$path"; then
29777          new_path="$p/$path"
29778          break
29779        fi
29780      done
29781      IFS="$IFS_save"
29782    else
29783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
29784$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
29785      new_path="$path"
29786    fi
29787
29788    if test "x$new_path" = x; then
29789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29790$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29791      has_space=`$ECHO "$complete" | $GREP " "`
29792      if test "x$has_space" != x; then
29793        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29795      fi
29796      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29797    fi
29798  fi
29799
29800  # Now join together the path and the arguments once again
29801  if test "x$arguments" != xEOL; then
29802    new_complete="$new_path ${arguments% *}"
29803  else
29804    new_complete="$new_path"
29805  fi
29806
29807  if test "x$complete" != "x$new_complete"; then
29808    CC="$new_complete"
29809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29810$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29811  fi
29812
29813  TEST_COMPILER="$CC"
29814  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29815  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29816  if test "x$OPENJDK_BUILD_OS" != xaix; then
29817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29818$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29819
29820  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29821    # Follow a chain of symbolic links. Use readlink
29822    # where it exists, else fall back to horribly
29823    # complicated shell code.
29824    if test "x$READLINK_TESTED" != yes; then
29825      # On MacOSX there is a readlink tool with a different
29826      # purpose than the GNU readlink tool. Check the found readlink.
29827      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29828      if test "x$ISGNU" = x; then
29829        # A readlink that we do not know how to use.
29830        # Are there other non-GNU readlinks out there?
29831        READLINK_TESTED=yes
29832        READLINK=
29833      fi
29834    fi
29835
29836    if test "x$READLINK" != x; then
29837      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29838    else
29839      # Save the current directory for restoring afterwards
29840      STARTDIR=$PWD
29841      COUNTER=0
29842      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29843      sym_link_file=`$BASENAME $TEST_COMPILER`
29844      cd $sym_link_dir
29845      # Use -P flag to resolve symlinks in directories.
29846      cd `$THEPWDCMD -P`
29847      sym_link_dir=`$THEPWDCMD -P`
29848      # Resolve file symlinks
29849      while test $COUNTER -lt 20; do
29850        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29851        if test "x$ISLINK" == x; then
29852          # This is not a symbolic link! We are done!
29853          break
29854        fi
29855        # Again resolve directory symlinks since the target of the just found
29856        # link could be in a different directory
29857        cd `$DIRNAME $ISLINK`
29858        sym_link_dir=`$THEPWDCMD -P`
29859        sym_link_file=`$BASENAME $ISLINK`
29860        let COUNTER=COUNTER+1
29861      done
29862      cd $STARTDIR
29863      TEST_COMPILER=$sym_link_dir/$sym_link_file
29864    fi
29865  fi
29866
29867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29868$as_echo "$TEST_COMPILER" >&6; }
29869  fi
29870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29871$as_echo_n "checking if CC is disguised ccache... " >&6; }
29872
29873  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29874  if test "x$COMPILER_BASENAME" = "xccache"; then
29875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29876$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29877    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29878    # We want to control ccache invocation ourselves, so ignore this cc and try
29879    # searching again.
29880
29881    # Remove the path to the fake ccache cc from the PATH
29882    RETRY_COMPILER_SAVED_PATH="$PATH"
29883    COMPILER_DIRNAME=`$DIRNAME $CC`
29884    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29885
29886    # Try again looking for our compiler
29887    if test -n "$ac_tool_prefix"; then
29888  for ac_prog in $COMPILER_CHECK_LIST
29889  do
29890    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29891set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29893$as_echo_n "checking for $ac_word... " >&6; }
29894if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29895  $as_echo_n "(cached) " >&6
29896else
29897  if test -n "$PROPER_COMPILER_CC"; then
29898  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29899else
29900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29901for as_dir in $PATH
29902do
29903  IFS=$as_save_IFS
29904  test -z "$as_dir" && as_dir=.
29905    for ac_exec_ext in '' $ac_executable_extensions; do
29906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29907    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29909    break 2
29910  fi
29911done
29912  done
29913IFS=$as_save_IFS
29914
29915fi
29916fi
29917PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29918if test -n "$PROPER_COMPILER_CC"; then
29919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29920$as_echo "$PROPER_COMPILER_CC" >&6; }
29921else
29922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29923$as_echo "no" >&6; }
29924fi
29925
29926
29927    test -n "$PROPER_COMPILER_CC" && break
29928  done
29929fi
29930if test -z "$PROPER_COMPILER_CC"; then
29931  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29932  for ac_prog in $COMPILER_CHECK_LIST
29933do
29934  # Extract the first word of "$ac_prog", so it can be a program name with args.
29935set dummy $ac_prog; ac_word=$2
29936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29937$as_echo_n "checking for $ac_word... " >&6; }
29938if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29939  $as_echo_n "(cached) " >&6
29940else
29941  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29942  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29943else
29944as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29945for as_dir in $PATH
29946do
29947  IFS=$as_save_IFS
29948  test -z "$as_dir" && as_dir=.
29949    for ac_exec_ext in '' $ac_executable_extensions; do
29950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29951    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29953    break 2
29954  fi
29955done
29956  done
29957IFS=$as_save_IFS
29958
29959fi
29960fi
29961ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29962if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29964$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29965else
29966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29967$as_echo "no" >&6; }
29968fi
29969
29970
29971  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29972done
29973
29974  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29975    PROPER_COMPILER_CC=""
29976  else
29977    case $cross_compiling:$ac_tool_warned in
29978yes:)
29979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29981ac_tool_warned=yes ;;
29982esac
29983    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29984  fi
29985fi
29986
29987
29988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29989
29990  # First separate the path from the arguments. This will split at the first
29991  # space.
29992  complete="$PROPER_COMPILER_CC"
29993  path="${complete%% *}"
29994  tmp="$complete EOL"
29995  arguments="${tmp#* }"
29996
29997  # Input might be given as Windows format, start by converting to
29998  # unix format.
29999  new_path=`$CYGPATH -u "$path"`
30000
30001  # Now try to locate executable using which
30002  new_path=`$WHICH "$new_path" 2> /dev/null`
30003  # bat and cmd files are not always considered executable in cygwin causing which
30004  # to not find them
30005  if test "x$new_path" = x \
30006      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30007      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30008    new_path=`$CYGPATH -u "$path"`
30009  fi
30010  if test "x$new_path" = x; then
30011    # Oops. Which didn't find the executable.
30012    # The splitting of arguments from the executable at a space might have been incorrect,
30013    # since paths with space are more likely in Windows. Give it another try with the whole
30014    # argument.
30015    path="$complete"
30016    arguments="EOL"
30017    new_path=`$CYGPATH -u "$path"`
30018    new_path=`$WHICH "$new_path" 2> /dev/null`
30019    # bat and cmd files are not always considered executable in cygwin causing which
30020    # to not find them
30021    if test "x$new_path" = x \
30022        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30023        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30024      new_path=`$CYGPATH -u "$path"`
30025    fi
30026    if test "x$new_path" = x; then
30027      # It's still not found. Now this is an unrecoverable error.
30028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30029$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30030      has_space=`$ECHO "$complete" | $GREP " "`
30031      if test "x$has_space" != x; then
30032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30034      fi
30035      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30036    fi
30037  fi
30038
30039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30042  # "foo.exe" is OK but "foo" is an error.
30043  #
30044  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30045  # It is also a way to make sure we got the proper file name for the real test later on.
30046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30047  if test "x$test_shortpath" = x; then
30048    # Short path failed, file does not exist as specified.
30049    # Try adding .exe or .cmd
30050    if test -f "${new_path}.exe"; then
30051      input_to_shortpath="${new_path}.exe"
30052    elif test -f "${new_path}.cmd"; then
30053      input_to_shortpath="${new_path}.cmd"
30054    else
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
30056$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30058$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30059      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30060    fi
30061  else
30062    input_to_shortpath="$new_path"
30063  fi
30064
30065  # Call helper function which possibly converts this using DOS-style short mode.
30066  # If so, the updated path is stored in $new_path.
30067  new_path="$input_to_shortpath"
30068
30069  input_path="$input_to_shortpath"
30070  # Check if we need to convert this using DOS-style short mode. If the path
30071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30072  # take no chances and rewrite it.
30073  # Note: m4 eats our [], so we need to use [ and ] instead.
30074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30075  if test "x$has_forbidden_chars" != x; then
30076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30080      # Going to short mode and back again did indeed matter. Since short mode is
30081      # case insensitive, let's make it lowercase to improve readability.
30082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30083      # Now convert it back to Unix-stile (cygpath)
30084      input_path=`$CYGPATH -u "$shortmode_path"`
30085      new_path="$input_path"
30086    fi
30087  fi
30088
30089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30090  if test "x$test_cygdrive_prefix" = x; then
30091    # As a simple fix, exclude /usr/bin since it's not a real path.
30092    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30094      # a path prefixed by /cygdrive for fixpath to work.
30095      new_path="$CYGWIN_ROOT_PATH$input_path"
30096    fi
30097  fi
30098
30099  # remove trailing .exe if any
30100  new_path="${new_path/%.exe/}"
30101
30102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30103
30104  # First separate the path from the arguments. This will split at the first
30105  # space.
30106  complete="$PROPER_COMPILER_CC"
30107  path="${complete%% *}"
30108  tmp="$complete EOL"
30109  arguments="${tmp#* }"
30110
30111  # Input might be given as Windows format, start by converting to
30112  # unix format.
30113  new_path="$path"
30114
30115  windows_path="$new_path"
30116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30117    unix_path=`$CYGPATH -u "$windows_path"`
30118    new_path="$unix_path"
30119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30121    new_path="$unix_path"
30122  fi
30123
30124
30125  # Now try to locate executable using which
30126  new_path=`$WHICH "$new_path" 2> /dev/null`
30127
30128  if test "x$new_path" = x; then
30129    # Oops. Which didn't find the executable.
30130    # The splitting of arguments from the executable at a space might have been incorrect,
30131    # since paths with space are more likely in Windows. Give it another try with the whole
30132    # argument.
30133    path="$complete"
30134    arguments="EOL"
30135    new_path="$path"
30136
30137  windows_path="$new_path"
30138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30139    unix_path=`$CYGPATH -u "$windows_path"`
30140    new_path="$unix_path"
30141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30143    new_path="$unix_path"
30144  fi
30145
30146
30147    new_path=`$WHICH "$new_path" 2> /dev/null`
30148
30149    if test "x$new_path" = x; then
30150      # It's still not found. Now this is an unrecoverable error.
30151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30152$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30153      has_space=`$ECHO "$complete" | $GREP " "`
30154      if test "x$has_space" != x; then
30155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30157      fi
30158      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30159    fi
30160  fi
30161
30162  # Now new_path has a complete unix path to the binary
30163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30164    # Keep paths in /bin as-is, but remove trailing .exe if any
30165    new_path="${new_path/%.exe/}"
30166    # Do not save /bin paths to all_fixpath_prefixes!
30167  else
30168    # Not in mixed or Windows style, start by that.
30169    new_path=`cmd //c echo $new_path`
30170
30171  input_path="$new_path"
30172  # Check if we need to convert this using DOS-style short mode. If the path
30173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30174  # take no chances and rewrite it.
30175  # Note: m4 eats our [], so we need to use [ and ] instead.
30176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30177  if test "x$has_forbidden_chars" != x; then
30178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30180  fi
30181
30182    # Output is in $new_path
30183
30184  windows_path="$new_path"
30185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30186    unix_path=`$CYGPATH -u "$windows_path"`
30187    new_path="$unix_path"
30188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30190    new_path="$unix_path"
30191  fi
30192
30193    # remove trailing .exe if any
30194    new_path="${new_path/%.exe/}"
30195
30196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30198  fi
30199
30200  else
30201    # We're on a posix platform. Hooray! :)
30202    # First separate the path from the arguments. This will split at the first
30203    # space.
30204    complete="$PROPER_COMPILER_CC"
30205    path="${complete%% *}"
30206    tmp="$complete EOL"
30207    arguments="${tmp#* }"
30208
30209    # Cannot rely on the command "which" here since it doesn't always work.
30210    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30211    if test -z "$is_absolute_path"; then
30212      # Path to executable is not absolute. Find it.
30213      IFS_save="$IFS"
30214      IFS=:
30215      for p in $PATH; do
30216        if test -f "$p/$path" && test -x "$p/$path"; then
30217          new_path="$p/$path"
30218          break
30219        fi
30220      done
30221      IFS="$IFS_save"
30222    else
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
30224$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
30225      new_path="$path"
30226    fi
30227
30228    if test "x$new_path" = x; then
30229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30230$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30231      has_space=`$ECHO "$complete" | $GREP " "`
30232      if test "x$has_space" != x; then
30233        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30234$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30235      fi
30236      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30237    fi
30238  fi
30239
30240  # Now join together the path and the arguments once again
30241  if test "x$arguments" != xEOL; then
30242    new_complete="$new_path ${arguments% *}"
30243  else
30244    new_complete="$new_path"
30245  fi
30246
30247  if test "x$complete" != "x$new_complete"; then
30248    PROPER_COMPILER_CC="$new_complete"
30249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30250$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30251  fi
30252
30253    PATH="$RETRY_COMPILER_SAVED_PATH"
30254
30255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30256$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30257
30258  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30259    # Follow a chain of symbolic links. Use readlink
30260    # where it exists, else fall back to horribly
30261    # complicated shell code.
30262    if test "x$READLINK_TESTED" != yes; then
30263      # On MacOSX there is a readlink tool with a different
30264      # purpose than the GNU readlink tool. Check the found readlink.
30265      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30266      if test "x$ISGNU" = x; then
30267        # A readlink that we do not know how to use.
30268        # Are there other non-GNU readlinks out there?
30269        READLINK_TESTED=yes
30270        READLINK=
30271      fi
30272    fi
30273
30274    if test "x$READLINK" != x; then
30275      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30276    else
30277      # Save the current directory for restoring afterwards
30278      STARTDIR=$PWD
30279      COUNTER=0
30280      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30281      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30282      cd $sym_link_dir
30283      # Use -P flag to resolve symlinks in directories.
30284      cd `$THEPWDCMD -P`
30285      sym_link_dir=`$THEPWDCMD -P`
30286      # Resolve file symlinks
30287      while test $COUNTER -lt 20; do
30288        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30289        if test "x$ISLINK" == x; then
30290          # This is not a symbolic link! We are done!
30291          break
30292        fi
30293        # Again resolve directory symlinks since the target of the just found
30294        # link could be in a different directory
30295        cd `$DIRNAME $ISLINK`
30296        sym_link_dir=`$THEPWDCMD -P`
30297        sym_link_file=`$BASENAME $ISLINK`
30298        let COUNTER=COUNTER+1
30299      done
30300      cd $STARTDIR
30301      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30302    fi
30303  fi
30304
30305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30306$as_echo "$PROPER_COMPILER_CC" >&6; }
30307    CC="$PROPER_COMPILER_CC"
30308  else
30309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30310$as_echo "no, keeping CC" >&6; }
30311  fi
30312
30313
30314  COMPILER=$CC
30315  COMPILER_NAME=$COMPILER_NAME
30316
30317  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30318    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30319    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30320    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30321    if test $? -ne 0; then
30322      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30323
30324      { $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
30325$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30326      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30327$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30328      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30329    else
30330      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30331      COMPILER_VENDOR="Sun Studio"
30332    fi
30333  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30334      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30335      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30336      if test $? -ne 0; then
30337        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30338      else
30339        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30340        COMPILER_VENDOR='IBM'
30341      fi
30342  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30343    # First line typically looks something like:
30344    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30345    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30346    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30347    COMPILER_VENDOR="Microsoft CL.EXE"
30348    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30349    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30350      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30351        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30352      fi
30353    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30354      if test "x$COMPILER_CPU_TEST" != "xx64"; then
30355        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30356      fi
30357    fi
30358  else
30359    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30360    # Check that this is likely to be GCC.
30361    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30362    if test $? -ne 0; then
30363      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30364$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30365      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30366$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30367      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30368    fi
30369
30370    # First line typically looks something like:
30371    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30372    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30373    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30374  fi
30375  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30376  CC_VERSION="$COMPILER_VERSION"
30377  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30378  CC_VENDOR="$COMPILER_VENDOR"
30379
30380  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30381$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30382
30383
30384  # Now that we have resolved CC ourself, let autoconf have its go at it
30385  ac_ext=c
30386ac_cpp='$CPP $CPPFLAGS'
30387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30389ac_compiler_gnu=$ac_cv_c_compiler_gnu
30390if test -n "$ac_tool_prefix"; then
30391  for ac_prog in $CC
30392  do
30393    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30394set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30396$as_echo_n "checking for $ac_word... " >&6; }
30397if ${ac_cv_prog_CC+:} false; then :
30398  $as_echo_n "(cached) " >&6
30399else
30400  if test -n "$CC"; then
30401  ac_cv_prog_CC="$CC" # Let the user override the test.
30402else
30403as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30404for as_dir in $PATH
30405do
30406  IFS=$as_save_IFS
30407  test -z "$as_dir" && as_dir=.
30408    for ac_exec_ext in '' $ac_executable_extensions; do
30409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30410    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30412    break 2
30413  fi
30414done
30415  done
30416IFS=$as_save_IFS
30417
30418fi
30419fi
30420CC=$ac_cv_prog_CC
30421if test -n "$CC"; then
30422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30423$as_echo "$CC" >&6; }
30424else
30425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30426$as_echo "no" >&6; }
30427fi
30428
30429
30430    test -n "$CC" && break
30431  done
30432fi
30433if test -z "$CC"; then
30434  ac_ct_CC=$CC
30435  for ac_prog in $CC
30436do
30437  # Extract the first word of "$ac_prog", so it can be a program name with args.
30438set dummy $ac_prog; ac_word=$2
30439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30440$as_echo_n "checking for $ac_word... " >&6; }
30441if ${ac_cv_prog_ac_ct_CC+:} false; then :
30442  $as_echo_n "(cached) " >&6
30443else
30444  if test -n "$ac_ct_CC"; then
30445  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30446else
30447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30448for as_dir in $PATH
30449do
30450  IFS=$as_save_IFS
30451  test -z "$as_dir" && as_dir=.
30452    for ac_exec_ext in '' $ac_executable_extensions; do
30453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30454    ac_cv_prog_ac_ct_CC="$ac_prog"
30455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30456    break 2
30457  fi
30458done
30459  done
30460IFS=$as_save_IFS
30461
30462fi
30463fi
30464ac_ct_CC=$ac_cv_prog_ac_ct_CC
30465if test -n "$ac_ct_CC"; then
30466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30467$as_echo "$ac_ct_CC" >&6; }
30468else
30469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30470$as_echo "no" >&6; }
30471fi
30472
30473
30474  test -n "$ac_ct_CC" && break
30475done
30476
30477  if test "x$ac_ct_CC" = x; then
30478    CC=""
30479  else
30480    case $cross_compiling:$ac_tool_warned in
30481yes:)
30482{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30483$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30484ac_tool_warned=yes ;;
30485esac
30486    CC=$ac_ct_CC
30487  fi
30488fi
30489
30490
30491test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30493as_fn_error $? "no acceptable C compiler found in \$PATH
30494See \`config.log' for more details" "$LINENO" 5; }
30495
30496# Provide some information about the compiler.
30497$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30498set X $ac_compile
30499ac_compiler=$2
30500for ac_option in --version -v -V -qversion; do
30501  { { ac_try="$ac_compiler $ac_option >&5"
30502case "(($ac_try" in
30503  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30504  *) ac_try_echo=$ac_try;;
30505esac
30506eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30507$as_echo "$ac_try_echo"; } >&5
30508  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30509  ac_status=$?
30510  if test -s conftest.err; then
30511    sed '10a\
30512... rest of stderr output deleted ...
30513         10q' conftest.err >conftest.er1
30514    cat conftest.er1 >&5
30515  fi
30516  rm -f conftest.er1 conftest.err
30517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30518  test $ac_status = 0; }
30519done
30520
30521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30522/* end confdefs.h.  */
30523
30524int
30525main ()
30526{
30527
30528  ;
30529  return 0;
30530}
30531_ACEOF
30532ac_clean_files_save=$ac_clean_files
30533ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30534# Try to create an executable without -o first, disregard a.out.
30535# It will help us diagnose broken compilers, and finding out an intuition
30536# of exeext.
30537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30538$as_echo_n "checking whether the C compiler works... " >&6; }
30539ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30540
30541# The possible output files:
30542ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30543
30544ac_rmfiles=
30545for ac_file in $ac_files
30546do
30547  case $ac_file in
30548    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30549    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30550  esac
30551done
30552rm -f $ac_rmfiles
30553
30554if { { ac_try="$ac_link_default"
30555case "(($ac_try" in
30556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30557  *) ac_try_echo=$ac_try;;
30558esac
30559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30560$as_echo "$ac_try_echo"; } >&5
30561  (eval "$ac_link_default") 2>&5
30562  ac_status=$?
30563  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30564  test $ac_status = 0; }; then :
30565  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30566# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30567# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30568# so that the user can short-circuit this test for compilers unknown to
30569# Autoconf.
30570for ac_file in $ac_files ''
30571do
30572  test -f "$ac_file" || continue
30573  case $ac_file in
30574    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30575	;;
30576    [ab].out )
30577	# We found the default executable, but exeext='' is most
30578	# certainly right.
30579	break;;
30580    *.* )
30581	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30582	then :; else
30583	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30584	fi
30585	# We set ac_cv_exeext here because the later test for it is not
30586	# safe: cross compilers may not add the suffix if given an `-o'
30587	# argument, so we may need to know it at that point already.
30588	# Even if this section looks crufty: it has the advantage of
30589	# actually working.
30590	break;;
30591    * )
30592	break;;
30593  esac
30594done
30595test "$ac_cv_exeext" = no && ac_cv_exeext=
30596
30597else
30598  ac_file=''
30599fi
30600if test -z "$ac_file"; then :
30601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30602$as_echo "no" >&6; }
30603$as_echo "$as_me: failed program was:" >&5
30604sed 's/^/| /' conftest.$ac_ext >&5
30605
30606{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30608as_fn_error 77 "C compiler cannot create executables
30609See \`config.log' for more details" "$LINENO" 5; }
30610else
30611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30612$as_echo "yes" >&6; }
30613fi
30614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30615$as_echo_n "checking for C compiler default output file name... " >&6; }
30616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30617$as_echo "$ac_file" >&6; }
30618ac_exeext=$ac_cv_exeext
30619
30620rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30621ac_clean_files=$ac_clean_files_save
30622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30623$as_echo_n "checking for suffix of executables... " >&6; }
30624if { { ac_try="$ac_link"
30625case "(($ac_try" in
30626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30627  *) ac_try_echo=$ac_try;;
30628esac
30629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30630$as_echo "$ac_try_echo"; } >&5
30631  (eval "$ac_link") 2>&5
30632  ac_status=$?
30633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30634  test $ac_status = 0; }; then :
30635  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30636# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30637# work properly (i.e., refer to `conftest.exe'), while it won't with
30638# `rm'.
30639for ac_file in conftest.exe conftest conftest.*; do
30640  test -f "$ac_file" || continue
30641  case $ac_file in
30642    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30643    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30644	  break;;
30645    * ) break;;
30646  esac
30647done
30648else
30649  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30651as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30652See \`config.log' for more details" "$LINENO" 5; }
30653fi
30654rm -f conftest conftest$ac_cv_exeext
30655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30656$as_echo "$ac_cv_exeext" >&6; }
30657
30658rm -f conftest.$ac_ext
30659EXEEXT=$ac_cv_exeext
30660ac_exeext=$EXEEXT
30661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30662/* end confdefs.h.  */
30663#include <stdio.h>
30664int
30665main ()
30666{
30667FILE *f = fopen ("conftest.out", "w");
30668 return ferror (f) || fclose (f) != 0;
30669
30670  ;
30671  return 0;
30672}
30673_ACEOF
30674ac_clean_files="$ac_clean_files conftest.out"
30675# Check that the compiler produces executables we can run.  If not, either
30676# the compiler is broken, or we cross compile.
30677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30678$as_echo_n "checking whether we are cross compiling... " >&6; }
30679if test "$cross_compiling" != yes; then
30680  { { ac_try="$ac_link"
30681case "(($ac_try" in
30682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30683  *) ac_try_echo=$ac_try;;
30684esac
30685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30686$as_echo "$ac_try_echo"; } >&5
30687  (eval "$ac_link") 2>&5
30688  ac_status=$?
30689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30690  test $ac_status = 0; }
30691  if { ac_try='./conftest$ac_cv_exeext'
30692  { { case "(($ac_try" in
30693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30694  *) ac_try_echo=$ac_try;;
30695esac
30696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30697$as_echo "$ac_try_echo"; } >&5
30698  (eval "$ac_try") 2>&5
30699  ac_status=$?
30700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30701  test $ac_status = 0; }; }; then
30702    cross_compiling=no
30703  else
30704    if test "$cross_compiling" = maybe; then
30705	cross_compiling=yes
30706    else
30707	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30709as_fn_error $? "cannot run C compiled programs.
30710If you meant to cross compile, use \`--host'.
30711See \`config.log' for more details" "$LINENO" 5; }
30712    fi
30713  fi
30714fi
30715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30716$as_echo "$cross_compiling" >&6; }
30717
30718rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30719ac_clean_files=$ac_clean_files_save
30720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30721$as_echo_n "checking for suffix of object files... " >&6; }
30722if ${ac_cv_objext+:} false; then :
30723  $as_echo_n "(cached) " >&6
30724else
30725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30726/* end confdefs.h.  */
30727
30728int
30729main ()
30730{
30731
30732  ;
30733  return 0;
30734}
30735_ACEOF
30736rm -f conftest.o conftest.obj
30737if { { ac_try="$ac_compile"
30738case "(($ac_try" in
30739  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30740  *) ac_try_echo=$ac_try;;
30741esac
30742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30743$as_echo "$ac_try_echo"; } >&5
30744  (eval "$ac_compile") 2>&5
30745  ac_status=$?
30746  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30747  test $ac_status = 0; }; then :
30748  for ac_file in conftest.o conftest.obj conftest.*; do
30749  test -f "$ac_file" || continue;
30750  case $ac_file in
30751    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30752    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30753       break;;
30754  esac
30755done
30756else
30757  $as_echo "$as_me: failed program was:" >&5
30758sed 's/^/| /' conftest.$ac_ext >&5
30759
30760{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30762as_fn_error $? "cannot compute suffix of object files: cannot compile
30763See \`config.log' for more details" "$LINENO" 5; }
30764fi
30765rm -f conftest.$ac_cv_objext conftest.$ac_ext
30766fi
30767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30768$as_echo "$ac_cv_objext" >&6; }
30769OBJEXT=$ac_cv_objext
30770ac_objext=$OBJEXT
30771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30772$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30773if ${ac_cv_c_compiler_gnu+:} false; then :
30774  $as_echo_n "(cached) " >&6
30775else
30776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30777/* end confdefs.h.  */
30778
30779int
30780main ()
30781{
30782#ifndef __GNUC__
30783       choke me
30784#endif
30785
30786  ;
30787  return 0;
30788}
30789_ACEOF
30790if ac_fn_c_try_compile "$LINENO"; then :
30791  ac_compiler_gnu=yes
30792else
30793  ac_compiler_gnu=no
30794fi
30795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30796ac_cv_c_compiler_gnu=$ac_compiler_gnu
30797
30798fi
30799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30800$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30801if test $ac_compiler_gnu = yes; then
30802  GCC=yes
30803else
30804  GCC=
30805fi
30806ac_test_CFLAGS=${CFLAGS+set}
30807ac_save_CFLAGS=$CFLAGS
30808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30809$as_echo_n "checking whether $CC accepts -g... " >&6; }
30810if ${ac_cv_prog_cc_g+:} false; then :
30811  $as_echo_n "(cached) " >&6
30812else
30813  ac_save_c_werror_flag=$ac_c_werror_flag
30814   ac_c_werror_flag=yes
30815   ac_cv_prog_cc_g=no
30816   CFLAGS="-g"
30817   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30818/* end confdefs.h.  */
30819
30820int
30821main ()
30822{
30823
30824  ;
30825  return 0;
30826}
30827_ACEOF
30828if ac_fn_c_try_compile "$LINENO"; then :
30829  ac_cv_prog_cc_g=yes
30830else
30831  CFLAGS=""
30832      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30833/* end confdefs.h.  */
30834
30835int
30836main ()
30837{
30838
30839  ;
30840  return 0;
30841}
30842_ACEOF
30843if ac_fn_c_try_compile "$LINENO"; then :
30844
30845else
30846  ac_c_werror_flag=$ac_save_c_werror_flag
30847	 CFLAGS="-g"
30848	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30849/* end confdefs.h.  */
30850
30851int
30852main ()
30853{
30854
30855  ;
30856  return 0;
30857}
30858_ACEOF
30859if ac_fn_c_try_compile "$LINENO"; then :
30860  ac_cv_prog_cc_g=yes
30861fi
30862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30863fi
30864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30865fi
30866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30867   ac_c_werror_flag=$ac_save_c_werror_flag
30868fi
30869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30870$as_echo "$ac_cv_prog_cc_g" >&6; }
30871if test "$ac_test_CFLAGS" = set; then
30872  CFLAGS=$ac_save_CFLAGS
30873elif test $ac_cv_prog_cc_g = yes; then
30874  if test "$GCC" = yes; then
30875    CFLAGS="-g -O2"
30876  else
30877    CFLAGS="-g"
30878  fi
30879else
30880  if test "$GCC" = yes; then
30881    CFLAGS="-O2"
30882  else
30883    CFLAGS=
30884  fi
30885fi
30886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30887$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30888if ${ac_cv_prog_cc_c89+:} false; then :
30889  $as_echo_n "(cached) " >&6
30890else
30891  ac_cv_prog_cc_c89=no
30892ac_save_CC=$CC
30893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30894/* end confdefs.h.  */
30895#include <stdarg.h>
30896#include <stdio.h>
30897struct stat;
30898/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30899struct buf { int x; };
30900FILE * (*rcsopen) (struct buf *, struct stat *, int);
30901static char *e (p, i)
30902     char **p;
30903     int i;
30904{
30905  return p[i];
30906}
30907static char *f (char * (*g) (char **, int), char **p, ...)
30908{
30909  char *s;
30910  va_list v;
30911  va_start (v,p);
30912  s = g (p, va_arg (v,int));
30913  va_end (v);
30914  return s;
30915}
30916
30917/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30918   function prototypes and stuff, but not '\xHH' hex character constants.
30919   These don't provoke an error unfortunately, instead are silently treated
30920   as 'x'.  The following induces an error, until -std is added to get
30921   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30922   array size at least.  It's necessary to write '\x00'==0 to get something
30923   that's true only with -std.  */
30924int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30925
30926/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30927   inside strings and character constants.  */
30928#define FOO(x) 'x'
30929int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30930
30931int test (int i, double x);
30932struct s1 {int (*f) (int a);};
30933struct s2 {int (*f) (double a);};
30934int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30935int argc;
30936char **argv;
30937int
30938main ()
30939{
30940return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30941  ;
30942  return 0;
30943}
30944_ACEOF
30945for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30946	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30947do
30948  CC="$ac_save_CC $ac_arg"
30949  if ac_fn_c_try_compile "$LINENO"; then :
30950  ac_cv_prog_cc_c89=$ac_arg
30951fi
30952rm -f core conftest.err conftest.$ac_objext
30953  test "x$ac_cv_prog_cc_c89" != "xno" && break
30954done
30955rm -f conftest.$ac_ext
30956CC=$ac_save_CC
30957
30958fi
30959# AC_CACHE_VAL
30960case "x$ac_cv_prog_cc_c89" in
30961  x)
30962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30963$as_echo "none needed" >&6; } ;;
30964  xno)
30965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30966$as_echo "unsupported" >&6; } ;;
30967  *)
30968    CC="$CC $ac_cv_prog_cc_c89"
30969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30970$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30971esac
30972if test "x$ac_cv_prog_cc_c89" != xno; then :
30973
30974fi
30975
30976ac_ext=cpp
30977ac_cpp='$CXXCPP $CPPFLAGS'
30978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30981
30982
30983  # Option used to tell the compiler whether to create 32- or 64-bit executables
30984  # Notice that CC contains the full compiler path at this point.
30985  case $CC in
30986    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
30987    *)      COMPILER_TARGET_BITS_FLAG="-m";;
30988  esac
30989
30990
30991  ### Locate C++ compiler (CXX)
30992
30993  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30994    COMPILER_CHECK_LIST="cl"
30995  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
30996    COMPILER_CHECK_LIST="CC g++"
30997  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
30998    # Do not probe for CC on AIX .
30999    COMPILER_CHECK_LIST="xlC_r"
31000  else
31001    COMPILER_CHECK_LIST="g++ CC"
31002  fi
31003
31004
31005  COMPILER_NAME=C++
31006  SEARCH_LIST="$COMPILER_CHECK_LIST"
31007
31008  if test "x$CXX" != x; then
31009    # User has supplied compiler name already, always let that override.
31010    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
31011$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
31012    if test "x`basename $CXX`" = "x$CXX"; then
31013      # A command without a complete path is provided, search $PATH.
31014
31015      for ac_prog in $CXX
31016do
31017  # Extract the first word of "$ac_prog", so it can be a program name with args.
31018set dummy $ac_prog; ac_word=$2
31019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31020$as_echo_n "checking for $ac_word... " >&6; }
31021if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31022  $as_echo_n "(cached) " >&6
31023else
31024  case $POTENTIAL_CXX in
31025  [\\/]* | ?:[\\/]*)
31026  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31027  ;;
31028  *)
31029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31030for as_dir in $PATH
31031do
31032  IFS=$as_save_IFS
31033  test -z "$as_dir" && as_dir=.
31034    for ac_exec_ext in '' $ac_executable_extensions; do
31035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31036    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31038    break 2
31039  fi
31040done
31041  done
31042IFS=$as_save_IFS
31043
31044  ;;
31045esac
31046fi
31047POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31048if test -n "$POTENTIAL_CXX"; then
31049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31050$as_echo "$POTENTIAL_CXX" >&6; }
31051else
31052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31053$as_echo "no" >&6; }
31054fi
31055
31056
31057  test -n "$POTENTIAL_CXX" && break
31058done
31059
31060      if test "x$POTENTIAL_CXX" != x; then
31061        CXX=$POTENTIAL_CXX
31062      else
31063        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
31064      fi
31065    else
31066      # Otherwise it might already be a complete path
31067      if test ! -x "$CXX"; then
31068        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
31069      fi
31070    fi
31071  else
31072    # No user supplied value. Locate compiler ourselves
31073    CXX=
31074    # If TOOLS_DIR is set, check for all compiler names in there first
31075    # before checking the rest of the PATH.
31076    if test -n "$TOOLS_DIR"; then
31077      PATH_save="$PATH"
31078      PATH="$TOOLS_DIR"
31079      for ac_prog in $SEARCH_LIST
31080do
31081  # Extract the first word of "$ac_prog", so it can be a program name with args.
31082set dummy $ac_prog; ac_word=$2
31083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31084$as_echo_n "checking for $ac_word... " >&6; }
31085if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
31086  $as_echo_n "(cached) " >&6
31087else
31088  case $TOOLS_DIR_CXX in
31089  [\\/]* | ?:[\\/]*)
31090  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
31091  ;;
31092  *)
31093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31094for as_dir in $PATH
31095do
31096  IFS=$as_save_IFS
31097  test -z "$as_dir" && as_dir=.
31098    for ac_exec_ext in '' $ac_executable_extensions; do
31099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31100    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
31101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31102    break 2
31103  fi
31104done
31105  done
31106IFS=$as_save_IFS
31107
31108  ;;
31109esac
31110fi
31111TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
31112if test -n "$TOOLS_DIR_CXX"; then
31113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
31114$as_echo "$TOOLS_DIR_CXX" >&6; }
31115else
31116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31117$as_echo "no" >&6; }
31118fi
31119
31120
31121  test -n "$TOOLS_DIR_CXX" && break
31122done
31123
31124      CXX=$TOOLS_DIR_CXX
31125      PATH="$PATH_save"
31126    fi
31127
31128    # AC_PATH_PROGS can't be run multiple times with the same variable,
31129    # so create a new name for this run.
31130    if test "x$CXX" = x; then
31131      for ac_prog in $SEARCH_LIST
31132do
31133  # Extract the first word of "$ac_prog", so it can be a program name with args.
31134set dummy $ac_prog; ac_word=$2
31135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31136$as_echo_n "checking for $ac_word... " >&6; }
31137if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31138  $as_echo_n "(cached) " >&6
31139else
31140  case $POTENTIAL_CXX in
31141  [\\/]* | ?:[\\/]*)
31142  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31143  ;;
31144  *)
31145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31146for as_dir in $PATH
31147do
31148  IFS=$as_save_IFS
31149  test -z "$as_dir" && as_dir=.
31150    for ac_exec_ext in '' $ac_executable_extensions; do
31151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31152    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31154    break 2
31155  fi
31156done
31157  done
31158IFS=$as_save_IFS
31159
31160  ;;
31161esac
31162fi
31163POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31164if test -n "$POTENTIAL_CXX"; then
31165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31166$as_echo "$POTENTIAL_CXX" >&6; }
31167else
31168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31169$as_echo "no" >&6; }
31170fi
31171
31172
31173  test -n "$POTENTIAL_CXX" && break
31174done
31175
31176      CXX=$POTENTIAL_CXX
31177    fi
31178
31179    if test "x$CXX" = x; then
31180
31181  # Print a helpful message on how to acquire the necessary build dependency.
31182  # devkit is the help tag: freetype, cups, pulse, alsa etc
31183  MISSING_DEPENDENCY=devkit
31184
31185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31186    cygwin_help $MISSING_DEPENDENCY
31187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31188    msys_help $MISSING_DEPENDENCY
31189  else
31190    PKGHANDLER_COMMAND=
31191
31192    case $PKGHANDLER in
31193      apt-get)
31194        apt_help     $MISSING_DEPENDENCY ;;
31195      yum)
31196        yum_help     $MISSING_DEPENDENCY ;;
31197      port)
31198        port_help    $MISSING_DEPENDENCY ;;
31199      pkgutil)
31200        pkgutil_help $MISSING_DEPENDENCY ;;
31201      pkgadd)
31202        pkgadd_help  $MISSING_DEPENDENCY ;;
31203    esac
31204
31205    if test "x$PKGHANDLER_COMMAND" != x; then
31206      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31207    fi
31208  fi
31209
31210      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31211    fi
31212  fi
31213
31214  # Now we have a compiler binary in CXX. Make sure it's okay.
31215
31216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31217
31218  # First separate the path from the arguments. This will split at the first
31219  # space.
31220  complete="$CXX"
31221  path="${complete%% *}"
31222  tmp="$complete EOL"
31223  arguments="${tmp#* }"
31224
31225  # Input might be given as Windows format, start by converting to
31226  # unix format.
31227  new_path=`$CYGPATH -u "$path"`
31228
31229  # Now try to locate executable using which
31230  new_path=`$WHICH "$new_path" 2> /dev/null`
31231  # bat and cmd files are not always considered executable in cygwin causing which
31232  # to not find them
31233  if test "x$new_path" = x \
31234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31236    new_path=`$CYGPATH -u "$path"`
31237  fi
31238  if test "x$new_path" = x; then
31239    # Oops. Which didn't find the executable.
31240    # The splitting of arguments from the executable at a space might have been incorrect,
31241    # since paths with space are more likely in Windows. Give it another try with the whole
31242    # argument.
31243    path="$complete"
31244    arguments="EOL"
31245    new_path=`$CYGPATH -u "$path"`
31246    new_path=`$WHICH "$new_path" 2> /dev/null`
31247    # bat and cmd files are not always considered executable in cygwin causing which
31248    # to not find them
31249    if test "x$new_path" = x \
31250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31252      new_path=`$CYGPATH -u "$path"`
31253    fi
31254    if test "x$new_path" = x; then
31255      # It's still not found. Now this is an unrecoverable error.
31256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31257$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31258      has_space=`$ECHO "$complete" | $GREP " "`
31259      if test "x$has_space" != x; then
31260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31262      fi
31263      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31264    fi
31265  fi
31266
31267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31270  # "foo.exe" is OK but "foo" is an error.
31271  #
31272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31273  # It is also a way to make sure we got the proper file name for the real test later on.
31274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31275  if test "x$test_shortpath" = x; then
31276    # Short path failed, file does not exist as specified.
31277    # Try adding .exe or .cmd
31278    if test -f "${new_path}.exe"; then
31279      input_to_shortpath="${new_path}.exe"
31280    elif test -f "${new_path}.cmd"; then
31281      input_to_shortpath="${new_path}.cmd"
31282    else
31283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31284$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31287      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31288    fi
31289  else
31290    input_to_shortpath="$new_path"
31291  fi
31292
31293  # Call helper function which possibly converts this using DOS-style short mode.
31294  # If so, the updated path is stored in $new_path.
31295  new_path="$input_to_shortpath"
31296
31297  input_path="$input_to_shortpath"
31298  # Check if we need to convert this using DOS-style short mode. If the path
31299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31300  # take no chances and rewrite it.
31301  # Note: m4 eats our [], so we need to use [ and ] instead.
31302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31303  if test "x$has_forbidden_chars" != x; then
31304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31308      # Going to short mode and back again did indeed matter. Since short mode is
31309      # case insensitive, let's make it lowercase to improve readability.
31310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31311      # Now convert it back to Unix-stile (cygpath)
31312      input_path=`$CYGPATH -u "$shortmode_path"`
31313      new_path="$input_path"
31314    fi
31315  fi
31316
31317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31318  if test "x$test_cygdrive_prefix" = x; then
31319    # As a simple fix, exclude /usr/bin since it's not a real path.
31320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31322      # a path prefixed by /cygdrive for fixpath to work.
31323      new_path="$CYGWIN_ROOT_PATH$input_path"
31324    fi
31325  fi
31326
31327  # remove trailing .exe if any
31328  new_path="${new_path/%.exe/}"
31329
31330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31331
31332  # First separate the path from the arguments. This will split at the first
31333  # space.
31334  complete="$CXX"
31335  path="${complete%% *}"
31336  tmp="$complete EOL"
31337  arguments="${tmp#* }"
31338
31339  # Input might be given as Windows format, start by converting to
31340  # unix format.
31341  new_path="$path"
31342
31343  windows_path="$new_path"
31344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31345    unix_path=`$CYGPATH -u "$windows_path"`
31346    new_path="$unix_path"
31347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31349    new_path="$unix_path"
31350  fi
31351
31352
31353  # Now try to locate executable using which
31354  new_path=`$WHICH "$new_path" 2> /dev/null`
31355
31356  if test "x$new_path" = x; then
31357    # Oops. Which didn't find the executable.
31358    # The splitting of arguments from the executable at a space might have been incorrect,
31359    # since paths with space are more likely in Windows. Give it another try with the whole
31360    # argument.
31361    path="$complete"
31362    arguments="EOL"
31363    new_path="$path"
31364
31365  windows_path="$new_path"
31366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367    unix_path=`$CYGPATH -u "$windows_path"`
31368    new_path="$unix_path"
31369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31371    new_path="$unix_path"
31372  fi
31373
31374
31375    new_path=`$WHICH "$new_path" 2> /dev/null`
31376
31377    if test "x$new_path" = x; then
31378      # It's still not found. Now this is an unrecoverable error.
31379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31380$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31381      has_space=`$ECHO "$complete" | $GREP " "`
31382      if test "x$has_space" != x; then
31383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31385      fi
31386      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31387    fi
31388  fi
31389
31390  # Now new_path has a complete unix path to the binary
31391  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31392    # Keep paths in /bin as-is, but remove trailing .exe if any
31393    new_path="${new_path/%.exe/}"
31394    # Do not save /bin paths to all_fixpath_prefixes!
31395  else
31396    # Not in mixed or Windows style, start by that.
31397    new_path=`cmd //c echo $new_path`
31398
31399  input_path="$new_path"
31400  # Check if we need to convert this using DOS-style short mode. If the path
31401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31402  # take no chances and rewrite it.
31403  # Note: m4 eats our [], so we need to use [ and ] instead.
31404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31405  if test "x$has_forbidden_chars" != x; then
31406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31408  fi
31409
31410    # Output is in $new_path
31411
31412  windows_path="$new_path"
31413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31414    unix_path=`$CYGPATH -u "$windows_path"`
31415    new_path="$unix_path"
31416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31418    new_path="$unix_path"
31419  fi
31420
31421    # remove trailing .exe if any
31422    new_path="${new_path/%.exe/}"
31423
31424    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31425    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31426  fi
31427
31428  else
31429    # We're on a posix platform. Hooray! :)
31430    # First separate the path from the arguments. This will split at the first
31431    # space.
31432    complete="$CXX"
31433    path="${complete%% *}"
31434    tmp="$complete EOL"
31435    arguments="${tmp#* }"
31436
31437    # Cannot rely on the command "which" here since it doesn't always work.
31438    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31439    if test -z "$is_absolute_path"; then
31440      # Path to executable is not absolute. Find it.
31441      IFS_save="$IFS"
31442      IFS=:
31443      for p in $PATH; do
31444        if test -f "$p/$path" && test -x "$p/$path"; then
31445          new_path="$p/$path"
31446          break
31447        fi
31448      done
31449      IFS="$IFS_save"
31450    else
31451      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
31452$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
31453      new_path="$path"
31454    fi
31455
31456    if test "x$new_path" = x; then
31457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31458$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31459      has_space=`$ECHO "$complete" | $GREP " "`
31460      if test "x$has_space" != x; then
31461        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31462$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31463      fi
31464      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31465    fi
31466  fi
31467
31468  # Now join together the path and the arguments once again
31469  if test "x$arguments" != xEOL; then
31470    new_complete="$new_path ${arguments% *}"
31471  else
31472    new_complete="$new_path"
31473  fi
31474
31475  if test "x$complete" != "x$new_complete"; then
31476    CXX="$new_complete"
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31478$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31479  fi
31480
31481  TEST_COMPILER="$CXX"
31482  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31483  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31484  if test "x$OPENJDK_BUILD_OS" != xaix; then
31485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31486$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31487
31488  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31489    # Follow a chain of symbolic links. Use readlink
31490    # where it exists, else fall back to horribly
31491    # complicated shell code.
31492    if test "x$READLINK_TESTED" != yes; then
31493      # On MacOSX there is a readlink tool with a different
31494      # purpose than the GNU readlink tool. Check the found readlink.
31495      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31496      if test "x$ISGNU" = x; then
31497        # A readlink that we do not know how to use.
31498        # Are there other non-GNU readlinks out there?
31499        READLINK_TESTED=yes
31500        READLINK=
31501      fi
31502    fi
31503
31504    if test "x$READLINK" != x; then
31505      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31506    else
31507      # Save the current directory for restoring afterwards
31508      STARTDIR=$PWD
31509      COUNTER=0
31510      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31511      sym_link_file=`$BASENAME $TEST_COMPILER`
31512      cd $sym_link_dir
31513      # Use -P flag to resolve symlinks in directories.
31514      cd `$THEPWDCMD -P`
31515      sym_link_dir=`$THEPWDCMD -P`
31516      # Resolve file symlinks
31517      while test $COUNTER -lt 20; do
31518        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31519        if test "x$ISLINK" == x; then
31520          # This is not a symbolic link! We are done!
31521          break
31522        fi
31523        # Again resolve directory symlinks since the target of the just found
31524        # link could be in a different directory
31525        cd `$DIRNAME $ISLINK`
31526        sym_link_dir=`$THEPWDCMD -P`
31527        sym_link_file=`$BASENAME $ISLINK`
31528        let COUNTER=COUNTER+1
31529      done
31530      cd $STARTDIR
31531      TEST_COMPILER=$sym_link_dir/$sym_link_file
31532    fi
31533  fi
31534
31535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31536$as_echo "$TEST_COMPILER" >&6; }
31537  fi
31538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31539$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31540
31541  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31542  if test "x$COMPILER_BASENAME" = "xccache"; then
31543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31544$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31545    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31546    # We want to control ccache invocation ourselves, so ignore this cc and try
31547    # searching again.
31548
31549    # Remove the path to the fake ccache cc from the PATH
31550    RETRY_COMPILER_SAVED_PATH="$PATH"
31551    COMPILER_DIRNAME=`$DIRNAME $CXX`
31552    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31553
31554    # Try again looking for our compiler
31555    if test -n "$ac_tool_prefix"; then
31556  for ac_prog in $COMPILER_CHECK_LIST
31557  do
31558    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31559set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31561$as_echo_n "checking for $ac_word... " >&6; }
31562if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31563  $as_echo_n "(cached) " >&6
31564else
31565  if test -n "$PROPER_COMPILER_CXX"; then
31566  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31567else
31568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31569for as_dir in $PATH
31570do
31571  IFS=$as_save_IFS
31572  test -z "$as_dir" && as_dir=.
31573    for ac_exec_ext in '' $ac_executable_extensions; do
31574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31575    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31577    break 2
31578  fi
31579done
31580  done
31581IFS=$as_save_IFS
31582
31583fi
31584fi
31585PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31586if test -n "$PROPER_COMPILER_CXX"; then
31587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31588$as_echo "$PROPER_COMPILER_CXX" >&6; }
31589else
31590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31591$as_echo "no" >&6; }
31592fi
31593
31594
31595    test -n "$PROPER_COMPILER_CXX" && break
31596  done
31597fi
31598if test -z "$PROPER_COMPILER_CXX"; then
31599  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31600  for ac_prog in $COMPILER_CHECK_LIST
31601do
31602  # Extract the first word of "$ac_prog", so it can be a program name with args.
31603set dummy $ac_prog; ac_word=$2
31604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31605$as_echo_n "checking for $ac_word... " >&6; }
31606if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31607  $as_echo_n "(cached) " >&6
31608else
31609  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31610  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31611else
31612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31613for as_dir in $PATH
31614do
31615  IFS=$as_save_IFS
31616  test -z "$as_dir" && as_dir=.
31617    for ac_exec_ext in '' $ac_executable_extensions; do
31618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31619    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31621    break 2
31622  fi
31623done
31624  done
31625IFS=$as_save_IFS
31626
31627fi
31628fi
31629ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31630if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31632$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31633else
31634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31635$as_echo "no" >&6; }
31636fi
31637
31638
31639  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31640done
31641
31642  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31643    PROPER_COMPILER_CXX=""
31644  else
31645    case $cross_compiling:$ac_tool_warned in
31646yes:)
31647{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31648$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31649ac_tool_warned=yes ;;
31650esac
31651    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31652  fi
31653fi
31654
31655
31656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31657
31658  # First separate the path from the arguments. This will split at the first
31659  # space.
31660  complete="$PROPER_COMPILER_CXX"
31661  path="${complete%% *}"
31662  tmp="$complete EOL"
31663  arguments="${tmp#* }"
31664
31665  # Input might be given as Windows format, start by converting to
31666  # unix format.
31667  new_path=`$CYGPATH -u "$path"`
31668
31669  # Now try to locate executable using which
31670  new_path=`$WHICH "$new_path" 2> /dev/null`
31671  # bat and cmd files are not always considered executable in cygwin causing which
31672  # to not find them
31673  if test "x$new_path" = x \
31674      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31675      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31676    new_path=`$CYGPATH -u "$path"`
31677  fi
31678  if test "x$new_path" = x; then
31679    # Oops. Which didn't find the executable.
31680    # The splitting of arguments from the executable at a space might have been incorrect,
31681    # since paths with space are more likely in Windows. Give it another try with the whole
31682    # argument.
31683    path="$complete"
31684    arguments="EOL"
31685    new_path=`$CYGPATH -u "$path"`
31686    new_path=`$WHICH "$new_path" 2> /dev/null`
31687    # bat and cmd files are not always considered executable in cygwin causing which
31688    # to not find them
31689    if test "x$new_path" = x \
31690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31692      new_path=`$CYGPATH -u "$path"`
31693    fi
31694    if test "x$new_path" = x; then
31695      # It's still not found. Now this is an unrecoverable error.
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31697$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31698      has_space=`$ECHO "$complete" | $GREP " "`
31699      if test "x$has_space" != x; then
31700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31702      fi
31703      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31704    fi
31705  fi
31706
31707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31710  # "foo.exe" is OK but "foo" is an error.
31711  #
31712  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31713  # It is also a way to make sure we got the proper file name for the real test later on.
31714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31715  if test "x$test_shortpath" = x; then
31716    # Short path failed, file does not exist as specified.
31717    # Try adding .exe or .cmd
31718    if test -f "${new_path}.exe"; then
31719      input_to_shortpath="${new_path}.exe"
31720    elif test -f "${new_path}.cmd"; then
31721      input_to_shortpath="${new_path}.cmd"
31722    else
31723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31724$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31727      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31728    fi
31729  else
31730    input_to_shortpath="$new_path"
31731  fi
31732
31733  # Call helper function which possibly converts this using DOS-style short mode.
31734  # If so, the updated path is stored in $new_path.
31735  new_path="$input_to_shortpath"
31736
31737  input_path="$input_to_shortpath"
31738  # Check if we need to convert this using DOS-style short mode. If the path
31739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31740  # take no chances and rewrite it.
31741  # Note: m4 eats our [], so we need to use [ and ] instead.
31742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31743  if test "x$has_forbidden_chars" != x; then
31744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31748      # Going to short mode and back again did indeed matter. Since short mode is
31749      # case insensitive, let's make it lowercase to improve readability.
31750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31751      # Now convert it back to Unix-stile (cygpath)
31752      input_path=`$CYGPATH -u "$shortmode_path"`
31753      new_path="$input_path"
31754    fi
31755  fi
31756
31757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31758  if test "x$test_cygdrive_prefix" = x; then
31759    # As a simple fix, exclude /usr/bin since it's not a real path.
31760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31762      # a path prefixed by /cygdrive for fixpath to work.
31763      new_path="$CYGWIN_ROOT_PATH$input_path"
31764    fi
31765  fi
31766
31767  # remove trailing .exe if any
31768  new_path="${new_path/%.exe/}"
31769
31770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31771
31772  # First separate the path from the arguments. This will split at the first
31773  # space.
31774  complete="$PROPER_COMPILER_CXX"
31775  path="${complete%% *}"
31776  tmp="$complete EOL"
31777  arguments="${tmp#* }"
31778
31779  # Input might be given as Windows format, start by converting to
31780  # unix format.
31781  new_path="$path"
31782
31783  windows_path="$new_path"
31784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785    unix_path=`$CYGPATH -u "$windows_path"`
31786    new_path="$unix_path"
31787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31789    new_path="$unix_path"
31790  fi
31791
31792
31793  # Now try to locate executable using which
31794  new_path=`$WHICH "$new_path" 2> /dev/null`
31795
31796  if test "x$new_path" = x; then
31797    # Oops. Which didn't find the executable.
31798    # The splitting of arguments from the executable at a space might have been incorrect,
31799    # since paths with space are more likely in Windows. Give it another try with the whole
31800    # argument.
31801    path="$complete"
31802    arguments="EOL"
31803    new_path="$path"
31804
31805  windows_path="$new_path"
31806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31807    unix_path=`$CYGPATH -u "$windows_path"`
31808    new_path="$unix_path"
31809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31811    new_path="$unix_path"
31812  fi
31813
31814
31815    new_path=`$WHICH "$new_path" 2> /dev/null`
31816
31817    if test "x$new_path" = x; then
31818      # It's still not found. Now this is an unrecoverable error.
31819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31820$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31821      has_space=`$ECHO "$complete" | $GREP " "`
31822      if test "x$has_space" != x; then
31823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31825      fi
31826      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31827    fi
31828  fi
31829
31830  # Now new_path has a complete unix path to the binary
31831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31832    # Keep paths in /bin as-is, but remove trailing .exe if any
31833    new_path="${new_path/%.exe/}"
31834    # Do not save /bin paths to all_fixpath_prefixes!
31835  else
31836    # Not in mixed or Windows style, start by that.
31837    new_path=`cmd //c echo $new_path`
31838
31839  input_path="$new_path"
31840  # Check if we need to convert this using DOS-style short mode. If the path
31841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31842  # take no chances and rewrite it.
31843  # Note: m4 eats our [], so we need to use [ and ] instead.
31844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31845  if test "x$has_forbidden_chars" != x; then
31846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31848  fi
31849
31850    # Output is in $new_path
31851
31852  windows_path="$new_path"
31853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31854    unix_path=`$CYGPATH -u "$windows_path"`
31855    new_path="$unix_path"
31856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31858    new_path="$unix_path"
31859  fi
31860
31861    # remove trailing .exe if any
31862    new_path="${new_path/%.exe/}"
31863
31864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31866  fi
31867
31868  else
31869    # We're on a posix platform. Hooray! :)
31870    # First separate the path from the arguments. This will split at the first
31871    # space.
31872    complete="$PROPER_COMPILER_CXX"
31873    path="${complete%% *}"
31874    tmp="$complete EOL"
31875    arguments="${tmp#* }"
31876
31877    # Cannot rely on the command "which" here since it doesn't always work.
31878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31879    if test -z "$is_absolute_path"; then
31880      # Path to executable is not absolute. Find it.
31881      IFS_save="$IFS"
31882      IFS=:
31883      for p in $PATH; do
31884        if test -f "$p/$path" && test -x "$p/$path"; then
31885          new_path="$p/$path"
31886          break
31887        fi
31888      done
31889      IFS="$IFS_save"
31890    else
31891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
31892$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
31893      new_path="$path"
31894    fi
31895
31896    if test "x$new_path" = x; then
31897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31898$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31899      has_space=`$ECHO "$complete" | $GREP " "`
31900      if test "x$has_space" != x; then
31901        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31903      fi
31904      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31905    fi
31906  fi
31907
31908  # Now join together the path and the arguments once again
31909  if test "x$arguments" != xEOL; then
31910    new_complete="$new_path ${arguments% *}"
31911  else
31912    new_complete="$new_path"
31913  fi
31914
31915  if test "x$complete" != "x$new_complete"; then
31916    PROPER_COMPILER_CXX="$new_complete"
31917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31918$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31919  fi
31920
31921    PATH="$RETRY_COMPILER_SAVED_PATH"
31922
31923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31924$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31925
31926  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31927    # Follow a chain of symbolic links. Use readlink
31928    # where it exists, else fall back to horribly
31929    # complicated shell code.
31930    if test "x$READLINK_TESTED" != yes; then
31931      # On MacOSX there is a readlink tool with a different
31932      # purpose than the GNU readlink tool. Check the found readlink.
31933      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31934      if test "x$ISGNU" = x; then
31935        # A readlink that we do not know how to use.
31936        # Are there other non-GNU readlinks out there?
31937        READLINK_TESTED=yes
31938        READLINK=
31939      fi
31940    fi
31941
31942    if test "x$READLINK" != x; then
31943      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31944    else
31945      # Save the current directory for restoring afterwards
31946      STARTDIR=$PWD
31947      COUNTER=0
31948      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31949      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31950      cd $sym_link_dir
31951      # Use -P flag to resolve symlinks in directories.
31952      cd `$THEPWDCMD -P`
31953      sym_link_dir=`$THEPWDCMD -P`
31954      # Resolve file symlinks
31955      while test $COUNTER -lt 20; do
31956        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31957        if test "x$ISLINK" == x; then
31958          # This is not a symbolic link! We are done!
31959          break
31960        fi
31961        # Again resolve directory symlinks since the target of the just found
31962        # link could be in a different directory
31963        cd `$DIRNAME $ISLINK`
31964        sym_link_dir=`$THEPWDCMD -P`
31965        sym_link_file=`$BASENAME $ISLINK`
31966        let COUNTER=COUNTER+1
31967      done
31968      cd $STARTDIR
31969      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31970    fi
31971  fi
31972
31973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31974$as_echo "$PROPER_COMPILER_CXX" >&6; }
31975    CXX="$PROPER_COMPILER_CXX"
31976  else
31977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31978$as_echo "no, keeping CXX" >&6; }
31979  fi
31980
31981
31982  COMPILER=$CXX
31983  COMPILER_NAME=$COMPILER_NAME
31984
31985  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31986    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
31987    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
31988    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31989    if test $? -ne 0; then
31990      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
31991
31992      { $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
31993$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
31994      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
31995$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
31996      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31997    else
31998      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
31999      COMPILER_VENDOR="Sun Studio"
32000    fi
32001  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
32002      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
32003      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
32004      if test $? -ne 0; then
32005        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
32006      else
32007        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
32008        COMPILER_VENDOR='IBM'
32009      fi
32010  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
32011    # First line typically looks something like:
32012    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32013    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32014    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
32015    COMPILER_VENDOR="Microsoft CL.EXE"
32016    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
32017    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
32018      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
32019        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
32020      fi
32021    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
32022      if test "x$COMPILER_CPU_TEST" != "xx64"; then
32023        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
32024      fi
32025    fi
32026  else
32027    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
32028    # Check that this is likely to be GCC.
32029    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
32030    if test $? -ne 0; then
32031      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
32032$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
32033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
32034$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
32035      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32036    fi
32037
32038    # First line typically looks something like:
32039    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
32040    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
32041    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
32042  fi
32043  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
32044  CXX_VERSION="$COMPILER_VERSION"
32045  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
32046  CXX_VENDOR="$COMPILER_VENDOR"
32047
32048  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
32049$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
32050
32051
32052  # Now that we have resolved CXX ourself, let autoconf have its go at it
32053  ac_ext=cpp
32054ac_cpp='$CXXCPP $CPPFLAGS'
32055ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32056ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32057ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32058if test -z "$CXX"; then
32059  if test -n "$CCC"; then
32060    CXX=$CCC
32061  else
32062    if test -n "$ac_tool_prefix"; then
32063  for ac_prog in $CXX
32064  do
32065    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32066set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32068$as_echo_n "checking for $ac_word... " >&6; }
32069if ${ac_cv_prog_CXX+:} false; then :
32070  $as_echo_n "(cached) " >&6
32071else
32072  if test -n "$CXX"; then
32073  ac_cv_prog_CXX="$CXX" # Let the user override the test.
32074else
32075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32076for as_dir in $PATH
32077do
32078  IFS=$as_save_IFS
32079  test -z "$as_dir" && as_dir=.
32080    for ac_exec_ext in '' $ac_executable_extensions; do
32081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32082    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32084    break 2
32085  fi
32086done
32087  done
32088IFS=$as_save_IFS
32089
32090fi
32091fi
32092CXX=$ac_cv_prog_CXX
32093if test -n "$CXX"; then
32094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32095$as_echo "$CXX" >&6; }
32096else
32097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32098$as_echo "no" >&6; }
32099fi
32100
32101
32102    test -n "$CXX" && break
32103  done
32104fi
32105if test -z "$CXX"; then
32106  ac_ct_CXX=$CXX
32107  for ac_prog in $CXX
32108do
32109  # Extract the first word of "$ac_prog", so it can be a program name with args.
32110set dummy $ac_prog; ac_word=$2
32111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32112$as_echo_n "checking for $ac_word... " >&6; }
32113if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32114  $as_echo_n "(cached) " >&6
32115else
32116  if test -n "$ac_ct_CXX"; then
32117  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32118else
32119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32120for as_dir in $PATH
32121do
32122  IFS=$as_save_IFS
32123  test -z "$as_dir" && as_dir=.
32124    for ac_exec_ext in '' $ac_executable_extensions; do
32125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32126    ac_cv_prog_ac_ct_CXX="$ac_prog"
32127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32128    break 2
32129  fi
32130done
32131  done
32132IFS=$as_save_IFS
32133
32134fi
32135fi
32136ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32137if test -n "$ac_ct_CXX"; then
32138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32139$as_echo "$ac_ct_CXX" >&6; }
32140else
32141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32142$as_echo "no" >&6; }
32143fi
32144
32145
32146  test -n "$ac_ct_CXX" && break
32147done
32148
32149  if test "x$ac_ct_CXX" = x; then
32150    CXX="g++"
32151  else
32152    case $cross_compiling:$ac_tool_warned in
32153yes:)
32154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32156ac_tool_warned=yes ;;
32157esac
32158    CXX=$ac_ct_CXX
32159  fi
32160fi
32161
32162  fi
32163fi
32164# Provide some information about the compiler.
32165$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32166set X $ac_compile
32167ac_compiler=$2
32168for ac_option in --version -v -V -qversion; do
32169  { { ac_try="$ac_compiler $ac_option >&5"
32170case "(($ac_try" in
32171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32172  *) ac_try_echo=$ac_try;;
32173esac
32174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32175$as_echo "$ac_try_echo"; } >&5
32176  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32177  ac_status=$?
32178  if test -s conftest.err; then
32179    sed '10a\
32180... rest of stderr output deleted ...
32181         10q' conftest.err >conftest.er1
32182    cat conftest.er1 >&5
32183  fi
32184  rm -f conftest.er1 conftest.err
32185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32186  test $ac_status = 0; }
32187done
32188
32189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32190$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32191if ${ac_cv_cxx_compiler_gnu+:} false; then :
32192  $as_echo_n "(cached) " >&6
32193else
32194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32195/* end confdefs.h.  */
32196
32197int
32198main ()
32199{
32200#ifndef __GNUC__
32201       choke me
32202#endif
32203
32204  ;
32205  return 0;
32206}
32207_ACEOF
32208if ac_fn_cxx_try_compile "$LINENO"; then :
32209  ac_compiler_gnu=yes
32210else
32211  ac_compiler_gnu=no
32212fi
32213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32214ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32215
32216fi
32217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32218$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32219if test $ac_compiler_gnu = yes; then
32220  GXX=yes
32221else
32222  GXX=
32223fi
32224ac_test_CXXFLAGS=${CXXFLAGS+set}
32225ac_save_CXXFLAGS=$CXXFLAGS
32226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32227$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32228if ${ac_cv_prog_cxx_g+:} false; then :
32229  $as_echo_n "(cached) " >&6
32230else
32231  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32232   ac_cxx_werror_flag=yes
32233   ac_cv_prog_cxx_g=no
32234   CXXFLAGS="-g"
32235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32236/* end confdefs.h.  */
32237
32238int
32239main ()
32240{
32241
32242  ;
32243  return 0;
32244}
32245_ACEOF
32246if ac_fn_cxx_try_compile "$LINENO"; then :
32247  ac_cv_prog_cxx_g=yes
32248else
32249  CXXFLAGS=""
32250      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32251/* end confdefs.h.  */
32252
32253int
32254main ()
32255{
32256
32257  ;
32258  return 0;
32259}
32260_ACEOF
32261if ac_fn_cxx_try_compile "$LINENO"; then :
32262
32263else
32264  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32265	 CXXFLAGS="-g"
32266	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32267/* end confdefs.h.  */
32268
32269int
32270main ()
32271{
32272
32273  ;
32274  return 0;
32275}
32276_ACEOF
32277if ac_fn_cxx_try_compile "$LINENO"; then :
32278  ac_cv_prog_cxx_g=yes
32279fi
32280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32281fi
32282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32283fi
32284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32285   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32286fi
32287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32288$as_echo "$ac_cv_prog_cxx_g" >&6; }
32289if test "$ac_test_CXXFLAGS" = set; then
32290  CXXFLAGS=$ac_save_CXXFLAGS
32291elif test $ac_cv_prog_cxx_g = yes; then
32292  if test "$GXX" = yes; then
32293    CXXFLAGS="-g -O2"
32294  else
32295    CXXFLAGS="-g"
32296  fi
32297else
32298  if test "$GXX" = yes; then
32299    CXXFLAGS="-O2"
32300  else
32301    CXXFLAGS=
32302  fi
32303fi
32304ac_ext=cpp
32305ac_cpp='$CXXCPP $CPPFLAGS'
32306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32309
32310
32311  ### Locate other tools
32312
32313  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32314    ac_ext=m
32315ac_cpp='$OBJCPP $CPPFLAGS'
32316ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32317ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32318ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32319if test -n "$ac_tool_prefix"; then
32320  for ac_prog in gcc objcc objc cc CC
32321  do
32322    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32323set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32325$as_echo_n "checking for $ac_word... " >&6; }
32326if ${ac_cv_prog_OBJC+:} false; then :
32327  $as_echo_n "(cached) " >&6
32328else
32329  if test -n "$OBJC"; then
32330  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32331else
32332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32333for as_dir in $PATH
32334do
32335  IFS=$as_save_IFS
32336  test -z "$as_dir" && as_dir=.
32337    for ac_exec_ext in '' $ac_executable_extensions; do
32338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32339    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32341    break 2
32342  fi
32343done
32344  done
32345IFS=$as_save_IFS
32346
32347fi
32348fi
32349OBJC=$ac_cv_prog_OBJC
32350if test -n "$OBJC"; then
32351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32352$as_echo "$OBJC" >&6; }
32353else
32354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32355$as_echo "no" >&6; }
32356fi
32357
32358
32359    test -n "$OBJC" && break
32360  done
32361fi
32362if test -z "$OBJC"; then
32363  ac_ct_OBJC=$OBJC
32364  for ac_prog in gcc objcc objc cc CC
32365do
32366  # Extract the first word of "$ac_prog", so it can be a program name with args.
32367set dummy $ac_prog; ac_word=$2
32368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32369$as_echo_n "checking for $ac_word... " >&6; }
32370if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32371  $as_echo_n "(cached) " >&6
32372else
32373  if test -n "$ac_ct_OBJC"; then
32374  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32375else
32376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32377for as_dir in $PATH
32378do
32379  IFS=$as_save_IFS
32380  test -z "$as_dir" && as_dir=.
32381    for ac_exec_ext in '' $ac_executable_extensions; do
32382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32383    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32385    break 2
32386  fi
32387done
32388  done
32389IFS=$as_save_IFS
32390
32391fi
32392fi
32393ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32394if test -n "$ac_ct_OBJC"; then
32395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32396$as_echo "$ac_ct_OBJC" >&6; }
32397else
32398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32399$as_echo "no" >&6; }
32400fi
32401
32402
32403  test -n "$ac_ct_OBJC" && break
32404done
32405
32406  if test "x$ac_ct_OBJC" = x; then
32407    OBJC="gcc"
32408  else
32409    case $cross_compiling:$ac_tool_warned in
32410yes:)
32411{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32412$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32413ac_tool_warned=yes ;;
32414esac
32415    OBJC=$ac_ct_OBJC
32416  fi
32417fi
32418
32419# Provide some information about the compiler.
32420$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32421set X $ac_compile
32422ac_compiler=$2
32423for ac_option in --version -v -V -qversion; do
32424  { { ac_try="$ac_compiler $ac_option >&5"
32425case "(($ac_try" in
32426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32427  *) ac_try_echo=$ac_try;;
32428esac
32429eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32430$as_echo "$ac_try_echo"; } >&5
32431  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32432  ac_status=$?
32433  if test -s conftest.err; then
32434    sed '10a\
32435... rest of stderr output deleted ...
32436         10q' conftest.err >conftest.er1
32437    cat conftest.er1 >&5
32438  fi
32439  rm -f conftest.er1 conftest.err
32440  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32441  test $ac_status = 0; }
32442done
32443
32444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32445$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32446if ${ac_cv_objc_compiler_gnu+:} false; then :
32447  $as_echo_n "(cached) " >&6
32448else
32449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32450/* end confdefs.h.  */
32451
32452int
32453main ()
32454{
32455#ifndef __GNUC__
32456       choke me
32457#endif
32458
32459  ;
32460  return 0;
32461}
32462_ACEOF
32463if ac_fn_objc_try_compile "$LINENO"; then :
32464  ac_compiler_gnu=yes
32465else
32466  ac_compiler_gnu=no
32467fi
32468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32469ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32470
32471fi
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32473$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32474if test $ac_compiler_gnu = yes; then
32475  GOBJC=yes
32476else
32477  GOBJC=
32478fi
32479ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32480ac_save_OBJCFLAGS=$OBJCFLAGS
32481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32482$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32483if ${ac_cv_prog_objc_g+:} false; then :
32484  $as_echo_n "(cached) " >&6
32485else
32486  ac_save_objc_werror_flag=$ac_objc_werror_flag
32487   ac_objc_werror_flag=yes
32488   ac_cv_prog_objc_g=no
32489   OBJCFLAGS="-g"
32490   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32491/* end confdefs.h.  */
32492
32493int
32494main ()
32495{
32496
32497  ;
32498  return 0;
32499}
32500_ACEOF
32501if ac_fn_objc_try_compile "$LINENO"; then :
32502  ac_cv_prog_objc_g=yes
32503else
32504  OBJCFLAGS=""
32505      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32506/* end confdefs.h.  */
32507
32508int
32509main ()
32510{
32511
32512  ;
32513  return 0;
32514}
32515_ACEOF
32516if ac_fn_objc_try_compile "$LINENO"; then :
32517
32518else
32519  ac_objc_werror_flag=$ac_save_objc_werror_flag
32520	 OBJCFLAGS="-g"
32521	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32522/* end confdefs.h.  */
32523
32524int
32525main ()
32526{
32527
32528  ;
32529  return 0;
32530}
32531_ACEOF
32532if ac_fn_objc_try_compile "$LINENO"; then :
32533  ac_cv_prog_objc_g=yes
32534fi
32535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32536fi
32537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32538fi
32539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32540   ac_objc_werror_flag=$ac_save_objc_werror_flag
32541fi
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32543$as_echo "$ac_cv_prog_objc_g" >&6; }
32544if test "$ac_test_OBJCFLAGS" = set; then
32545  OBJCFLAGS=$ac_save_OBJCFLAGS
32546elif test $ac_cv_prog_objc_g = yes; then
32547  if test "$GOBJC" = yes; then
32548    OBJCFLAGS="-g -O2"
32549  else
32550    OBJCFLAGS="-g"
32551  fi
32552else
32553  if test "$GOBJC" = yes; then
32554    OBJCFLAGS="-O2"
32555  else
32556    OBJCFLAGS=
32557  fi
32558fi
32559ac_ext=cpp
32560ac_cpp='$CXXCPP $CPPFLAGS'
32561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32564
32565
32566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32567
32568  # First separate the path from the arguments. This will split at the first
32569  # space.
32570  complete="$OBJC"
32571  path="${complete%% *}"
32572  tmp="$complete EOL"
32573  arguments="${tmp#* }"
32574
32575  # Input might be given as Windows format, start by converting to
32576  # unix format.
32577  new_path=`$CYGPATH -u "$path"`
32578
32579  # Now try to locate executable using which
32580  new_path=`$WHICH "$new_path" 2> /dev/null`
32581  # bat and cmd files are not always considered executable in cygwin causing which
32582  # to not find them
32583  if test "x$new_path" = x \
32584      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32585      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32586    new_path=`$CYGPATH -u "$path"`
32587  fi
32588  if test "x$new_path" = x; then
32589    # Oops. Which didn't find the executable.
32590    # The splitting of arguments from the executable at a space might have been incorrect,
32591    # since paths with space are more likely in Windows. Give it another try with the whole
32592    # argument.
32593    path="$complete"
32594    arguments="EOL"
32595    new_path=`$CYGPATH -u "$path"`
32596    new_path=`$WHICH "$new_path" 2> /dev/null`
32597    # bat and cmd files are not always considered executable in cygwin causing which
32598    # to not find them
32599    if test "x$new_path" = x \
32600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32602      new_path=`$CYGPATH -u "$path"`
32603    fi
32604    if test "x$new_path" = x; then
32605      # It's still not found. Now this is an unrecoverable error.
32606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32607$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32608      has_space=`$ECHO "$complete" | $GREP " "`
32609      if test "x$has_space" != x; then
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32612      fi
32613      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32614    fi
32615  fi
32616
32617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32620  # "foo.exe" is OK but "foo" is an error.
32621  #
32622  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32623  # It is also a way to make sure we got the proper file name for the real test later on.
32624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32625  if test "x$test_shortpath" = x; then
32626    # Short path failed, file does not exist as specified.
32627    # Try adding .exe or .cmd
32628    if test -f "${new_path}.exe"; then
32629      input_to_shortpath="${new_path}.exe"
32630    elif test -f "${new_path}.cmd"; then
32631      input_to_shortpath="${new_path}.cmd"
32632    else
32633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32634$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32635      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32636$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32637      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32638    fi
32639  else
32640    input_to_shortpath="$new_path"
32641  fi
32642
32643  # Call helper function which possibly converts this using DOS-style short mode.
32644  # If so, the updated path is stored in $new_path.
32645  new_path="$input_to_shortpath"
32646
32647  input_path="$input_to_shortpath"
32648  # Check if we need to convert this using DOS-style short mode. If the path
32649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32650  # take no chances and rewrite it.
32651  # Note: m4 eats our [], so we need to use [ and ] instead.
32652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32653  if test "x$has_forbidden_chars" != x; then
32654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32658      # Going to short mode and back again did indeed matter. Since short mode is
32659      # case insensitive, let's make it lowercase to improve readability.
32660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32661      # Now convert it back to Unix-stile (cygpath)
32662      input_path=`$CYGPATH -u "$shortmode_path"`
32663      new_path="$input_path"
32664    fi
32665  fi
32666
32667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32668  if test "x$test_cygdrive_prefix" = x; then
32669    # As a simple fix, exclude /usr/bin since it's not a real path.
32670    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32672      # a path prefixed by /cygdrive for fixpath to work.
32673      new_path="$CYGWIN_ROOT_PATH$input_path"
32674    fi
32675  fi
32676
32677  # remove trailing .exe if any
32678  new_path="${new_path/%.exe/}"
32679
32680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32681
32682  # First separate the path from the arguments. This will split at the first
32683  # space.
32684  complete="$OBJC"
32685  path="${complete%% *}"
32686  tmp="$complete EOL"
32687  arguments="${tmp#* }"
32688
32689  # Input might be given as Windows format, start by converting to
32690  # unix format.
32691  new_path="$path"
32692
32693  windows_path="$new_path"
32694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32695    unix_path=`$CYGPATH -u "$windows_path"`
32696    new_path="$unix_path"
32697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32699    new_path="$unix_path"
32700  fi
32701
32702
32703  # Now try to locate executable using which
32704  new_path=`$WHICH "$new_path" 2> /dev/null`
32705
32706  if test "x$new_path" = x; then
32707    # Oops. Which didn't find the executable.
32708    # The splitting of arguments from the executable at a space might have been incorrect,
32709    # since paths with space are more likely in Windows. Give it another try with the whole
32710    # argument.
32711    path="$complete"
32712    arguments="EOL"
32713    new_path="$path"
32714
32715  windows_path="$new_path"
32716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32717    unix_path=`$CYGPATH -u "$windows_path"`
32718    new_path="$unix_path"
32719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32721    new_path="$unix_path"
32722  fi
32723
32724
32725    new_path=`$WHICH "$new_path" 2> /dev/null`
32726
32727    if test "x$new_path" = x; then
32728      # It's still not found. Now this is an unrecoverable error.
32729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32730$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32731      has_space=`$ECHO "$complete" | $GREP " "`
32732      if test "x$has_space" != x; then
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32735      fi
32736      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32737    fi
32738  fi
32739
32740  # Now new_path has a complete unix path to the binary
32741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32742    # Keep paths in /bin as-is, but remove trailing .exe if any
32743    new_path="${new_path/%.exe/}"
32744    # Do not save /bin paths to all_fixpath_prefixes!
32745  else
32746    # Not in mixed or Windows style, start by that.
32747    new_path=`cmd //c echo $new_path`
32748
32749  input_path="$new_path"
32750  # Check if we need to convert this using DOS-style short mode. If the path
32751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32752  # take no chances and rewrite it.
32753  # Note: m4 eats our [], so we need to use [ and ] instead.
32754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32755  if test "x$has_forbidden_chars" != x; then
32756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32758  fi
32759
32760    # Output is in $new_path
32761
32762  windows_path="$new_path"
32763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32764    unix_path=`$CYGPATH -u "$windows_path"`
32765    new_path="$unix_path"
32766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32768    new_path="$unix_path"
32769  fi
32770
32771    # remove trailing .exe if any
32772    new_path="${new_path/%.exe/}"
32773
32774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32776  fi
32777
32778  else
32779    # We're on a posix platform. Hooray! :)
32780    # First separate the path from the arguments. This will split at the first
32781    # space.
32782    complete="$OBJC"
32783    path="${complete%% *}"
32784    tmp="$complete EOL"
32785    arguments="${tmp#* }"
32786
32787    # Cannot rely on the command "which" here since it doesn't always work.
32788    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32789    if test -z "$is_absolute_path"; then
32790      # Path to executable is not absolute. Find it.
32791      IFS_save="$IFS"
32792      IFS=:
32793      for p in $PATH; do
32794        if test -f "$p/$path" && test -x "$p/$path"; then
32795          new_path="$p/$path"
32796          break
32797        fi
32798      done
32799      IFS="$IFS_save"
32800    else
32801      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
32802$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
32803      new_path="$path"
32804    fi
32805
32806    if test "x$new_path" = x; then
32807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32808$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32809      has_space=`$ECHO "$complete" | $GREP " "`
32810      if test "x$has_space" != x; then
32811        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32812$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32813      fi
32814      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32815    fi
32816  fi
32817
32818  # Now join together the path and the arguments once again
32819  if test "x$arguments" != xEOL; then
32820    new_complete="$new_path ${arguments% *}"
32821  else
32822    new_complete="$new_path"
32823  fi
32824
32825  if test "x$complete" != "x$new_complete"; then
32826    OBJC="$new_complete"
32827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32828$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32829  fi
32830
32831  else
32832    OBJC=
32833  fi
32834
32835  # Restore the flags to the user specified values.
32836  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
32837  CFLAGS="$ORG_CFLAGS"
32838  CXXFLAGS="$ORG_CXXFLAGS"
32839  OBJCFLAGS="$ORG_OBJCFLAGS"
32840
32841  LD="$CC"
32842  LDEXE="$CC"
32843  LDCXX="$CXX"
32844  LDEXECXX="$CXX"
32845
32846  # LDEXE is the linker to use, when creating executables.
32847
32848  # Linking C++ libraries.
32849
32850  # Linking C++ executables.
32851
32852
32853  if test "x$OPENJDK_TARGET_OS" != xwindows; then
32854
32855
32856  # Publish this variable in the help.
32857
32858
32859  if test "x$AR" = x; then
32860    # The variable is not set by user, try to locate tool using the code snippet
32861    if test -n "$ac_tool_prefix"; then
32862  for ac_prog in ar
32863  do
32864    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32865set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32867$as_echo_n "checking for $ac_word... " >&6; }
32868if ${ac_cv_prog_AR+:} false; then :
32869  $as_echo_n "(cached) " >&6
32870else
32871  if test -n "$AR"; then
32872  ac_cv_prog_AR="$AR" # Let the user override the test.
32873else
32874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32875for as_dir in $PATH
32876do
32877  IFS=$as_save_IFS
32878  test -z "$as_dir" && as_dir=.
32879    for ac_exec_ext in '' $ac_executable_extensions; do
32880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32881    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32883    break 2
32884  fi
32885done
32886  done
32887IFS=$as_save_IFS
32888
32889fi
32890fi
32891AR=$ac_cv_prog_AR
32892if test -n "$AR"; then
32893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32894$as_echo "$AR" >&6; }
32895else
32896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32897$as_echo "no" >&6; }
32898fi
32899
32900
32901    test -n "$AR" && break
32902  done
32903fi
32904if test -z "$AR"; then
32905  ac_ct_AR=$AR
32906  for ac_prog in ar
32907do
32908  # Extract the first word of "$ac_prog", so it can be a program name with args.
32909set dummy $ac_prog; ac_word=$2
32910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32911$as_echo_n "checking for $ac_word... " >&6; }
32912if ${ac_cv_prog_ac_ct_AR+:} false; then :
32913  $as_echo_n "(cached) " >&6
32914else
32915  if test -n "$ac_ct_AR"; then
32916  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32917else
32918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32919for as_dir in $PATH
32920do
32921  IFS=$as_save_IFS
32922  test -z "$as_dir" && as_dir=.
32923    for ac_exec_ext in '' $ac_executable_extensions; do
32924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32925    ac_cv_prog_ac_ct_AR="$ac_prog"
32926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32927    break 2
32928  fi
32929done
32930  done
32931IFS=$as_save_IFS
32932
32933fi
32934fi
32935ac_ct_AR=$ac_cv_prog_ac_ct_AR
32936if test -n "$ac_ct_AR"; then
32937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32938$as_echo "$ac_ct_AR" >&6; }
32939else
32940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32941$as_echo "no" >&6; }
32942fi
32943
32944
32945  test -n "$ac_ct_AR" && break
32946done
32947
32948  if test "x$ac_ct_AR" = x; then
32949    AR=""
32950  else
32951    case $cross_compiling:$ac_tool_warned in
32952yes:)
32953{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32954$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32955ac_tool_warned=yes ;;
32956esac
32957    AR=$ac_ct_AR
32958  fi
32959fi
32960
32961  else
32962    # The variable is set, but is it from the command line or the environment?
32963
32964    # Try to remove the string !AR! from our list.
32965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32967      # If it failed, the variable was not from the command line. Ignore it,
32968      # but warn the user (except for BASH, which is always set by the calling BASH).
32969      if test "xAR" != xBASH; then
32970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32971$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32972      fi
32973      # Try to locate tool using the code snippet
32974      if test -n "$ac_tool_prefix"; then
32975  for ac_prog in ar
32976  do
32977    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32978set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32980$as_echo_n "checking for $ac_word... " >&6; }
32981if ${ac_cv_prog_AR+:} false; then :
32982  $as_echo_n "(cached) " >&6
32983else
32984  if test -n "$AR"; then
32985  ac_cv_prog_AR="$AR" # Let the user override the test.
32986else
32987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32988for as_dir in $PATH
32989do
32990  IFS=$as_save_IFS
32991  test -z "$as_dir" && as_dir=.
32992    for ac_exec_ext in '' $ac_executable_extensions; do
32993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32994    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32996    break 2
32997  fi
32998done
32999  done
33000IFS=$as_save_IFS
33001
33002fi
33003fi
33004AR=$ac_cv_prog_AR
33005if test -n "$AR"; then
33006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33007$as_echo "$AR" >&6; }
33008else
33009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33010$as_echo "no" >&6; }
33011fi
33012
33013
33014    test -n "$AR" && break
33015  done
33016fi
33017if test -z "$AR"; then
33018  ac_ct_AR=$AR
33019  for ac_prog in ar
33020do
33021  # Extract the first word of "$ac_prog", so it can be a program name with args.
33022set dummy $ac_prog; ac_word=$2
33023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33024$as_echo_n "checking for $ac_word... " >&6; }
33025if ${ac_cv_prog_ac_ct_AR+:} false; then :
33026  $as_echo_n "(cached) " >&6
33027else
33028  if test -n "$ac_ct_AR"; then
33029  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33030else
33031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33032for as_dir in $PATH
33033do
33034  IFS=$as_save_IFS
33035  test -z "$as_dir" && as_dir=.
33036    for ac_exec_ext in '' $ac_executable_extensions; do
33037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33038    ac_cv_prog_ac_ct_AR="$ac_prog"
33039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33040    break 2
33041  fi
33042done
33043  done
33044IFS=$as_save_IFS
33045
33046fi
33047fi
33048ac_ct_AR=$ac_cv_prog_ac_ct_AR
33049if test -n "$ac_ct_AR"; then
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33051$as_echo "$ac_ct_AR" >&6; }
33052else
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33054$as_echo "no" >&6; }
33055fi
33056
33057
33058  test -n "$ac_ct_AR" && break
33059done
33060
33061  if test "x$ac_ct_AR" = x; then
33062    AR=""
33063  else
33064    case $cross_compiling:$ac_tool_warned in
33065yes:)
33066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33068ac_tool_warned=yes ;;
33069esac
33070    AR=$ac_ct_AR
33071  fi
33072fi
33073
33074    else
33075      # If it succeeded, then it was overridden by the user. We will use it
33076      # for the tool.
33077
33078      # First remove it from the list of overridden variables, so we can test
33079      # for unknown variables in the end.
33080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33081
33082      # Check if the provided tool contains a complete path.
33083      tool_specified="$AR"
33084      tool_basename="${tool_specified##*/}"
33085      if test "x$tool_basename" = "x$tool_specified"; then
33086        # A command without a complete path is provided, search $PATH.
33087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33088$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33089        # Extract the first word of "$tool_basename", so it can be a program name with args.
33090set dummy $tool_basename; ac_word=$2
33091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33092$as_echo_n "checking for $ac_word... " >&6; }
33093if ${ac_cv_path_AR+:} false; then :
33094  $as_echo_n "(cached) " >&6
33095else
33096  case $AR in
33097  [\\/]* | ?:[\\/]*)
33098  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33099  ;;
33100  *)
33101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33102for as_dir in $PATH
33103do
33104  IFS=$as_save_IFS
33105  test -z "$as_dir" && as_dir=.
33106    for ac_exec_ext in '' $ac_executable_extensions; do
33107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33108    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33110    break 2
33111  fi
33112done
33113  done
33114IFS=$as_save_IFS
33115
33116  ;;
33117esac
33118fi
33119AR=$ac_cv_path_AR
33120if test -n "$AR"; then
33121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33122$as_echo "$AR" >&6; }
33123else
33124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33125$as_echo "no" >&6; }
33126fi
33127
33128
33129        if test "x$AR" = x; then
33130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33131        fi
33132      else
33133        # Otherwise we believe it is a complete path. Use it as it is.
33134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33135$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33137$as_echo_n "checking for AR... " >&6; }
33138        if test ! -x "$tool_specified"; then
33139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33140$as_echo "not found" >&6; }
33141          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33142        fi
33143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33144$as_echo "$tool_specified" >&6; }
33145      fi
33146    fi
33147  fi
33148
33149
33150
33151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33152
33153  # First separate the path from the arguments. This will split at the first
33154  # space.
33155  complete="$AR"
33156  path="${complete%% *}"
33157  tmp="$complete EOL"
33158  arguments="${tmp#* }"
33159
33160  # Input might be given as Windows format, start by converting to
33161  # unix format.
33162  new_path=`$CYGPATH -u "$path"`
33163
33164  # Now try to locate executable using which
33165  new_path=`$WHICH "$new_path" 2> /dev/null`
33166  # bat and cmd files are not always considered executable in cygwin causing which
33167  # to not find them
33168  if test "x$new_path" = x \
33169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33171    new_path=`$CYGPATH -u "$path"`
33172  fi
33173  if test "x$new_path" = x; then
33174    # Oops. Which didn't find the executable.
33175    # The splitting of arguments from the executable at a space might have been incorrect,
33176    # since paths with space are more likely in Windows. Give it another try with the whole
33177    # argument.
33178    path="$complete"
33179    arguments="EOL"
33180    new_path=`$CYGPATH -u "$path"`
33181    new_path=`$WHICH "$new_path" 2> /dev/null`
33182    # bat and cmd files are not always considered executable in cygwin causing which
33183    # to not find them
33184    if test "x$new_path" = x \
33185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33187      new_path=`$CYGPATH -u "$path"`
33188    fi
33189    if test "x$new_path" = x; then
33190      # It's still not found. Now this is an unrecoverable error.
33191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33192$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33193      has_space=`$ECHO "$complete" | $GREP " "`
33194      if test "x$has_space" != x; then
33195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33197      fi
33198      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33199    fi
33200  fi
33201
33202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33205  # "foo.exe" is OK but "foo" is an error.
33206  #
33207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33208  # It is also a way to make sure we got the proper file name for the real test later on.
33209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33210  if test "x$test_shortpath" = x; then
33211    # Short path failed, file does not exist as specified.
33212    # Try adding .exe or .cmd
33213    if test -f "${new_path}.exe"; then
33214      input_to_shortpath="${new_path}.exe"
33215    elif test -f "${new_path}.cmd"; then
33216      input_to_shortpath="${new_path}.cmd"
33217    else
33218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33219$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33222      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33223    fi
33224  else
33225    input_to_shortpath="$new_path"
33226  fi
33227
33228  # Call helper function which possibly converts this using DOS-style short mode.
33229  # If so, the updated path is stored in $new_path.
33230  new_path="$input_to_shortpath"
33231
33232  input_path="$input_to_shortpath"
33233  # Check if we need to convert this using DOS-style short mode. If the path
33234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33235  # take no chances and rewrite it.
33236  # Note: m4 eats our [], so we need to use [ and ] instead.
33237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33238  if test "x$has_forbidden_chars" != x; then
33239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33243      # Going to short mode and back again did indeed matter. Since short mode is
33244      # case insensitive, let's make it lowercase to improve readability.
33245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33246      # Now convert it back to Unix-stile (cygpath)
33247      input_path=`$CYGPATH -u "$shortmode_path"`
33248      new_path="$input_path"
33249    fi
33250  fi
33251
33252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33253  if test "x$test_cygdrive_prefix" = x; then
33254    # As a simple fix, exclude /usr/bin since it's not a real path.
33255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33257      # a path prefixed by /cygdrive for fixpath to work.
33258      new_path="$CYGWIN_ROOT_PATH$input_path"
33259    fi
33260  fi
33261
33262  # remove trailing .exe if any
33263  new_path="${new_path/%.exe/}"
33264
33265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266
33267  # First separate the path from the arguments. This will split at the first
33268  # space.
33269  complete="$AR"
33270  path="${complete%% *}"
33271  tmp="$complete EOL"
33272  arguments="${tmp#* }"
33273
33274  # Input might be given as Windows format, start by converting to
33275  # unix format.
33276  new_path="$path"
33277
33278  windows_path="$new_path"
33279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33280    unix_path=`$CYGPATH -u "$windows_path"`
33281    new_path="$unix_path"
33282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33284    new_path="$unix_path"
33285  fi
33286
33287
33288  # Now try to locate executable using which
33289  new_path=`$WHICH "$new_path" 2> /dev/null`
33290
33291  if test "x$new_path" = x; then
33292    # Oops. Which didn't find the executable.
33293    # The splitting of arguments from the executable at a space might have been incorrect,
33294    # since paths with space are more likely in Windows. Give it another try with the whole
33295    # argument.
33296    path="$complete"
33297    arguments="EOL"
33298    new_path="$path"
33299
33300  windows_path="$new_path"
33301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33302    unix_path=`$CYGPATH -u "$windows_path"`
33303    new_path="$unix_path"
33304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33306    new_path="$unix_path"
33307  fi
33308
33309
33310    new_path=`$WHICH "$new_path" 2> /dev/null`
33311
33312    if test "x$new_path" = x; then
33313      # It's still not found. Now this is an unrecoverable error.
33314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33315$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33316      has_space=`$ECHO "$complete" | $GREP " "`
33317      if test "x$has_space" != x; then
33318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33320      fi
33321      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33322    fi
33323  fi
33324
33325  # Now new_path has a complete unix path to the binary
33326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33327    # Keep paths in /bin as-is, but remove trailing .exe if any
33328    new_path="${new_path/%.exe/}"
33329    # Do not save /bin paths to all_fixpath_prefixes!
33330  else
33331    # Not in mixed or Windows style, start by that.
33332    new_path=`cmd //c echo $new_path`
33333
33334  input_path="$new_path"
33335  # Check if we need to convert this using DOS-style short mode. If the path
33336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33337  # take no chances and rewrite it.
33338  # Note: m4 eats our [], so we need to use [ and ] instead.
33339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33340  if test "x$has_forbidden_chars" != x; then
33341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33343  fi
33344
33345    # Output is in $new_path
33346
33347  windows_path="$new_path"
33348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33349    unix_path=`$CYGPATH -u "$windows_path"`
33350    new_path="$unix_path"
33351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33353    new_path="$unix_path"
33354  fi
33355
33356    # remove trailing .exe if any
33357    new_path="${new_path/%.exe/}"
33358
33359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33361  fi
33362
33363  else
33364    # We're on a posix platform. Hooray! :)
33365    # First separate the path from the arguments. This will split at the first
33366    # space.
33367    complete="$AR"
33368    path="${complete%% *}"
33369    tmp="$complete EOL"
33370    arguments="${tmp#* }"
33371
33372    # Cannot rely on the command "which" here since it doesn't always work.
33373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33374    if test -z "$is_absolute_path"; then
33375      # Path to executable is not absolute. Find it.
33376      IFS_save="$IFS"
33377      IFS=:
33378      for p in $PATH; do
33379        if test -f "$p/$path" && test -x "$p/$path"; then
33380          new_path="$p/$path"
33381          break
33382        fi
33383      done
33384      IFS="$IFS_save"
33385    else
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
33387$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
33388      new_path="$path"
33389    fi
33390
33391    if test "x$new_path" = x; then
33392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33393$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33394      has_space=`$ECHO "$complete" | $GREP " "`
33395      if test "x$has_space" != x; then
33396        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33398      fi
33399      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33400    fi
33401  fi
33402
33403  # Now join together the path and the arguments once again
33404  if test "x$arguments" != xEOL; then
33405    new_complete="$new_path ${arguments% *}"
33406  else
33407    new_complete="$new_path"
33408  fi
33409
33410  if test "x$complete" != "x$new_complete"; then
33411    AR="$new_complete"
33412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33413$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33414  fi
33415
33416  fi
33417  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
33418    ARFLAGS="-r"
33419  elif test "x$OPENJDK_TARGET_OS" = xaix; then
33420    ARFLAGS="-X64"
33421  else
33422    ARFLAGS=""
33423  fi
33424
33425
33426  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
33427  HOTSPOT_CXX="$CXX"
33428  HOTSPOT_LD="$LD"
33429
33430
33431
33432  COMPILER_NAME=gcc
33433  COMPILER_TYPE=CC
33434  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
33435
33436    # For now, assume that we are always compiling using cl.exe.
33437    CC_OUT_OPTION=-Fo
33438    EXE_OUT_OPTION=-out:
33439    LD_OUT_OPTION=-out:
33440    AR_OUT_OPTION=-out:
33441    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
33442    # program for something completely different.
33443    # Extract the first word of "link", so it can be a program name with args.
33444set dummy link; ac_word=$2
33445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33446$as_echo_n "checking for $ac_word... " >&6; }
33447if ${ac_cv_prog_WINLD+:} false; then :
33448  $as_echo_n "(cached) " >&6
33449else
33450  if test -n "$WINLD"; then
33451  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
33452else
33453  ac_prog_rejected=no
33454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33455for as_dir in $PATH
33456do
33457  IFS=$as_save_IFS
33458  test -z "$as_dir" && as_dir=.
33459    for ac_exec_ext in '' $ac_executable_extensions; do
33460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33461    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33462       ac_prog_rejected=yes
33463       continue
33464     fi
33465    ac_cv_prog_WINLD="link"
33466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33467    break 2
33468  fi
33469done
33470  done
33471IFS=$as_save_IFS
33472
33473if test $ac_prog_rejected = yes; then
33474  # We found a bogon in the path, so make sure we never use it.
33475  set dummy $ac_cv_prog_WINLD
33476  shift
33477  if test $# != 0; then
33478    # We chose a different compiler from the bogus one.
33479    # However, it has the same basename, so the bogon will be chosen
33480    # first if we set WINLD to just the basename; use the full file name.
33481    shift
33482    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
33483  fi
33484fi
33485fi
33486fi
33487WINLD=$ac_cv_prog_WINLD
33488if test -n "$WINLD"; then
33489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
33490$as_echo "$WINLD" >&6; }
33491else
33492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33493$as_echo "no" >&6; }
33494fi
33495
33496
33497    # Since we must ignore the first found link, WINLD will contain
33498    # the full path to the link.exe program.
33499
33500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33501
33502  # First separate the path from the arguments. This will split at the first
33503  # space.
33504  complete="$WINLD"
33505  path="${complete%% *}"
33506  tmp="$complete EOL"
33507  arguments="${tmp#* }"
33508
33509  # Input might be given as Windows format, start by converting to
33510  # unix format.
33511  new_path=`$CYGPATH -u "$path"`
33512
33513  # Now try to locate executable using which
33514  new_path=`$WHICH "$new_path" 2> /dev/null`
33515  # bat and cmd files are not always considered executable in cygwin causing which
33516  # to not find them
33517  if test "x$new_path" = x \
33518      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33519      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33520    new_path=`$CYGPATH -u "$path"`
33521  fi
33522  if test "x$new_path" = x; then
33523    # Oops. Which didn't find the executable.
33524    # The splitting of arguments from the executable at a space might have been incorrect,
33525    # since paths with space are more likely in Windows. Give it another try with the whole
33526    # argument.
33527    path="$complete"
33528    arguments="EOL"
33529    new_path=`$CYGPATH -u "$path"`
33530    new_path=`$WHICH "$new_path" 2> /dev/null`
33531    # bat and cmd files are not always considered executable in cygwin causing which
33532    # to not find them
33533    if test "x$new_path" = x \
33534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33536      new_path=`$CYGPATH -u "$path"`
33537    fi
33538    if test "x$new_path" = x; then
33539      # It's still not found. Now this is an unrecoverable error.
33540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33541$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33542      has_space=`$ECHO "$complete" | $GREP " "`
33543      if test "x$has_space" != x; then
33544        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33545$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33546      fi
33547      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33548    fi
33549  fi
33550
33551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33554  # "foo.exe" is OK but "foo" is an error.
33555  #
33556  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33557  # It is also a way to make sure we got the proper file name for the real test later on.
33558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33559  if test "x$test_shortpath" = x; then
33560    # Short path failed, file does not exist as specified.
33561    # Try adding .exe or .cmd
33562    if test -f "${new_path}.exe"; then
33563      input_to_shortpath="${new_path}.exe"
33564    elif test -f "${new_path}.cmd"; then
33565      input_to_shortpath="${new_path}.cmd"
33566    else
33567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
33568$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
33569      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33570$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33571      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33572    fi
33573  else
33574    input_to_shortpath="$new_path"
33575  fi
33576
33577  # Call helper function which possibly converts this using DOS-style short mode.
33578  # If so, the updated path is stored in $new_path.
33579  new_path="$input_to_shortpath"
33580
33581  input_path="$input_to_shortpath"
33582  # Check if we need to convert this using DOS-style short mode. If the path
33583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33584  # take no chances and rewrite it.
33585  # Note: m4 eats our [], so we need to use [ and ] instead.
33586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33587  if test "x$has_forbidden_chars" != x; then
33588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33592      # Going to short mode and back again did indeed matter. Since short mode is
33593      # case insensitive, let's make it lowercase to improve readability.
33594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33595      # Now convert it back to Unix-stile (cygpath)
33596      input_path=`$CYGPATH -u "$shortmode_path"`
33597      new_path="$input_path"
33598    fi
33599  fi
33600
33601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33602  if test "x$test_cygdrive_prefix" = x; then
33603    # As a simple fix, exclude /usr/bin since it's not a real path.
33604    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33606      # a path prefixed by /cygdrive for fixpath to work.
33607      new_path="$CYGWIN_ROOT_PATH$input_path"
33608    fi
33609  fi
33610
33611  # remove trailing .exe if any
33612  new_path="${new_path/%.exe/}"
33613
33614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33615
33616  # First separate the path from the arguments. This will split at the first
33617  # space.
33618  complete="$WINLD"
33619  path="${complete%% *}"
33620  tmp="$complete EOL"
33621  arguments="${tmp#* }"
33622
33623  # Input might be given as Windows format, start by converting to
33624  # unix format.
33625  new_path="$path"
33626
33627  windows_path="$new_path"
33628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33629    unix_path=`$CYGPATH -u "$windows_path"`
33630    new_path="$unix_path"
33631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33633    new_path="$unix_path"
33634  fi
33635
33636
33637  # Now try to locate executable using which
33638  new_path=`$WHICH "$new_path" 2> /dev/null`
33639
33640  if test "x$new_path" = x; then
33641    # Oops. Which didn't find the executable.
33642    # The splitting of arguments from the executable at a space might have been incorrect,
33643    # since paths with space are more likely in Windows. Give it another try with the whole
33644    # argument.
33645    path="$complete"
33646    arguments="EOL"
33647    new_path="$path"
33648
33649  windows_path="$new_path"
33650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33651    unix_path=`$CYGPATH -u "$windows_path"`
33652    new_path="$unix_path"
33653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33655    new_path="$unix_path"
33656  fi
33657
33658
33659    new_path=`$WHICH "$new_path" 2> /dev/null`
33660
33661    if test "x$new_path" = x; then
33662      # It's still not found. Now this is an unrecoverable error.
33663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33664$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33665      has_space=`$ECHO "$complete" | $GREP " "`
33666      if test "x$has_space" != x; then
33667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33669      fi
33670      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33671    fi
33672  fi
33673
33674  # Now new_path has a complete unix path to the binary
33675  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33676    # Keep paths in /bin as-is, but remove trailing .exe if any
33677    new_path="${new_path/%.exe/}"
33678    # Do not save /bin paths to all_fixpath_prefixes!
33679  else
33680    # Not in mixed or Windows style, start by that.
33681    new_path=`cmd //c echo $new_path`
33682
33683  input_path="$new_path"
33684  # Check if we need to convert this using DOS-style short mode. If the path
33685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33686  # take no chances and rewrite it.
33687  # Note: m4 eats our [], so we need to use [ and ] instead.
33688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33689  if test "x$has_forbidden_chars" != x; then
33690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33692  fi
33693
33694    # Output is in $new_path
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    # remove trailing .exe if any
33706    new_path="${new_path/%.exe/}"
33707
33708    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33709    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33710  fi
33711
33712  else
33713    # We're on a posix platform. Hooray! :)
33714    # First separate the path from the arguments. This will split at the first
33715    # space.
33716    complete="$WINLD"
33717    path="${complete%% *}"
33718    tmp="$complete EOL"
33719    arguments="${tmp#* }"
33720
33721    # Cannot rely on the command "which" here since it doesn't always work.
33722    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33723    if test -z "$is_absolute_path"; then
33724      # Path to executable is not absolute. Find it.
33725      IFS_save="$IFS"
33726      IFS=:
33727      for p in $PATH; do
33728        if test -f "$p/$path" && test -x "$p/$path"; then
33729          new_path="$p/$path"
33730          break
33731        fi
33732      done
33733      IFS="$IFS_save"
33734    else
33735      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
33736$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
33737      new_path="$path"
33738    fi
33739
33740    if test "x$new_path" = x; then
33741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33742$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33743      has_space=`$ECHO "$complete" | $GREP " "`
33744      if test "x$has_space" != x; then
33745        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33746$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33747      fi
33748      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33749    fi
33750  fi
33751
33752  # Now join together the path and the arguments once again
33753  if test "x$arguments" != xEOL; then
33754    new_complete="$new_path ${arguments% *}"
33755  else
33756    new_complete="$new_path"
33757  fi
33758
33759  if test "x$complete" != "x$new_complete"; then
33760    WINLD="$new_complete"
33761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
33762$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
33763  fi
33764
33765    printf "Windows linker was found at $WINLD\n"
33766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33767$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33768    "$WINLD" --version > /dev/null
33769    if test $? -eq 0 ; then
33770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33771$as_echo "no" >&6; }
33772      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33773    else
33774      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33775$as_echo "yes" >&6; }
33776    fi
33777    LD="$WINLD"
33778    LDEXE="$WINLD"
33779    LDCXX="$WINLD"
33780    LDEXECXX="$WINLD"
33781
33782    # Extract the first word of "mt", so it can be a program name with args.
33783set dummy mt; ac_word=$2
33784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33785$as_echo_n "checking for $ac_word... " >&6; }
33786if ${ac_cv_prog_MT+:} false; then :
33787  $as_echo_n "(cached) " >&6
33788else
33789  if test -n "$MT"; then
33790  ac_cv_prog_MT="$MT" # Let the user override the test.
33791else
33792  ac_prog_rejected=no
33793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33794for as_dir in $PATH
33795do
33796  IFS=$as_save_IFS
33797  test -z "$as_dir" && as_dir=.
33798    for ac_exec_ext in '' $ac_executable_extensions; do
33799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33800    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33801       ac_prog_rejected=yes
33802       continue
33803     fi
33804    ac_cv_prog_MT="mt"
33805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33806    break 2
33807  fi
33808done
33809  done
33810IFS=$as_save_IFS
33811
33812if test $ac_prog_rejected = yes; then
33813  # We found a bogon in the path, so make sure we never use it.
33814  set dummy $ac_cv_prog_MT
33815  shift
33816  if test $# != 0; then
33817    # We chose a different compiler from the bogus one.
33818    # However, it has the same basename, so the bogon will be chosen
33819    # first if we set MT to just the basename; use the full file name.
33820    shift
33821    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33822  fi
33823fi
33824fi
33825fi
33826MT=$ac_cv_prog_MT
33827if test -n "$MT"; then
33828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33829$as_echo "$MT" >&6; }
33830else
33831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33832$as_echo "no" >&6; }
33833fi
33834
33835
33836
33837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33838
33839  # First separate the path from the arguments. This will split at the first
33840  # space.
33841  complete="$MT"
33842  path="${complete%% *}"
33843  tmp="$complete EOL"
33844  arguments="${tmp#* }"
33845
33846  # Input might be given as Windows format, start by converting to
33847  # unix format.
33848  new_path=`$CYGPATH -u "$path"`
33849
33850  # Now try to locate executable using which
33851  new_path=`$WHICH "$new_path" 2> /dev/null`
33852  # bat and cmd files are not always considered executable in cygwin causing which
33853  # to not find them
33854  if test "x$new_path" = x \
33855      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33856      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33857    new_path=`$CYGPATH -u "$path"`
33858  fi
33859  if test "x$new_path" = x; then
33860    # Oops. Which didn't find the executable.
33861    # The splitting of arguments from the executable at a space might have been incorrect,
33862    # since paths with space are more likely in Windows. Give it another try with the whole
33863    # argument.
33864    path="$complete"
33865    arguments="EOL"
33866    new_path=`$CYGPATH -u "$path"`
33867    new_path=`$WHICH "$new_path" 2> /dev/null`
33868    # bat and cmd files are not always considered executable in cygwin causing which
33869    # to not find them
33870    if test "x$new_path" = x \
33871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33873      new_path=`$CYGPATH -u "$path"`
33874    fi
33875    if test "x$new_path" = x; then
33876      # It's still not found. Now this is an unrecoverable error.
33877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33878$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33879      has_space=`$ECHO "$complete" | $GREP " "`
33880      if test "x$has_space" != x; then
33881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33883      fi
33884      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33885    fi
33886  fi
33887
33888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33891  # "foo.exe" is OK but "foo" is an error.
33892  #
33893  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33894  # It is also a way to make sure we got the proper file name for the real test later on.
33895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33896  if test "x$test_shortpath" = x; then
33897    # Short path failed, file does not exist as specified.
33898    # Try adding .exe or .cmd
33899    if test -f "${new_path}.exe"; then
33900      input_to_shortpath="${new_path}.exe"
33901    elif test -f "${new_path}.cmd"; then
33902      input_to_shortpath="${new_path}.cmd"
33903    else
33904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33905$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33906      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33907$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33908      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33909    fi
33910  else
33911    input_to_shortpath="$new_path"
33912  fi
33913
33914  # Call helper function which possibly converts this using DOS-style short mode.
33915  # If so, the updated path is stored in $new_path.
33916  new_path="$input_to_shortpath"
33917
33918  input_path="$input_to_shortpath"
33919  # Check if we need to convert this using DOS-style short mode. If the path
33920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33921  # take no chances and rewrite it.
33922  # Note: m4 eats our [], so we need to use [ and ] instead.
33923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33924  if test "x$has_forbidden_chars" != x; then
33925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33926    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33927    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33928    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33929      # Going to short mode and back again did indeed matter. Since short mode is
33930      # case insensitive, let's make it lowercase to improve readability.
33931      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33932      # Now convert it back to Unix-stile (cygpath)
33933      input_path=`$CYGPATH -u "$shortmode_path"`
33934      new_path="$input_path"
33935    fi
33936  fi
33937
33938  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33939  if test "x$test_cygdrive_prefix" = x; then
33940    # As a simple fix, exclude /usr/bin since it's not a real path.
33941    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33942      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33943      # a path prefixed by /cygdrive for fixpath to work.
33944      new_path="$CYGWIN_ROOT_PATH$input_path"
33945    fi
33946  fi
33947
33948  # remove trailing .exe if any
33949  new_path="${new_path/%.exe/}"
33950
33951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33952
33953  # First separate the path from the arguments. This will split at the first
33954  # space.
33955  complete="$MT"
33956  path="${complete%% *}"
33957  tmp="$complete EOL"
33958  arguments="${tmp#* }"
33959
33960  # Input might be given as Windows format, start by converting to
33961  # unix format.
33962  new_path="$path"
33963
33964  windows_path="$new_path"
33965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33966    unix_path=`$CYGPATH -u "$windows_path"`
33967    new_path="$unix_path"
33968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33970    new_path="$unix_path"
33971  fi
33972
33973
33974  # Now try to locate executable using which
33975  new_path=`$WHICH "$new_path" 2> /dev/null`
33976
33977  if test "x$new_path" = x; then
33978    # Oops. Which didn't find the executable.
33979    # The splitting of arguments from the executable at a space might have been incorrect,
33980    # since paths with space are more likely in Windows. Give it another try with the whole
33981    # argument.
33982    path="$complete"
33983    arguments="EOL"
33984    new_path="$path"
33985
33986  windows_path="$new_path"
33987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33988    unix_path=`$CYGPATH -u "$windows_path"`
33989    new_path="$unix_path"
33990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33992    new_path="$unix_path"
33993  fi
33994
33995
33996    new_path=`$WHICH "$new_path" 2> /dev/null`
33997
33998    if test "x$new_path" = x; then
33999      # It's still not found. Now this is an unrecoverable error.
34000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34001$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34002      has_space=`$ECHO "$complete" | $GREP " "`
34003      if test "x$has_space" != x; then
34004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34006      fi
34007      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34008    fi
34009  fi
34010
34011  # Now new_path has a complete unix path to the binary
34012  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34013    # Keep paths in /bin as-is, but remove trailing .exe if any
34014    new_path="${new_path/%.exe/}"
34015    # Do not save /bin paths to all_fixpath_prefixes!
34016  else
34017    # Not in mixed or Windows style, start by that.
34018    new_path=`cmd //c echo $new_path`
34019
34020  input_path="$new_path"
34021  # Check if we need to convert this using DOS-style short mode. If the path
34022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34023  # take no chances and rewrite it.
34024  # Note: m4 eats our [], so we need to use [ and ] instead.
34025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34026  if test "x$has_forbidden_chars" != x; then
34027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34029  fi
34030
34031    # Output is in $new_path
34032
34033  windows_path="$new_path"
34034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34035    unix_path=`$CYGPATH -u "$windows_path"`
34036    new_path="$unix_path"
34037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34039    new_path="$unix_path"
34040  fi
34041
34042    # remove trailing .exe if any
34043    new_path="${new_path/%.exe/}"
34044
34045    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34046    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34047  fi
34048
34049  else
34050    # We're on a posix platform. Hooray! :)
34051    # First separate the path from the arguments. This will split at the first
34052    # space.
34053    complete="$MT"
34054    path="${complete%% *}"
34055    tmp="$complete EOL"
34056    arguments="${tmp#* }"
34057
34058    # Cannot rely on the command "which" here since it doesn't always work.
34059    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34060    if test -z "$is_absolute_path"; then
34061      # Path to executable is not absolute. Find it.
34062      IFS_save="$IFS"
34063      IFS=:
34064      for p in $PATH; do
34065        if test -f "$p/$path" && test -x "$p/$path"; then
34066          new_path="$p/$path"
34067          break
34068        fi
34069      done
34070      IFS="$IFS_save"
34071    else
34072      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
34073$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
34074      new_path="$path"
34075    fi
34076
34077    if test "x$new_path" = x; then
34078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34079$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34080      has_space=`$ECHO "$complete" | $GREP " "`
34081      if test "x$has_space" != x; then
34082        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34083$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34084      fi
34085      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34086    fi
34087  fi
34088
34089  # Now join together the path and the arguments once again
34090  if test "x$arguments" != xEOL; then
34091    new_complete="$new_path ${arguments% *}"
34092  else
34093    new_complete="$new_path"
34094  fi
34095
34096  if test "x$complete" != "x$new_complete"; then
34097    MT="$new_complete"
34098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34099$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34100  fi
34101
34102    # The resource compiler
34103    # Extract the first word of "rc", so it can be a program name with args.
34104set dummy rc; ac_word=$2
34105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34106$as_echo_n "checking for $ac_word... " >&6; }
34107if ${ac_cv_prog_RC+:} false; then :
34108  $as_echo_n "(cached) " >&6
34109else
34110  if test -n "$RC"; then
34111  ac_cv_prog_RC="$RC" # Let the user override the test.
34112else
34113  ac_prog_rejected=no
34114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34115for as_dir in $PATH
34116do
34117  IFS=$as_save_IFS
34118  test -z "$as_dir" && as_dir=.
34119    for ac_exec_ext in '' $ac_executable_extensions; do
34120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34121    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34122       ac_prog_rejected=yes
34123       continue
34124     fi
34125    ac_cv_prog_RC="rc"
34126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34127    break 2
34128  fi
34129done
34130  done
34131IFS=$as_save_IFS
34132
34133if test $ac_prog_rejected = yes; then
34134  # We found a bogon in the path, so make sure we never use it.
34135  set dummy $ac_cv_prog_RC
34136  shift
34137  if test $# != 0; then
34138    # We chose a different compiler from the bogus one.
34139    # However, it has the same basename, so the bogon will be chosen
34140    # first if we set RC to just the basename; use the full file name.
34141    shift
34142    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34143  fi
34144fi
34145fi
34146fi
34147RC=$ac_cv_prog_RC
34148if test -n "$RC"; then
34149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34150$as_echo "$RC" >&6; }
34151else
34152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34153$as_echo "no" >&6; }
34154fi
34155
34156
34157
34158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34159
34160  # First separate the path from the arguments. This will split at the first
34161  # space.
34162  complete="$RC"
34163  path="${complete%% *}"
34164  tmp="$complete EOL"
34165  arguments="${tmp#* }"
34166
34167  # Input might be given as Windows format, start by converting to
34168  # unix format.
34169  new_path=`$CYGPATH -u "$path"`
34170
34171  # Now try to locate executable using which
34172  new_path=`$WHICH "$new_path" 2> /dev/null`
34173  # bat and cmd files are not always considered executable in cygwin causing which
34174  # to not find them
34175  if test "x$new_path" = x \
34176      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34177      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34178    new_path=`$CYGPATH -u "$path"`
34179  fi
34180  if test "x$new_path" = x; then
34181    # Oops. Which didn't find the executable.
34182    # The splitting of arguments from the executable at a space might have been incorrect,
34183    # since paths with space are more likely in Windows. Give it another try with the whole
34184    # argument.
34185    path="$complete"
34186    arguments="EOL"
34187    new_path=`$CYGPATH -u "$path"`
34188    new_path=`$WHICH "$new_path" 2> /dev/null`
34189    # bat and cmd files are not always considered executable in cygwin causing which
34190    # to not find them
34191    if test "x$new_path" = x \
34192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34194      new_path=`$CYGPATH -u "$path"`
34195    fi
34196    if test "x$new_path" = x; then
34197      # It's still not found. Now this is an unrecoverable error.
34198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34199$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34200      has_space=`$ECHO "$complete" | $GREP " "`
34201      if test "x$has_space" != x; then
34202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34204      fi
34205      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34206    fi
34207  fi
34208
34209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34212  # "foo.exe" is OK but "foo" is an error.
34213  #
34214  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34215  # It is also a way to make sure we got the proper file name for the real test later on.
34216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34217  if test "x$test_shortpath" = x; then
34218    # Short path failed, file does not exist as specified.
34219    # Try adding .exe or .cmd
34220    if test -f "${new_path}.exe"; then
34221      input_to_shortpath="${new_path}.exe"
34222    elif test -f "${new_path}.cmd"; then
34223      input_to_shortpath="${new_path}.cmd"
34224    else
34225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34226$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34229      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34230    fi
34231  else
34232    input_to_shortpath="$new_path"
34233  fi
34234
34235  # Call helper function which possibly converts this using DOS-style short mode.
34236  # If so, the updated path is stored in $new_path.
34237  new_path="$input_to_shortpath"
34238
34239  input_path="$input_to_shortpath"
34240  # Check if we need to convert this using DOS-style short mode. If the path
34241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34242  # take no chances and rewrite it.
34243  # Note: m4 eats our [], so we need to use [ and ] instead.
34244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34245  if test "x$has_forbidden_chars" != x; then
34246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34250      # Going to short mode and back again did indeed matter. Since short mode is
34251      # case insensitive, let's make it lowercase to improve readability.
34252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34253      # Now convert it back to Unix-stile (cygpath)
34254      input_path=`$CYGPATH -u "$shortmode_path"`
34255      new_path="$input_path"
34256    fi
34257  fi
34258
34259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34260  if test "x$test_cygdrive_prefix" = x; then
34261    # As a simple fix, exclude /usr/bin since it's not a real path.
34262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34264      # a path prefixed by /cygdrive for fixpath to work.
34265      new_path="$CYGWIN_ROOT_PATH$input_path"
34266    fi
34267  fi
34268
34269  # remove trailing .exe if any
34270  new_path="${new_path/%.exe/}"
34271
34272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34273
34274  # First separate the path from the arguments. This will split at the first
34275  # space.
34276  complete="$RC"
34277  path="${complete%% *}"
34278  tmp="$complete EOL"
34279  arguments="${tmp#* }"
34280
34281  # Input might be given as Windows format, start by converting to
34282  # unix format.
34283  new_path="$path"
34284
34285  windows_path="$new_path"
34286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34287    unix_path=`$CYGPATH -u "$windows_path"`
34288    new_path="$unix_path"
34289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34291    new_path="$unix_path"
34292  fi
34293
34294
34295  # Now try to locate executable using which
34296  new_path=`$WHICH "$new_path" 2> /dev/null`
34297
34298  if test "x$new_path" = x; then
34299    # Oops. Which didn't find the executable.
34300    # The splitting of arguments from the executable at a space might have been incorrect,
34301    # since paths with space are more likely in Windows. Give it another try with the whole
34302    # argument.
34303    path="$complete"
34304    arguments="EOL"
34305    new_path="$path"
34306
34307  windows_path="$new_path"
34308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34309    unix_path=`$CYGPATH -u "$windows_path"`
34310    new_path="$unix_path"
34311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34313    new_path="$unix_path"
34314  fi
34315
34316
34317    new_path=`$WHICH "$new_path" 2> /dev/null`
34318
34319    if test "x$new_path" = x; then
34320      # It's still not found. Now this is an unrecoverable error.
34321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34322$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34323      has_space=`$ECHO "$complete" | $GREP " "`
34324      if test "x$has_space" != x; then
34325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34327      fi
34328      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34329    fi
34330  fi
34331
34332  # Now new_path has a complete unix path to the binary
34333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34334    # Keep paths in /bin as-is, but remove trailing .exe if any
34335    new_path="${new_path/%.exe/}"
34336    # Do not save /bin paths to all_fixpath_prefixes!
34337  else
34338    # Not in mixed or Windows style, start by that.
34339    new_path=`cmd //c echo $new_path`
34340
34341  input_path="$new_path"
34342  # Check if we need to convert this using DOS-style short mode. If the path
34343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34344  # take no chances and rewrite it.
34345  # Note: m4 eats our [], so we need to use [ and ] instead.
34346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34347  if test "x$has_forbidden_chars" != x; then
34348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34350  fi
34351
34352    # Output is in $new_path
34353
34354  windows_path="$new_path"
34355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34356    unix_path=`$CYGPATH -u "$windows_path"`
34357    new_path="$unix_path"
34358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34360    new_path="$unix_path"
34361  fi
34362
34363    # remove trailing .exe if any
34364    new_path="${new_path/%.exe/}"
34365
34366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34368  fi
34369
34370  else
34371    # We're on a posix platform. Hooray! :)
34372    # First separate the path from the arguments. This will split at the first
34373    # space.
34374    complete="$RC"
34375    path="${complete%% *}"
34376    tmp="$complete EOL"
34377    arguments="${tmp#* }"
34378
34379    # Cannot rely on the command "which" here since it doesn't always work.
34380    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34381    if test -z "$is_absolute_path"; then
34382      # Path to executable is not absolute. Find it.
34383      IFS_save="$IFS"
34384      IFS=:
34385      for p in $PATH; do
34386        if test -f "$p/$path" && test -x "$p/$path"; then
34387          new_path="$p/$path"
34388          break
34389        fi
34390      done
34391      IFS="$IFS_save"
34392    else
34393      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
34394$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
34395      new_path="$path"
34396    fi
34397
34398    if test "x$new_path" = x; then
34399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34400$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34401      has_space=`$ECHO "$complete" | $GREP " "`
34402      if test "x$has_space" != x; then
34403        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34404$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34405      fi
34406      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34407    fi
34408  fi
34409
34410  # Now join together the path and the arguments once again
34411  if test "x$arguments" != xEOL; then
34412    new_complete="$new_path ${arguments% *}"
34413  else
34414    new_complete="$new_path"
34415  fi
34416
34417  if test "x$complete" != "x$new_complete"; then
34418    RC="$new_complete"
34419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34420$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34421  fi
34422
34423
34424    # For hotspot, we need these in Windows mixed path,
34425    # so rewrite them all. Need added .exe suffix.
34426    HOTSPOT_CXX="$CXX.exe"
34427    HOTSPOT_LD="$LD.exe"
34428    HOTSPOT_MT="$MT.exe"
34429    HOTSPOT_RC="$RC.exe"
34430
34431  unix_path="$HOTSPOT_CXX"
34432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34433    windows_path=`$CYGPATH -m "$unix_path"`
34434    HOTSPOT_CXX="$windows_path"
34435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34436    windows_path=`cmd //c echo $unix_path`
34437    HOTSPOT_CXX="$windows_path"
34438  fi
34439
34440
34441  unix_path="$HOTSPOT_LD"
34442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34443    windows_path=`$CYGPATH -m "$unix_path"`
34444    HOTSPOT_LD="$windows_path"
34445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34446    windows_path=`cmd //c echo $unix_path`
34447    HOTSPOT_LD="$windows_path"
34448  fi
34449
34450
34451  unix_path="$HOTSPOT_MT"
34452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34453    windows_path=`$CYGPATH -m "$unix_path"`
34454    HOTSPOT_MT="$windows_path"
34455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34456    windows_path=`cmd //c echo $unix_path`
34457    HOTSPOT_MT="$windows_path"
34458  fi
34459
34460
34461  unix_path="$HOTSPOT_RC"
34462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34463    windows_path=`$CYGPATH -m "$unix_path"`
34464    HOTSPOT_RC="$windows_path"
34465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34466    windows_path=`cmd //c echo $unix_path`
34467    HOTSPOT_RC="$windows_path"
34468  fi
34469
34470
34471
34472
34473    RC_FLAGS="-nologo -l 0x409 -r"
34474    if test "x$VARIANT" = xOPT; then :
34475
34476    RC_FLAGS="$RC_FLAGS -d NDEBUG"
34477
34478fi
34479
34480  # The version variables used to create RC_FLAGS may be overridden
34481  # in a custom configure script, or possibly the command line.
34482  # Let those variables be expanded at make time in spec.gmk.
34483  # The \$ are escaped to the shell, and the $(...) variables
34484  # are evaluated by make.
34485  RC_FLAGS="$RC_FLAGS \
34486      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
34487      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
34488      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
34489      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
34490      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
34491      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
34492      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
34493
34494  # lib.exe is used to create static libraries.
34495  # Extract the first word of "lib", so it can be a program name with args.
34496set dummy lib; ac_word=$2
34497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34498$as_echo_n "checking for $ac_word... " >&6; }
34499if ${ac_cv_prog_WINAR+:} false; then :
34500  $as_echo_n "(cached) " >&6
34501else
34502  if test -n "$WINAR"; then
34503  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
34504else
34505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34506for as_dir in $PATH
34507do
34508  IFS=$as_save_IFS
34509  test -z "$as_dir" && as_dir=.
34510    for ac_exec_ext in '' $ac_executable_extensions; do
34511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34512    ac_cv_prog_WINAR="lib"
34513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34514    break 2
34515  fi
34516done
34517  done
34518IFS=$as_save_IFS
34519
34520fi
34521fi
34522WINAR=$ac_cv_prog_WINAR
34523if test -n "$WINAR"; then
34524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
34525$as_echo "$WINAR" >&6; }
34526else
34527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34528$as_echo "no" >&6; }
34529fi
34530
34531
34532
34533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534
34535  # First separate the path from the arguments. This will split at the first
34536  # space.
34537  complete="$WINAR"
34538  path="${complete%% *}"
34539  tmp="$complete EOL"
34540  arguments="${tmp#* }"
34541
34542  # Input might be given as Windows format, start by converting to
34543  # unix format.
34544  new_path=`$CYGPATH -u "$path"`
34545
34546  # Now try to locate executable using which
34547  new_path=`$WHICH "$new_path" 2> /dev/null`
34548  # bat and cmd files are not always considered executable in cygwin causing which
34549  # to not find them
34550  if test "x$new_path" = x \
34551      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34552      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34553    new_path=`$CYGPATH -u "$path"`
34554  fi
34555  if test "x$new_path" = x; then
34556    # Oops. Which didn't find the executable.
34557    # The splitting of arguments from the executable at a space might have been incorrect,
34558    # since paths with space are more likely in Windows. Give it another try with the whole
34559    # argument.
34560    path="$complete"
34561    arguments="EOL"
34562    new_path=`$CYGPATH -u "$path"`
34563    new_path=`$WHICH "$new_path" 2> /dev/null`
34564    # bat and cmd files are not always considered executable in cygwin causing which
34565    # to not find them
34566    if test "x$new_path" = x \
34567        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34568        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34569      new_path=`$CYGPATH -u "$path"`
34570    fi
34571    if test "x$new_path" = x; then
34572      # It's still not found. Now this is an unrecoverable error.
34573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34574$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34575      has_space=`$ECHO "$complete" | $GREP " "`
34576      if test "x$has_space" != x; then
34577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34579      fi
34580      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34581    fi
34582  fi
34583
34584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34587  # "foo.exe" is OK but "foo" is an error.
34588  #
34589  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34590  # It is also a way to make sure we got the proper file name for the real test later on.
34591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34592  if test "x$test_shortpath" = x; then
34593    # Short path failed, file does not exist as specified.
34594    # Try adding .exe or .cmd
34595    if test -f "${new_path}.exe"; then
34596      input_to_shortpath="${new_path}.exe"
34597    elif test -f "${new_path}.cmd"; then
34598      input_to_shortpath="${new_path}.cmd"
34599    else
34600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
34601$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
34602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34604      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34605    fi
34606  else
34607    input_to_shortpath="$new_path"
34608  fi
34609
34610  # Call helper function which possibly converts this using DOS-style short mode.
34611  # If so, the updated path is stored in $new_path.
34612  new_path="$input_to_shortpath"
34613
34614  input_path="$input_to_shortpath"
34615  # Check if we need to convert this using DOS-style short mode. If the path
34616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34617  # take no chances and rewrite it.
34618  # Note: m4 eats our [], so we need to use [ and ] instead.
34619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34620  if test "x$has_forbidden_chars" != x; then
34621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34625      # Going to short mode and back again did indeed matter. Since short mode is
34626      # case insensitive, let's make it lowercase to improve readability.
34627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34628      # Now convert it back to Unix-stile (cygpath)
34629      input_path=`$CYGPATH -u "$shortmode_path"`
34630      new_path="$input_path"
34631    fi
34632  fi
34633
34634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34635  if test "x$test_cygdrive_prefix" = x; then
34636    # As a simple fix, exclude /usr/bin since it's not a real path.
34637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34639      # a path prefixed by /cygdrive for fixpath to work.
34640      new_path="$CYGWIN_ROOT_PATH$input_path"
34641    fi
34642  fi
34643
34644  # remove trailing .exe if any
34645  new_path="${new_path/%.exe/}"
34646
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648
34649  # First separate the path from the arguments. This will split at the first
34650  # space.
34651  complete="$WINAR"
34652  path="${complete%% *}"
34653  tmp="$complete EOL"
34654  arguments="${tmp#* }"
34655
34656  # Input might be given as Windows format, start by converting to
34657  # unix format.
34658  new_path="$path"
34659
34660  windows_path="$new_path"
34661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34662    unix_path=`$CYGPATH -u "$windows_path"`
34663    new_path="$unix_path"
34664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34666    new_path="$unix_path"
34667  fi
34668
34669
34670  # Now try to locate executable using which
34671  new_path=`$WHICH "$new_path" 2> /dev/null`
34672
34673  if test "x$new_path" = x; then
34674    # Oops. Which didn't find the executable.
34675    # The splitting of arguments from the executable at a space might have been incorrect,
34676    # since paths with space are more likely in Windows. Give it another try with the whole
34677    # argument.
34678    path="$complete"
34679    arguments="EOL"
34680    new_path="$path"
34681
34682  windows_path="$new_path"
34683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34684    unix_path=`$CYGPATH -u "$windows_path"`
34685    new_path="$unix_path"
34686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34688    new_path="$unix_path"
34689  fi
34690
34691
34692    new_path=`$WHICH "$new_path" 2> /dev/null`
34693
34694    if test "x$new_path" = x; then
34695      # It's still not found. Now this is an unrecoverable error.
34696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34697$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34698      has_space=`$ECHO "$complete" | $GREP " "`
34699      if test "x$has_space" != x; then
34700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34702      fi
34703      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34704    fi
34705  fi
34706
34707  # Now new_path has a complete unix path to the binary
34708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34709    # Keep paths in /bin as-is, but remove trailing .exe if any
34710    new_path="${new_path/%.exe/}"
34711    # Do not save /bin paths to all_fixpath_prefixes!
34712  else
34713    # Not in mixed or Windows style, start by that.
34714    new_path=`cmd //c echo $new_path`
34715
34716  input_path="$new_path"
34717  # Check if we need to convert this using DOS-style short mode. If the path
34718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34719  # take no chances and rewrite it.
34720  # Note: m4 eats our [], so we need to use [ and ] instead.
34721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34722  if test "x$has_forbidden_chars" != x; then
34723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34725  fi
34726
34727    # Output is in $new_path
34728
34729  windows_path="$new_path"
34730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34731    unix_path=`$CYGPATH -u "$windows_path"`
34732    new_path="$unix_path"
34733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34735    new_path="$unix_path"
34736  fi
34737
34738    # remove trailing .exe if any
34739    new_path="${new_path/%.exe/}"
34740
34741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34743  fi
34744
34745  else
34746    # We're on a posix platform. Hooray! :)
34747    # First separate the path from the arguments. This will split at the first
34748    # space.
34749    complete="$WINAR"
34750    path="${complete%% *}"
34751    tmp="$complete EOL"
34752    arguments="${tmp#* }"
34753
34754    # Cannot rely on the command "which" here since it doesn't always work.
34755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34756    if test -z "$is_absolute_path"; then
34757      # Path to executable is not absolute. Find it.
34758      IFS_save="$IFS"
34759      IFS=:
34760      for p in $PATH; do
34761        if test -f "$p/$path" && test -x "$p/$path"; then
34762          new_path="$p/$path"
34763          break
34764        fi
34765      done
34766      IFS="$IFS_save"
34767    else
34768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
34769$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
34770      new_path="$path"
34771    fi
34772
34773    if test "x$new_path" = x; then
34774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34775$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34776      has_space=`$ECHO "$complete" | $GREP " "`
34777      if test "x$has_space" != x; then
34778        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34780      fi
34781      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34782    fi
34783  fi
34784
34785  # Now join together the path and the arguments once again
34786  if test "x$arguments" != xEOL; then
34787    new_complete="$new_path ${arguments% *}"
34788  else
34789    new_complete="$new_path"
34790  fi
34791
34792  if test "x$complete" != "x$new_complete"; then
34793    WINAR="$new_complete"
34794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
34795$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
34796  fi
34797
34798  AR="$WINAR"
34799  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
34800
34801  # Extract the first word of "dumpbin", so it can be a program name with args.
34802set dummy dumpbin; ac_word=$2
34803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34804$as_echo_n "checking for $ac_word... " >&6; }
34805if ${ac_cv_prog_DUMPBIN+:} false; then :
34806  $as_echo_n "(cached) " >&6
34807else
34808  if test -n "$DUMPBIN"; then
34809  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34810else
34811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34812for as_dir in $PATH
34813do
34814  IFS=$as_save_IFS
34815  test -z "$as_dir" && as_dir=.
34816    for ac_exec_ext in '' $ac_executable_extensions; do
34817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34818    ac_cv_prog_DUMPBIN="dumpbin"
34819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34820    break 2
34821  fi
34822done
34823  done
34824IFS=$as_save_IFS
34825
34826fi
34827fi
34828DUMPBIN=$ac_cv_prog_DUMPBIN
34829if test -n "$DUMPBIN"; then
34830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34831$as_echo "$DUMPBIN" >&6; }
34832else
34833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34834$as_echo "no" >&6; }
34835fi
34836
34837
34838
34839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34840
34841  # First separate the path from the arguments. This will split at the first
34842  # space.
34843  complete="$DUMPBIN"
34844  path="${complete%% *}"
34845  tmp="$complete EOL"
34846  arguments="${tmp#* }"
34847
34848  # Input might be given as Windows format, start by converting to
34849  # unix format.
34850  new_path=`$CYGPATH -u "$path"`
34851
34852  # Now try to locate executable using which
34853  new_path=`$WHICH "$new_path" 2> /dev/null`
34854  # bat and cmd files are not always considered executable in cygwin causing which
34855  # to not find them
34856  if test "x$new_path" = x \
34857      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34858      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34859    new_path=`$CYGPATH -u "$path"`
34860  fi
34861  if test "x$new_path" = x; then
34862    # Oops. Which didn't find the executable.
34863    # The splitting of arguments from the executable at a space might have been incorrect,
34864    # since paths with space are more likely in Windows. Give it another try with the whole
34865    # argument.
34866    path="$complete"
34867    arguments="EOL"
34868    new_path=`$CYGPATH -u "$path"`
34869    new_path=`$WHICH "$new_path" 2> /dev/null`
34870    # bat and cmd files are not always considered executable in cygwin causing which
34871    # to not find them
34872    if test "x$new_path" = x \
34873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34875      new_path=`$CYGPATH -u "$path"`
34876    fi
34877    if test "x$new_path" = x; then
34878      # It's still not found. Now this is an unrecoverable error.
34879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34880$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34881      has_space=`$ECHO "$complete" | $GREP " "`
34882      if test "x$has_space" != x; then
34883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34885      fi
34886      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34887    fi
34888  fi
34889
34890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34893  # "foo.exe" is OK but "foo" is an error.
34894  #
34895  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34896  # It is also a way to make sure we got the proper file name for the real test later on.
34897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34898  if test "x$test_shortpath" = x; then
34899    # Short path failed, file does not exist as specified.
34900    # Try adding .exe or .cmd
34901    if test -f "${new_path}.exe"; then
34902      input_to_shortpath="${new_path}.exe"
34903    elif test -f "${new_path}.cmd"; then
34904      input_to_shortpath="${new_path}.cmd"
34905    else
34906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34907$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34910      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34911    fi
34912  else
34913    input_to_shortpath="$new_path"
34914  fi
34915
34916  # Call helper function which possibly converts this using DOS-style short mode.
34917  # If so, the updated path is stored in $new_path.
34918  new_path="$input_to_shortpath"
34919
34920  input_path="$input_to_shortpath"
34921  # Check if we need to convert this using DOS-style short mode. If the path
34922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34923  # take no chances and rewrite it.
34924  # Note: m4 eats our [], so we need to use [ and ] instead.
34925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34926  if test "x$has_forbidden_chars" != x; then
34927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34931      # Going to short mode and back again did indeed matter. Since short mode is
34932      # case insensitive, let's make it lowercase to improve readability.
34933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34934      # Now convert it back to Unix-stile (cygpath)
34935      input_path=`$CYGPATH -u "$shortmode_path"`
34936      new_path="$input_path"
34937    fi
34938  fi
34939
34940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34941  if test "x$test_cygdrive_prefix" = x; then
34942    # As a simple fix, exclude /usr/bin since it's not a real path.
34943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34945      # a path prefixed by /cygdrive for fixpath to work.
34946      new_path="$CYGWIN_ROOT_PATH$input_path"
34947    fi
34948  fi
34949
34950  # remove trailing .exe if any
34951  new_path="${new_path/%.exe/}"
34952
34953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34954
34955  # First separate the path from the arguments. This will split at the first
34956  # space.
34957  complete="$DUMPBIN"
34958  path="${complete%% *}"
34959  tmp="$complete EOL"
34960  arguments="${tmp#* }"
34961
34962  # Input might be given as Windows format, start by converting to
34963  # unix format.
34964  new_path="$path"
34965
34966  windows_path="$new_path"
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    unix_path=`$CYGPATH -u "$windows_path"`
34969    new_path="$unix_path"
34970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34972    new_path="$unix_path"
34973  fi
34974
34975
34976  # Now try to locate executable using which
34977  new_path=`$WHICH "$new_path" 2> /dev/null`
34978
34979  if test "x$new_path" = x; then
34980    # Oops. Which didn't find the executable.
34981    # The splitting of arguments from the executable at a space might have been incorrect,
34982    # since paths with space are more likely in Windows. Give it another try with the whole
34983    # argument.
34984    path="$complete"
34985    arguments="EOL"
34986    new_path="$path"
34987
34988  windows_path="$new_path"
34989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34990    unix_path=`$CYGPATH -u "$windows_path"`
34991    new_path="$unix_path"
34992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34994    new_path="$unix_path"
34995  fi
34996
34997
34998    new_path=`$WHICH "$new_path" 2> /dev/null`
34999
35000    if test "x$new_path" = x; then
35001      # It's still not found. Now this is an unrecoverable error.
35002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35003$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35004      has_space=`$ECHO "$complete" | $GREP " "`
35005      if test "x$has_space" != x; then
35006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35008      fi
35009      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35010    fi
35011  fi
35012
35013  # Now new_path has a complete unix path to the binary
35014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35015    # Keep paths in /bin as-is, but remove trailing .exe if any
35016    new_path="${new_path/%.exe/}"
35017    # Do not save /bin paths to all_fixpath_prefixes!
35018  else
35019    # Not in mixed or Windows style, start by that.
35020    new_path=`cmd //c echo $new_path`
35021
35022  input_path="$new_path"
35023  # Check if we need to convert this using DOS-style short mode. If the path
35024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35025  # take no chances and rewrite it.
35026  # Note: m4 eats our [], so we need to use [ and ] instead.
35027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35028  if test "x$has_forbidden_chars" != x; then
35029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35031  fi
35032
35033    # Output is in $new_path
35034
35035  windows_path="$new_path"
35036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35037    unix_path=`$CYGPATH -u "$windows_path"`
35038    new_path="$unix_path"
35039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35041    new_path="$unix_path"
35042  fi
35043
35044    # remove trailing .exe if any
35045    new_path="${new_path/%.exe/}"
35046
35047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35049  fi
35050
35051  else
35052    # We're on a posix platform. Hooray! :)
35053    # First separate the path from the arguments. This will split at the first
35054    # space.
35055    complete="$DUMPBIN"
35056    path="${complete%% *}"
35057    tmp="$complete EOL"
35058    arguments="${tmp#* }"
35059
35060    # Cannot rely on the command "which" here since it doesn't always work.
35061    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35062    if test -z "$is_absolute_path"; then
35063      # Path to executable is not absolute. Find it.
35064      IFS_save="$IFS"
35065      IFS=:
35066      for p in $PATH; do
35067        if test -f "$p/$path" && test -x "$p/$path"; then
35068          new_path="$p/$path"
35069          break
35070        fi
35071      done
35072      IFS="$IFS_save"
35073    else
35074      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
35075$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
35076      new_path="$path"
35077    fi
35078
35079    if test "x$new_path" = x; then
35080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35081$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35082      has_space=`$ECHO "$complete" | $GREP " "`
35083      if test "x$has_space" != x; then
35084        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35086      fi
35087      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35088    fi
35089  fi
35090
35091  # Now join together the path and the arguments once again
35092  if test "x$arguments" != xEOL; then
35093    new_complete="$new_path ${arguments% *}"
35094  else
35095    new_complete="$new_path"
35096  fi
35097
35098  if test "x$complete" != "x$new_complete"; then
35099    DUMPBIN="$new_complete"
35100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35101$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35102  fi
35103
35104
35105      COMPILER_TYPE=CL
35106      CCXXFLAGS="$CCXXFLAGS -nologo"
35107
35108fi
35109
35110
35111
35112  ac_ext=c
35113ac_cpp='$CPP $CPPFLAGS'
35114ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35115ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35116ac_compiler_gnu=$ac_cv_c_compiler_gnu
35117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35118$as_echo_n "checking how to run the C preprocessor... " >&6; }
35119# On Suns, sometimes $CPP names a directory.
35120if test -n "$CPP" && test -d "$CPP"; then
35121  CPP=
35122fi
35123if test -z "$CPP"; then
35124  if ${ac_cv_prog_CPP+:} false; then :
35125  $as_echo_n "(cached) " >&6
35126else
35127      # Double quotes because CPP needs to be expanded
35128    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35129    do
35130      ac_preproc_ok=false
35131for ac_c_preproc_warn_flag in '' yes
35132do
35133  # Use a header file that comes with gcc, so configuring glibc
35134  # with a fresh cross-compiler works.
35135  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35136  # <limits.h> exists even on freestanding compilers.
35137  # On the NeXT, cc -E runs the code through the compiler's parser,
35138  # not just through cpp. "Syntax error" is here to catch this case.
35139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35140/* end confdefs.h.  */
35141#ifdef __STDC__
35142# include <limits.h>
35143#else
35144# include <assert.h>
35145#endif
35146		     Syntax error
35147_ACEOF
35148if ac_fn_c_try_cpp "$LINENO"; then :
35149
35150else
35151  # Broken: fails on valid input.
35152continue
35153fi
35154rm -f conftest.err conftest.i conftest.$ac_ext
35155
35156  # OK, works on sane cases.  Now check whether nonexistent headers
35157  # can be detected and how.
35158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35159/* end confdefs.h.  */
35160#include <ac_nonexistent.h>
35161_ACEOF
35162if ac_fn_c_try_cpp "$LINENO"; then :
35163  # Broken: success on invalid input.
35164continue
35165else
35166  # Passes both tests.
35167ac_preproc_ok=:
35168break
35169fi
35170rm -f conftest.err conftest.i conftest.$ac_ext
35171
35172done
35173# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35174rm -f conftest.i conftest.err conftest.$ac_ext
35175if $ac_preproc_ok; then :
35176  break
35177fi
35178
35179    done
35180    ac_cv_prog_CPP=$CPP
35181
35182fi
35183  CPP=$ac_cv_prog_CPP
35184else
35185  ac_cv_prog_CPP=$CPP
35186fi
35187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35188$as_echo "$CPP" >&6; }
35189ac_preproc_ok=false
35190for ac_c_preproc_warn_flag in '' yes
35191do
35192  # Use a header file that comes with gcc, so configuring glibc
35193  # with a fresh cross-compiler works.
35194  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35195  # <limits.h> exists even on freestanding compilers.
35196  # On the NeXT, cc -E runs the code through the compiler's parser,
35197  # not just through cpp. "Syntax error" is here to catch this case.
35198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35199/* end confdefs.h.  */
35200#ifdef __STDC__
35201# include <limits.h>
35202#else
35203# include <assert.h>
35204#endif
35205		     Syntax error
35206_ACEOF
35207if ac_fn_c_try_cpp "$LINENO"; then :
35208
35209else
35210  # Broken: fails on valid input.
35211continue
35212fi
35213rm -f conftest.err conftest.i conftest.$ac_ext
35214
35215  # OK, works on sane cases.  Now check whether nonexistent headers
35216  # can be detected and how.
35217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218/* end confdefs.h.  */
35219#include <ac_nonexistent.h>
35220_ACEOF
35221if ac_fn_c_try_cpp "$LINENO"; then :
35222  # Broken: success on invalid input.
35223continue
35224else
35225  # Passes both tests.
35226ac_preproc_ok=:
35227break
35228fi
35229rm -f conftest.err conftest.i conftest.$ac_ext
35230
35231done
35232# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35233rm -f conftest.i conftest.err conftest.$ac_ext
35234if $ac_preproc_ok; then :
35235
35236else
35237  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35239as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35240See \`config.log' for more details" "$LINENO" 5; }
35241fi
35242
35243ac_ext=cpp
35244ac_cpp='$CXXCPP $CPPFLAGS'
35245ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35246ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35247ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35248
35249
35250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35251
35252  # First separate the path from the arguments. This will split at the first
35253  # space.
35254  complete="$CPP"
35255  path="${complete%% *}"
35256  tmp="$complete EOL"
35257  arguments="${tmp#* }"
35258
35259  # Input might be given as Windows format, start by converting to
35260  # unix format.
35261  new_path=`$CYGPATH -u "$path"`
35262
35263  # Now try to locate executable using which
35264  new_path=`$WHICH "$new_path" 2> /dev/null`
35265  # bat and cmd files are not always considered executable in cygwin causing which
35266  # to not find them
35267  if test "x$new_path" = x \
35268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35270    new_path=`$CYGPATH -u "$path"`
35271  fi
35272  if test "x$new_path" = x; then
35273    # Oops. Which didn't find the executable.
35274    # The splitting of arguments from the executable at a space might have been incorrect,
35275    # since paths with space are more likely in Windows. Give it another try with the whole
35276    # argument.
35277    path="$complete"
35278    arguments="EOL"
35279    new_path=`$CYGPATH -u "$path"`
35280    new_path=`$WHICH "$new_path" 2> /dev/null`
35281    # bat and cmd files are not always considered executable in cygwin causing which
35282    # to not find them
35283    if test "x$new_path" = x \
35284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35286      new_path=`$CYGPATH -u "$path"`
35287    fi
35288    if test "x$new_path" = x; then
35289      # It's still not found. Now this is an unrecoverable error.
35290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35291$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35292      has_space=`$ECHO "$complete" | $GREP " "`
35293      if test "x$has_space" != x; then
35294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35296      fi
35297      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35298    fi
35299  fi
35300
35301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35304  # "foo.exe" is OK but "foo" is an error.
35305  #
35306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35307  # It is also a way to make sure we got the proper file name for the real test later on.
35308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35309  if test "x$test_shortpath" = x; then
35310    # Short path failed, file does not exist as specified.
35311    # Try adding .exe or .cmd
35312    if test -f "${new_path}.exe"; then
35313      input_to_shortpath="${new_path}.exe"
35314    elif test -f "${new_path}.cmd"; then
35315      input_to_shortpath="${new_path}.cmd"
35316    else
35317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35318$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35321      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35322    fi
35323  else
35324    input_to_shortpath="$new_path"
35325  fi
35326
35327  # Call helper function which possibly converts this using DOS-style short mode.
35328  # If so, the updated path is stored in $new_path.
35329  new_path="$input_to_shortpath"
35330
35331  input_path="$input_to_shortpath"
35332  # Check if we need to convert this using DOS-style short mode. If the path
35333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35334  # take no chances and rewrite it.
35335  # Note: m4 eats our [], so we need to use [ and ] instead.
35336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35337  if test "x$has_forbidden_chars" != x; then
35338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35342      # Going to short mode and back again did indeed matter. Since short mode is
35343      # case insensitive, let's make it lowercase to improve readability.
35344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35345      # Now convert it back to Unix-stile (cygpath)
35346      input_path=`$CYGPATH -u "$shortmode_path"`
35347      new_path="$input_path"
35348    fi
35349  fi
35350
35351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35352  if test "x$test_cygdrive_prefix" = x; then
35353    # As a simple fix, exclude /usr/bin since it's not a real path.
35354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35356      # a path prefixed by /cygdrive for fixpath to work.
35357      new_path="$CYGWIN_ROOT_PATH$input_path"
35358    fi
35359  fi
35360
35361  # remove trailing .exe if any
35362  new_path="${new_path/%.exe/}"
35363
35364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35365
35366  # First separate the path from the arguments. This will split at the first
35367  # space.
35368  complete="$CPP"
35369  path="${complete%% *}"
35370  tmp="$complete EOL"
35371  arguments="${tmp#* }"
35372
35373  # Input might be given as Windows format, start by converting to
35374  # unix format.
35375  new_path="$path"
35376
35377  windows_path="$new_path"
35378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35379    unix_path=`$CYGPATH -u "$windows_path"`
35380    new_path="$unix_path"
35381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35383    new_path="$unix_path"
35384  fi
35385
35386
35387  # Now try to locate executable using which
35388  new_path=`$WHICH "$new_path" 2> /dev/null`
35389
35390  if test "x$new_path" = x; then
35391    # Oops. Which didn't find the executable.
35392    # The splitting of arguments from the executable at a space might have been incorrect,
35393    # since paths with space are more likely in Windows. Give it another try with the whole
35394    # argument.
35395    path="$complete"
35396    arguments="EOL"
35397    new_path="$path"
35398
35399  windows_path="$new_path"
35400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35401    unix_path=`$CYGPATH -u "$windows_path"`
35402    new_path="$unix_path"
35403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35405    new_path="$unix_path"
35406  fi
35407
35408
35409    new_path=`$WHICH "$new_path" 2> /dev/null`
35410
35411    if test "x$new_path" = x; then
35412      # It's still not found. Now this is an unrecoverable error.
35413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35414$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35415      has_space=`$ECHO "$complete" | $GREP " "`
35416      if test "x$has_space" != x; then
35417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35419      fi
35420      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35421    fi
35422  fi
35423
35424  # Now new_path has a complete unix path to the binary
35425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35426    # Keep paths in /bin as-is, but remove trailing .exe if any
35427    new_path="${new_path/%.exe/}"
35428    # Do not save /bin paths to all_fixpath_prefixes!
35429  else
35430    # Not in mixed or Windows style, start by that.
35431    new_path=`cmd //c echo $new_path`
35432
35433  input_path="$new_path"
35434  # Check if we need to convert this using DOS-style short mode. If the path
35435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35436  # take no chances and rewrite it.
35437  # Note: m4 eats our [], so we need to use [ and ] instead.
35438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35439  if test "x$has_forbidden_chars" != x; then
35440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35442  fi
35443
35444    # Output is in $new_path
35445
35446  windows_path="$new_path"
35447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35448    unix_path=`$CYGPATH -u "$windows_path"`
35449    new_path="$unix_path"
35450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35452    new_path="$unix_path"
35453  fi
35454
35455    # remove trailing .exe if any
35456    new_path="${new_path/%.exe/}"
35457
35458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35460  fi
35461
35462  else
35463    # We're on a posix platform. Hooray! :)
35464    # First separate the path from the arguments. This will split at the first
35465    # space.
35466    complete="$CPP"
35467    path="${complete%% *}"
35468    tmp="$complete EOL"
35469    arguments="${tmp#* }"
35470
35471    # Cannot rely on the command "which" here since it doesn't always work.
35472    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35473    if test -z "$is_absolute_path"; then
35474      # Path to executable is not absolute. Find it.
35475      IFS_save="$IFS"
35476      IFS=:
35477      for p in $PATH; do
35478        if test -f "$p/$path" && test -x "$p/$path"; then
35479          new_path="$p/$path"
35480          break
35481        fi
35482      done
35483      IFS="$IFS_save"
35484    else
35485      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
35486$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
35487      new_path="$path"
35488    fi
35489
35490    if test "x$new_path" = x; then
35491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35492$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35493      has_space=`$ECHO "$complete" | $GREP " "`
35494      if test "x$has_space" != x; then
35495        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35497      fi
35498      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35499    fi
35500  fi
35501
35502  # Now join together the path and the arguments once again
35503  if test "x$arguments" != xEOL; then
35504    new_complete="$new_path ${arguments% *}"
35505  else
35506    new_complete="$new_path"
35507  fi
35508
35509  if test "x$complete" != "x$new_complete"; then
35510    CPP="$new_complete"
35511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35512$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35513  fi
35514
35515
35516  ac_ext=cpp
35517ac_cpp='$CXXCPP $CPPFLAGS'
35518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35522$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35523if test -z "$CXXCPP"; then
35524  if ${ac_cv_prog_CXXCPP+:} false; then :
35525  $as_echo_n "(cached) " >&6
35526else
35527      # Double quotes because CXXCPP needs to be expanded
35528    for CXXCPP in "$CXX -E" "/lib/cpp"
35529    do
35530      ac_preproc_ok=false
35531for ac_cxx_preproc_warn_flag in '' yes
35532do
35533  # Use a header file that comes with gcc, so configuring glibc
35534  # with a fresh cross-compiler works.
35535  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35536  # <limits.h> exists even on freestanding compilers.
35537  # On the NeXT, cc -E runs the code through the compiler's parser,
35538  # not just through cpp. "Syntax error" is here to catch this case.
35539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35540/* end confdefs.h.  */
35541#ifdef __STDC__
35542# include <limits.h>
35543#else
35544# include <assert.h>
35545#endif
35546		     Syntax error
35547_ACEOF
35548if ac_fn_cxx_try_cpp "$LINENO"; then :
35549
35550else
35551  # Broken: fails on valid input.
35552continue
35553fi
35554rm -f conftest.err conftest.i conftest.$ac_ext
35555
35556  # OK, works on sane cases.  Now check whether nonexistent headers
35557  # can be detected and how.
35558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35559/* end confdefs.h.  */
35560#include <ac_nonexistent.h>
35561_ACEOF
35562if ac_fn_cxx_try_cpp "$LINENO"; then :
35563  # Broken: success on invalid input.
35564continue
35565else
35566  # Passes both tests.
35567ac_preproc_ok=:
35568break
35569fi
35570rm -f conftest.err conftest.i conftest.$ac_ext
35571
35572done
35573# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35574rm -f conftest.i conftest.err conftest.$ac_ext
35575if $ac_preproc_ok; then :
35576  break
35577fi
35578
35579    done
35580    ac_cv_prog_CXXCPP=$CXXCPP
35581
35582fi
35583  CXXCPP=$ac_cv_prog_CXXCPP
35584else
35585  ac_cv_prog_CXXCPP=$CXXCPP
35586fi
35587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35588$as_echo "$CXXCPP" >&6; }
35589ac_preproc_ok=false
35590for ac_cxx_preproc_warn_flag in '' yes
35591do
35592  # Use a header file that comes with gcc, so configuring glibc
35593  # with a fresh cross-compiler works.
35594  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35595  # <limits.h> exists even on freestanding compilers.
35596  # On the NeXT, cc -E runs the code through the compiler's parser,
35597  # not just through cpp. "Syntax error" is here to catch this case.
35598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35599/* end confdefs.h.  */
35600#ifdef __STDC__
35601# include <limits.h>
35602#else
35603# include <assert.h>
35604#endif
35605		     Syntax error
35606_ACEOF
35607if ac_fn_cxx_try_cpp "$LINENO"; then :
35608
35609else
35610  # Broken: fails on valid input.
35611continue
35612fi
35613rm -f conftest.err conftest.i conftest.$ac_ext
35614
35615  # OK, works on sane cases.  Now check whether nonexistent headers
35616  # can be detected and how.
35617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35618/* end confdefs.h.  */
35619#include <ac_nonexistent.h>
35620_ACEOF
35621if ac_fn_cxx_try_cpp "$LINENO"; then :
35622  # Broken: success on invalid input.
35623continue
35624else
35625  # Passes both tests.
35626ac_preproc_ok=:
35627break
35628fi
35629rm -f conftest.err conftest.i conftest.$ac_ext
35630
35631done
35632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35633rm -f conftest.i conftest.err conftest.$ac_ext
35634if $ac_preproc_ok; then :
35635
35636else
35637  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35639as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35640See \`config.log' for more details" "$LINENO" 5; }
35641fi
35642
35643ac_ext=cpp
35644ac_cpp='$CXXCPP $CPPFLAGS'
35645ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35646ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35647ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35648
35649
35650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35651
35652  # First separate the path from the arguments. This will split at the first
35653  # space.
35654  complete="$CXXCPP"
35655  path="${complete%% *}"
35656  tmp="$complete EOL"
35657  arguments="${tmp#* }"
35658
35659  # Input might be given as Windows format, start by converting to
35660  # unix format.
35661  new_path=`$CYGPATH -u "$path"`
35662
35663  # Now try to locate executable using which
35664  new_path=`$WHICH "$new_path" 2> /dev/null`
35665  # bat and cmd files are not always considered executable in cygwin causing which
35666  # to not find them
35667  if test "x$new_path" = x \
35668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35670    new_path=`$CYGPATH -u "$path"`
35671  fi
35672  if test "x$new_path" = x; then
35673    # Oops. Which didn't find the executable.
35674    # The splitting of arguments from the executable at a space might have been incorrect,
35675    # since paths with space are more likely in Windows. Give it another try with the whole
35676    # argument.
35677    path="$complete"
35678    arguments="EOL"
35679    new_path=`$CYGPATH -u "$path"`
35680    new_path=`$WHICH "$new_path" 2> /dev/null`
35681    # bat and cmd files are not always considered executable in cygwin causing which
35682    # to not find them
35683    if test "x$new_path" = x \
35684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35686      new_path=`$CYGPATH -u "$path"`
35687    fi
35688    if test "x$new_path" = x; then
35689      # It's still not found. Now this is an unrecoverable error.
35690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35691$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35692      has_space=`$ECHO "$complete" | $GREP " "`
35693      if test "x$has_space" != x; then
35694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35696      fi
35697      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35698    fi
35699  fi
35700
35701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35704  # "foo.exe" is OK but "foo" is an error.
35705  #
35706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35707  # It is also a way to make sure we got the proper file name for the real test later on.
35708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35709  if test "x$test_shortpath" = x; then
35710    # Short path failed, file does not exist as specified.
35711    # Try adding .exe or .cmd
35712    if test -f "${new_path}.exe"; then
35713      input_to_shortpath="${new_path}.exe"
35714    elif test -f "${new_path}.cmd"; then
35715      input_to_shortpath="${new_path}.cmd"
35716    else
35717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35718$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35721      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35722    fi
35723  else
35724    input_to_shortpath="$new_path"
35725  fi
35726
35727  # Call helper function which possibly converts this using DOS-style short mode.
35728  # If so, the updated path is stored in $new_path.
35729  new_path="$input_to_shortpath"
35730
35731  input_path="$input_to_shortpath"
35732  # Check if we need to convert this using DOS-style short mode. If the path
35733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35734  # take no chances and rewrite it.
35735  # Note: m4 eats our [], so we need to use [ and ] instead.
35736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35737  if test "x$has_forbidden_chars" != x; then
35738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35742      # Going to short mode and back again did indeed matter. Since short mode is
35743      # case insensitive, let's make it lowercase to improve readability.
35744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35745      # Now convert it back to Unix-stile (cygpath)
35746      input_path=`$CYGPATH -u "$shortmode_path"`
35747      new_path="$input_path"
35748    fi
35749  fi
35750
35751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35752  if test "x$test_cygdrive_prefix" = x; then
35753    # As a simple fix, exclude /usr/bin since it's not a real path.
35754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35756      # a path prefixed by /cygdrive for fixpath to work.
35757      new_path="$CYGWIN_ROOT_PATH$input_path"
35758    fi
35759  fi
35760
35761  # remove trailing .exe if any
35762  new_path="${new_path/%.exe/}"
35763
35764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35765
35766  # First separate the path from the arguments. This will split at the first
35767  # space.
35768  complete="$CXXCPP"
35769  path="${complete%% *}"
35770  tmp="$complete EOL"
35771  arguments="${tmp#* }"
35772
35773  # Input might be given as Windows format, start by converting to
35774  # unix format.
35775  new_path="$path"
35776
35777  windows_path="$new_path"
35778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35779    unix_path=`$CYGPATH -u "$windows_path"`
35780    new_path="$unix_path"
35781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35783    new_path="$unix_path"
35784  fi
35785
35786
35787  # Now try to locate executable using which
35788  new_path=`$WHICH "$new_path" 2> /dev/null`
35789
35790  if test "x$new_path" = x; then
35791    # Oops. Which didn't find the executable.
35792    # The splitting of arguments from the executable at a space might have been incorrect,
35793    # since paths with space are more likely in Windows. Give it another try with the whole
35794    # argument.
35795    path="$complete"
35796    arguments="EOL"
35797    new_path="$path"
35798
35799  windows_path="$new_path"
35800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35801    unix_path=`$CYGPATH -u "$windows_path"`
35802    new_path="$unix_path"
35803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35805    new_path="$unix_path"
35806  fi
35807
35808
35809    new_path=`$WHICH "$new_path" 2> /dev/null`
35810
35811    if test "x$new_path" = x; then
35812      # It's still not found. Now this is an unrecoverable error.
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35814$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35815      has_space=`$ECHO "$complete" | $GREP " "`
35816      if test "x$has_space" != x; then
35817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35819      fi
35820      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35821    fi
35822  fi
35823
35824  # Now new_path has a complete unix path to the binary
35825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35826    # Keep paths in /bin as-is, but remove trailing .exe if any
35827    new_path="${new_path/%.exe/}"
35828    # Do not save /bin paths to all_fixpath_prefixes!
35829  else
35830    # Not in mixed or Windows style, start by that.
35831    new_path=`cmd //c echo $new_path`
35832
35833  input_path="$new_path"
35834  # Check if we need to convert this using DOS-style short mode. If the path
35835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35836  # take no chances and rewrite it.
35837  # Note: m4 eats our [], so we need to use [ and ] instead.
35838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35839  if test "x$has_forbidden_chars" != x; then
35840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35842  fi
35843
35844    # Output is in $new_path
35845
35846  windows_path="$new_path"
35847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35848    unix_path=`$CYGPATH -u "$windows_path"`
35849    new_path="$unix_path"
35850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35852    new_path="$unix_path"
35853  fi
35854
35855    # remove trailing .exe if any
35856    new_path="${new_path/%.exe/}"
35857
35858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35860  fi
35861
35862  else
35863    # We're on a posix platform. Hooray! :)
35864    # First separate the path from the arguments. This will split at the first
35865    # space.
35866    complete="$CXXCPP"
35867    path="${complete%% *}"
35868    tmp="$complete EOL"
35869    arguments="${tmp#* }"
35870
35871    # Cannot rely on the command "which" here since it doesn't always work.
35872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35873    if test -z "$is_absolute_path"; then
35874      # Path to executable is not absolute. Find it.
35875      IFS_save="$IFS"
35876      IFS=:
35877      for p in $PATH; do
35878        if test -f "$p/$path" && test -x "$p/$path"; then
35879          new_path="$p/$path"
35880          break
35881        fi
35882      done
35883      IFS="$IFS_save"
35884    else
35885      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
35886$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
35887      new_path="$path"
35888    fi
35889
35890    if test "x$new_path" = x; then
35891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35892$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35893      has_space=`$ECHO "$complete" | $GREP " "`
35894      if test "x$has_space" != x; then
35895        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35897      fi
35898      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35899    fi
35900  fi
35901
35902  # Now join together the path and the arguments once again
35903  if test "x$arguments" != xEOL; then
35904    new_complete="$new_path ${arguments% *}"
35905  else
35906    new_complete="$new_path"
35907  fi
35908
35909  if test "x$complete" != "x$new_complete"; then
35910    CXXCPP="$new_complete"
35911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35912$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35913  fi
35914
35915
35916  if test "x$COMPILE_TYPE" != "xcross"; then
35917    # If we are not cross compiling, use the same compilers for
35918    # building the build platform executables. The cross-compilation
35919    # case needed to be done earlier, but this can only be done after
35920    # the native tools have been localized.
35921    BUILD_CC="$CC"
35922    BUILD_CXX="$CXX"
35923    BUILD_LD="$LD"
35924  fi
35925
35926  # for solaris we really need solaris tools, and not gnu equivalent
35927  #   these seems to normally reside in /usr/ccs/bin so add that to path before
35928  #   starting to probe
35929  #
35930  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
35931  #         so that it can be overriden --with-tools-dir
35932  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
35933    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
35934  fi
35935
35936  # Find the right assembler.
35937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35938
35939
35940  # Publish this variable in the help.
35941
35942
35943  if test "x$AS" = x; then
35944    # The variable is not set by user, try to locate tool using the code snippet
35945    for ac_prog in as
35946do
35947  # Extract the first word of "$ac_prog", so it can be a program name with args.
35948set dummy $ac_prog; ac_word=$2
35949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35950$as_echo_n "checking for $ac_word... " >&6; }
35951if ${ac_cv_path_AS+:} false; then :
35952  $as_echo_n "(cached) " >&6
35953else
35954  case $AS in
35955  [\\/]* | ?:[\\/]*)
35956  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35957  ;;
35958  *)
35959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35960for as_dir in $PATH
35961do
35962  IFS=$as_save_IFS
35963  test -z "$as_dir" && as_dir=.
35964    for ac_exec_ext in '' $ac_executable_extensions; do
35965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35966    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35968    break 2
35969  fi
35970done
35971  done
35972IFS=$as_save_IFS
35973
35974  ;;
35975esac
35976fi
35977AS=$ac_cv_path_AS
35978if test -n "$AS"; then
35979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35980$as_echo "$AS" >&6; }
35981else
35982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35983$as_echo "no" >&6; }
35984fi
35985
35986
35987  test -n "$AS" && break
35988done
35989
35990  else
35991    # The variable is set, but is it from the command line or the environment?
35992
35993    # Try to remove the string !AS! from our list.
35994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35996      # If it failed, the variable was not from the command line. Ignore it,
35997      # but warn the user (except for BASH, which is always set by the calling BASH).
35998      if test "xAS" != xBASH; then
35999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36000$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36001      fi
36002      # Try to locate tool using the code snippet
36003      for ac_prog in as
36004do
36005  # Extract the first word of "$ac_prog", so it can be a program name with args.
36006set dummy $ac_prog; ac_word=$2
36007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36008$as_echo_n "checking for $ac_word... " >&6; }
36009if ${ac_cv_path_AS+:} false; then :
36010  $as_echo_n "(cached) " >&6
36011else
36012  case $AS in
36013  [\\/]* | ?:[\\/]*)
36014  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36015  ;;
36016  *)
36017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36018for as_dir in $PATH
36019do
36020  IFS=$as_save_IFS
36021  test -z "$as_dir" && as_dir=.
36022    for ac_exec_ext in '' $ac_executable_extensions; do
36023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36024    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36026    break 2
36027  fi
36028done
36029  done
36030IFS=$as_save_IFS
36031
36032  ;;
36033esac
36034fi
36035AS=$ac_cv_path_AS
36036if test -n "$AS"; then
36037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36038$as_echo "$AS" >&6; }
36039else
36040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36041$as_echo "no" >&6; }
36042fi
36043
36044
36045  test -n "$AS" && break
36046done
36047
36048    else
36049      # If it succeeded, then it was overridden by the user. We will use it
36050      # for the tool.
36051
36052      # First remove it from the list of overridden variables, so we can test
36053      # for unknown variables in the end.
36054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36055
36056      # Check if the provided tool contains a complete path.
36057      tool_specified="$AS"
36058      tool_basename="${tool_specified##*/}"
36059      if test "x$tool_basename" = "x$tool_specified"; then
36060        # A command without a complete path is provided, search $PATH.
36061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36062$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36063        # Extract the first word of "$tool_basename", so it can be a program name with args.
36064set dummy $tool_basename; ac_word=$2
36065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36066$as_echo_n "checking for $ac_word... " >&6; }
36067if ${ac_cv_path_AS+:} false; then :
36068  $as_echo_n "(cached) " >&6
36069else
36070  case $AS in
36071  [\\/]* | ?:[\\/]*)
36072  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36073  ;;
36074  *)
36075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36076for as_dir in $PATH
36077do
36078  IFS=$as_save_IFS
36079  test -z "$as_dir" && as_dir=.
36080    for ac_exec_ext in '' $ac_executable_extensions; do
36081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36082    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36084    break 2
36085  fi
36086done
36087  done
36088IFS=$as_save_IFS
36089
36090  ;;
36091esac
36092fi
36093AS=$ac_cv_path_AS
36094if test -n "$AS"; then
36095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36096$as_echo "$AS" >&6; }
36097else
36098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36099$as_echo "no" >&6; }
36100fi
36101
36102
36103        if test "x$AS" = x; then
36104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36105        fi
36106      else
36107        # Otherwise we believe it is a complete path. Use it as it is.
36108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36109$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36111$as_echo_n "checking for AS... " >&6; }
36112        if test ! -x "$tool_specified"; then
36113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36114$as_echo "not found" >&6; }
36115          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36116        fi
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36118$as_echo "$tool_specified" >&6; }
36119      fi
36120    fi
36121  fi
36122
36123
36124
36125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36126
36127  # First separate the path from the arguments. This will split at the first
36128  # space.
36129  complete="$AS"
36130  path="${complete%% *}"
36131  tmp="$complete EOL"
36132  arguments="${tmp#* }"
36133
36134  # Input might be given as Windows format, start by converting to
36135  # unix format.
36136  new_path=`$CYGPATH -u "$path"`
36137
36138  # Now try to locate executable using which
36139  new_path=`$WHICH "$new_path" 2> /dev/null`
36140  # bat and cmd files are not always considered executable in cygwin causing which
36141  # to not find them
36142  if test "x$new_path" = x \
36143      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36144      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36145    new_path=`$CYGPATH -u "$path"`
36146  fi
36147  if test "x$new_path" = x; then
36148    # Oops. Which didn't find the executable.
36149    # The splitting of arguments from the executable at a space might have been incorrect,
36150    # since paths with space are more likely in Windows. Give it another try with the whole
36151    # argument.
36152    path="$complete"
36153    arguments="EOL"
36154    new_path=`$CYGPATH -u "$path"`
36155    new_path=`$WHICH "$new_path" 2> /dev/null`
36156    # bat and cmd files are not always considered executable in cygwin causing which
36157    # to not find them
36158    if test "x$new_path" = x \
36159        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36160        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36161      new_path=`$CYGPATH -u "$path"`
36162    fi
36163    if test "x$new_path" = x; then
36164      # It's still not found. Now this is an unrecoverable error.
36165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36166$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36167      has_space=`$ECHO "$complete" | $GREP " "`
36168      if test "x$has_space" != x; then
36169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36171      fi
36172      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36173    fi
36174  fi
36175
36176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36179  # "foo.exe" is OK but "foo" is an error.
36180  #
36181  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36182  # It is also a way to make sure we got the proper file name for the real test later on.
36183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36184  if test "x$test_shortpath" = x; then
36185    # Short path failed, file does not exist as specified.
36186    # Try adding .exe or .cmd
36187    if test -f "${new_path}.exe"; then
36188      input_to_shortpath="${new_path}.exe"
36189    elif test -f "${new_path}.cmd"; then
36190      input_to_shortpath="${new_path}.cmd"
36191    else
36192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36193$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36196      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36197    fi
36198  else
36199    input_to_shortpath="$new_path"
36200  fi
36201
36202  # Call helper function which possibly converts this using DOS-style short mode.
36203  # If so, the updated path is stored in $new_path.
36204  new_path="$input_to_shortpath"
36205
36206  input_path="$input_to_shortpath"
36207  # Check if we need to convert this using DOS-style short mode. If the path
36208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36209  # take no chances and rewrite it.
36210  # Note: m4 eats our [], so we need to use [ and ] instead.
36211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36212  if test "x$has_forbidden_chars" != x; then
36213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36217      # Going to short mode and back again did indeed matter. Since short mode is
36218      # case insensitive, let's make it lowercase to improve readability.
36219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36220      # Now convert it back to Unix-stile (cygpath)
36221      input_path=`$CYGPATH -u "$shortmode_path"`
36222      new_path="$input_path"
36223    fi
36224  fi
36225
36226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36227  if test "x$test_cygdrive_prefix" = x; then
36228    # As a simple fix, exclude /usr/bin since it's not a real path.
36229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36231      # a path prefixed by /cygdrive for fixpath to work.
36232      new_path="$CYGWIN_ROOT_PATH$input_path"
36233    fi
36234  fi
36235
36236  # remove trailing .exe if any
36237  new_path="${new_path/%.exe/}"
36238
36239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36240
36241  # First separate the path from the arguments. This will split at the first
36242  # space.
36243  complete="$AS"
36244  path="${complete%% *}"
36245  tmp="$complete EOL"
36246  arguments="${tmp#* }"
36247
36248  # Input might be given as Windows format, start by converting to
36249  # unix format.
36250  new_path="$path"
36251
36252  windows_path="$new_path"
36253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36254    unix_path=`$CYGPATH -u "$windows_path"`
36255    new_path="$unix_path"
36256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36258    new_path="$unix_path"
36259  fi
36260
36261
36262  # Now try to locate executable using which
36263  new_path=`$WHICH "$new_path" 2> /dev/null`
36264
36265  if test "x$new_path" = x; then
36266    # Oops. Which didn't find the executable.
36267    # The splitting of arguments from the executable at a space might have been incorrect,
36268    # since paths with space are more likely in Windows. Give it another try with the whole
36269    # argument.
36270    path="$complete"
36271    arguments="EOL"
36272    new_path="$path"
36273
36274  windows_path="$new_path"
36275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36276    unix_path=`$CYGPATH -u "$windows_path"`
36277    new_path="$unix_path"
36278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36280    new_path="$unix_path"
36281  fi
36282
36283
36284    new_path=`$WHICH "$new_path" 2> /dev/null`
36285
36286    if test "x$new_path" = x; then
36287      # It's still not found. Now this is an unrecoverable error.
36288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36289$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36290      has_space=`$ECHO "$complete" | $GREP " "`
36291      if test "x$has_space" != x; then
36292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36294      fi
36295      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36296    fi
36297  fi
36298
36299  # Now new_path has a complete unix path to the binary
36300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36301    # Keep paths in /bin as-is, but remove trailing .exe if any
36302    new_path="${new_path/%.exe/}"
36303    # Do not save /bin paths to all_fixpath_prefixes!
36304  else
36305    # Not in mixed or Windows style, start by that.
36306    new_path=`cmd //c echo $new_path`
36307
36308  input_path="$new_path"
36309  # Check if we need to convert this using DOS-style short mode. If the path
36310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36311  # take no chances and rewrite it.
36312  # Note: m4 eats our [], so we need to use [ and ] instead.
36313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36314  if test "x$has_forbidden_chars" != x; then
36315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36317  fi
36318
36319    # Output is in $new_path
36320
36321  windows_path="$new_path"
36322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36323    unix_path=`$CYGPATH -u "$windows_path"`
36324    new_path="$unix_path"
36325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36327    new_path="$unix_path"
36328  fi
36329
36330    # remove trailing .exe if any
36331    new_path="${new_path/%.exe/}"
36332
36333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36335  fi
36336
36337  else
36338    # We're on a posix platform. Hooray! :)
36339    # First separate the path from the arguments. This will split at the first
36340    # space.
36341    complete="$AS"
36342    path="${complete%% *}"
36343    tmp="$complete EOL"
36344    arguments="${tmp#* }"
36345
36346    # Cannot rely on the command "which" here since it doesn't always work.
36347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36348    if test -z "$is_absolute_path"; then
36349      # Path to executable is not absolute. Find it.
36350      IFS_save="$IFS"
36351      IFS=:
36352      for p in $PATH; do
36353        if test -f "$p/$path" && test -x "$p/$path"; then
36354          new_path="$p/$path"
36355          break
36356        fi
36357      done
36358      IFS="$IFS_save"
36359    else
36360      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
36361$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
36362      new_path="$path"
36363    fi
36364
36365    if test "x$new_path" = x; then
36366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36367$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36368      has_space=`$ECHO "$complete" | $GREP " "`
36369      if test "x$has_space" != x; then
36370        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36371$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36372      fi
36373      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36374    fi
36375  fi
36376
36377  # Now join together the path and the arguments once again
36378  if test "x$arguments" != xEOL; then
36379    new_complete="$new_path ${arguments% *}"
36380  else
36381    new_complete="$new_path"
36382  fi
36383
36384  if test "x$complete" != "x$new_complete"; then
36385    AS="$new_complete"
36386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36387$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36388  fi
36389
36390  else
36391    AS="$CC -c"
36392  fi
36393
36394
36395  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36396
36397
36398  # Publish this variable in the help.
36399
36400
36401  if test "x$NM" = x; then
36402    # The variable is not set by user, try to locate tool using the code snippet
36403    for ac_prog in nm
36404do
36405  # Extract the first word of "$ac_prog", so it can be a program name with args.
36406set dummy $ac_prog; ac_word=$2
36407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36408$as_echo_n "checking for $ac_word... " >&6; }
36409if ${ac_cv_path_NM+:} false; then :
36410  $as_echo_n "(cached) " >&6
36411else
36412  case $NM in
36413  [\\/]* | ?:[\\/]*)
36414  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36415  ;;
36416  *)
36417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36418for as_dir in $PATH
36419do
36420  IFS=$as_save_IFS
36421  test -z "$as_dir" && as_dir=.
36422    for ac_exec_ext in '' $ac_executable_extensions; do
36423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36424    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36426    break 2
36427  fi
36428done
36429  done
36430IFS=$as_save_IFS
36431
36432  ;;
36433esac
36434fi
36435NM=$ac_cv_path_NM
36436if test -n "$NM"; then
36437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36438$as_echo "$NM" >&6; }
36439else
36440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36441$as_echo "no" >&6; }
36442fi
36443
36444
36445  test -n "$NM" && break
36446done
36447
36448  else
36449    # The variable is set, but is it from the command line or the environment?
36450
36451    # Try to remove the string !NM! from our list.
36452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36454      # If it failed, the variable was not from the command line. Ignore it,
36455      # but warn the user (except for BASH, which is always set by the calling BASH).
36456      if test "xNM" != xBASH; then
36457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36458$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36459      fi
36460      # Try to locate tool using the code snippet
36461      for ac_prog in nm
36462do
36463  # Extract the first word of "$ac_prog", so it can be a program name with args.
36464set dummy $ac_prog; ac_word=$2
36465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36466$as_echo_n "checking for $ac_word... " >&6; }
36467if ${ac_cv_path_NM+:} false; then :
36468  $as_echo_n "(cached) " >&6
36469else
36470  case $NM in
36471  [\\/]* | ?:[\\/]*)
36472  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36473  ;;
36474  *)
36475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36476for as_dir in $PATH
36477do
36478  IFS=$as_save_IFS
36479  test -z "$as_dir" && as_dir=.
36480    for ac_exec_ext in '' $ac_executable_extensions; do
36481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36482    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36484    break 2
36485  fi
36486done
36487  done
36488IFS=$as_save_IFS
36489
36490  ;;
36491esac
36492fi
36493NM=$ac_cv_path_NM
36494if test -n "$NM"; then
36495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36496$as_echo "$NM" >&6; }
36497else
36498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36499$as_echo "no" >&6; }
36500fi
36501
36502
36503  test -n "$NM" && break
36504done
36505
36506    else
36507      # If it succeeded, then it was overridden by the user. We will use it
36508      # for the tool.
36509
36510      # First remove it from the list of overridden variables, so we can test
36511      # for unknown variables in the end.
36512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36513
36514      # Check if the provided tool contains a complete path.
36515      tool_specified="$NM"
36516      tool_basename="${tool_specified##*/}"
36517      if test "x$tool_basename" = "x$tool_specified"; then
36518        # A command without a complete path is provided, search $PATH.
36519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36520$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36521        # Extract the first word of "$tool_basename", so it can be a program name with args.
36522set dummy $tool_basename; ac_word=$2
36523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36524$as_echo_n "checking for $ac_word... " >&6; }
36525if ${ac_cv_path_NM+:} false; then :
36526  $as_echo_n "(cached) " >&6
36527else
36528  case $NM in
36529  [\\/]* | ?:[\\/]*)
36530  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36531  ;;
36532  *)
36533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36534for as_dir in $PATH
36535do
36536  IFS=$as_save_IFS
36537  test -z "$as_dir" && as_dir=.
36538    for ac_exec_ext in '' $ac_executable_extensions; do
36539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36540    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36542    break 2
36543  fi
36544done
36545  done
36546IFS=$as_save_IFS
36547
36548  ;;
36549esac
36550fi
36551NM=$ac_cv_path_NM
36552if test -n "$NM"; then
36553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36554$as_echo "$NM" >&6; }
36555else
36556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36557$as_echo "no" >&6; }
36558fi
36559
36560
36561        if test "x$NM" = x; then
36562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36563        fi
36564      else
36565        # Otherwise we believe it is a complete path. Use it as it is.
36566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36567$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36569$as_echo_n "checking for NM... " >&6; }
36570        if test ! -x "$tool_specified"; then
36571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36572$as_echo "not found" >&6; }
36573          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36574        fi
36575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36576$as_echo "$tool_specified" >&6; }
36577      fi
36578    fi
36579  fi
36580
36581
36582
36583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36584
36585  # First separate the path from the arguments. This will split at the first
36586  # space.
36587  complete="$NM"
36588  path="${complete%% *}"
36589  tmp="$complete EOL"
36590  arguments="${tmp#* }"
36591
36592  # Input might be given as Windows format, start by converting to
36593  # unix format.
36594  new_path=`$CYGPATH -u "$path"`
36595
36596  # Now try to locate executable using which
36597  new_path=`$WHICH "$new_path" 2> /dev/null`
36598  # bat and cmd files are not always considered executable in cygwin causing which
36599  # to not find them
36600  if test "x$new_path" = x \
36601      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36602      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36603    new_path=`$CYGPATH -u "$path"`
36604  fi
36605  if test "x$new_path" = x; then
36606    # Oops. Which didn't find the executable.
36607    # The splitting of arguments from the executable at a space might have been incorrect,
36608    # since paths with space are more likely in Windows. Give it another try with the whole
36609    # argument.
36610    path="$complete"
36611    arguments="EOL"
36612    new_path=`$CYGPATH -u "$path"`
36613    new_path=`$WHICH "$new_path" 2> /dev/null`
36614    # bat and cmd files are not always considered executable in cygwin causing which
36615    # to not find them
36616    if test "x$new_path" = x \
36617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36619      new_path=`$CYGPATH -u "$path"`
36620    fi
36621    if test "x$new_path" = x; then
36622      # It's still not found. Now this is an unrecoverable error.
36623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36624$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36625      has_space=`$ECHO "$complete" | $GREP " "`
36626      if test "x$has_space" != x; then
36627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36629      fi
36630      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36631    fi
36632  fi
36633
36634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36637  # "foo.exe" is OK but "foo" is an error.
36638  #
36639  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36640  # It is also a way to make sure we got the proper file name for the real test later on.
36641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36642  if test "x$test_shortpath" = x; then
36643    # Short path failed, file does not exist as specified.
36644    # Try adding .exe or .cmd
36645    if test -f "${new_path}.exe"; then
36646      input_to_shortpath="${new_path}.exe"
36647    elif test -f "${new_path}.cmd"; then
36648      input_to_shortpath="${new_path}.cmd"
36649    else
36650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36651$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36652      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36653$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36654      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36655    fi
36656  else
36657    input_to_shortpath="$new_path"
36658  fi
36659
36660  # Call helper function which possibly converts this using DOS-style short mode.
36661  # If so, the updated path is stored in $new_path.
36662  new_path="$input_to_shortpath"
36663
36664  input_path="$input_to_shortpath"
36665  # Check if we need to convert this using DOS-style short mode. If the path
36666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36667  # take no chances and rewrite it.
36668  # Note: m4 eats our [], so we need to use [ and ] instead.
36669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36670  if test "x$has_forbidden_chars" != x; then
36671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36675      # Going to short mode and back again did indeed matter. Since short mode is
36676      # case insensitive, let's make it lowercase to improve readability.
36677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36678      # Now convert it back to Unix-stile (cygpath)
36679      input_path=`$CYGPATH -u "$shortmode_path"`
36680      new_path="$input_path"
36681    fi
36682  fi
36683
36684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36685  if test "x$test_cygdrive_prefix" = x; then
36686    # As a simple fix, exclude /usr/bin since it's not a real path.
36687    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36689      # a path prefixed by /cygdrive for fixpath to work.
36690      new_path="$CYGWIN_ROOT_PATH$input_path"
36691    fi
36692  fi
36693
36694  # remove trailing .exe if any
36695  new_path="${new_path/%.exe/}"
36696
36697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36698
36699  # First separate the path from the arguments. This will split at the first
36700  # space.
36701  complete="$NM"
36702  path="${complete%% *}"
36703  tmp="$complete EOL"
36704  arguments="${tmp#* }"
36705
36706  # Input might be given as Windows format, start by converting to
36707  # unix format.
36708  new_path="$path"
36709
36710  windows_path="$new_path"
36711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36712    unix_path=`$CYGPATH -u "$windows_path"`
36713    new_path="$unix_path"
36714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36716    new_path="$unix_path"
36717  fi
36718
36719
36720  # Now try to locate executable using which
36721  new_path=`$WHICH "$new_path" 2> /dev/null`
36722
36723  if test "x$new_path" = x; then
36724    # Oops. Which didn't find the executable.
36725    # The splitting of arguments from the executable at a space might have been incorrect,
36726    # since paths with space are more likely in Windows. Give it another try with the whole
36727    # argument.
36728    path="$complete"
36729    arguments="EOL"
36730    new_path="$path"
36731
36732  windows_path="$new_path"
36733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36734    unix_path=`$CYGPATH -u "$windows_path"`
36735    new_path="$unix_path"
36736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36738    new_path="$unix_path"
36739  fi
36740
36741
36742    new_path=`$WHICH "$new_path" 2> /dev/null`
36743
36744    if test "x$new_path" = x; then
36745      # It's still not found. Now this is an unrecoverable error.
36746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36747$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36748      has_space=`$ECHO "$complete" | $GREP " "`
36749      if test "x$has_space" != x; then
36750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36752      fi
36753      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36754    fi
36755  fi
36756
36757  # Now new_path has a complete unix path to the binary
36758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36759    # Keep paths in /bin as-is, but remove trailing .exe if any
36760    new_path="${new_path/%.exe/}"
36761    # Do not save /bin paths to all_fixpath_prefixes!
36762  else
36763    # Not in mixed or Windows style, start by that.
36764    new_path=`cmd //c echo $new_path`
36765
36766  input_path="$new_path"
36767  # Check if we need to convert this using DOS-style short mode. If the path
36768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36769  # take no chances and rewrite it.
36770  # Note: m4 eats our [], so we need to use [ and ] instead.
36771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36772  if test "x$has_forbidden_chars" != x; then
36773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36775  fi
36776
36777    # Output is in $new_path
36778
36779  windows_path="$new_path"
36780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36781    unix_path=`$CYGPATH -u "$windows_path"`
36782    new_path="$unix_path"
36783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36785    new_path="$unix_path"
36786  fi
36787
36788    # remove trailing .exe if any
36789    new_path="${new_path/%.exe/}"
36790
36791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36793  fi
36794
36795  else
36796    # We're on a posix platform. Hooray! :)
36797    # First separate the path from the arguments. This will split at the first
36798    # space.
36799    complete="$NM"
36800    path="${complete%% *}"
36801    tmp="$complete EOL"
36802    arguments="${tmp#* }"
36803
36804    # Cannot rely on the command "which" here since it doesn't always work.
36805    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36806    if test -z "$is_absolute_path"; then
36807      # Path to executable is not absolute. Find it.
36808      IFS_save="$IFS"
36809      IFS=:
36810      for p in $PATH; do
36811        if test -f "$p/$path" && test -x "$p/$path"; then
36812          new_path="$p/$path"
36813          break
36814        fi
36815      done
36816      IFS="$IFS_save"
36817    else
36818      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
36819$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
36820      new_path="$path"
36821    fi
36822
36823    if test "x$new_path" = x; then
36824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36825$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36826      has_space=`$ECHO "$complete" | $GREP " "`
36827      if test "x$has_space" != x; then
36828        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36830      fi
36831      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36832    fi
36833  fi
36834
36835  # Now join together the path and the arguments once again
36836  if test "x$arguments" != xEOL; then
36837    new_complete="$new_path ${arguments% *}"
36838  else
36839    new_complete="$new_path"
36840  fi
36841
36842  if test "x$complete" != "x$new_complete"; then
36843    NM="$new_complete"
36844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36845$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36846  fi
36847
36848
36849
36850  # Publish this variable in the help.
36851
36852
36853  if test "x$GNM" = x; then
36854    # The variable is not set by user, try to locate tool using the code snippet
36855    for ac_prog in gnm
36856do
36857  # Extract the first word of "$ac_prog", so it can be a program name with args.
36858set dummy $ac_prog; ac_word=$2
36859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36860$as_echo_n "checking for $ac_word... " >&6; }
36861if ${ac_cv_path_GNM+:} false; then :
36862  $as_echo_n "(cached) " >&6
36863else
36864  case $GNM in
36865  [\\/]* | ?:[\\/]*)
36866  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36867  ;;
36868  *)
36869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36870for as_dir in $PATH
36871do
36872  IFS=$as_save_IFS
36873  test -z "$as_dir" && as_dir=.
36874    for ac_exec_ext in '' $ac_executable_extensions; do
36875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36876    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36878    break 2
36879  fi
36880done
36881  done
36882IFS=$as_save_IFS
36883
36884  ;;
36885esac
36886fi
36887GNM=$ac_cv_path_GNM
36888if test -n "$GNM"; then
36889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36890$as_echo "$GNM" >&6; }
36891else
36892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36893$as_echo "no" >&6; }
36894fi
36895
36896
36897  test -n "$GNM" && break
36898done
36899
36900  else
36901    # The variable is set, but is it from the command line or the environment?
36902
36903    # Try to remove the string !GNM! from our list.
36904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36906      # If it failed, the variable was not from the command line. Ignore it,
36907      # but warn the user (except for BASH, which is always set by the calling BASH).
36908      if test "xGNM" != xBASH; then
36909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36910$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36911      fi
36912      # Try to locate tool using the code snippet
36913      for ac_prog in gnm
36914do
36915  # Extract the first word of "$ac_prog", so it can be a program name with args.
36916set dummy $ac_prog; ac_word=$2
36917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36918$as_echo_n "checking for $ac_word... " >&6; }
36919if ${ac_cv_path_GNM+:} false; then :
36920  $as_echo_n "(cached) " >&6
36921else
36922  case $GNM in
36923  [\\/]* | ?:[\\/]*)
36924  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36925  ;;
36926  *)
36927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36928for as_dir in $PATH
36929do
36930  IFS=$as_save_IFS
36931  test -z "$as_dir" && as_dir=.
36932    for ac_exec_ext in '' $ac_executable_extensions; do
36933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36934    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36936    break 2
36937  fi
36938done
36939  done
36940IFS=$as_save_IFS
36941
36942  ;;
36943esac
36944fi
36945GNM=$ac_cv_path_GNM
36946if test -n "$GNM"; then
36947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36948$as_echo "$GNM" >&6; }
36949else
36950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36951$as_echo "no" >&6; }
36952fi
36953
36954
36955  test -n "$GNM" && break
36956done
36957
36958    else
36959      # If it succeeded, then it was overridden by the user. We will use it
36960      # for the tool.
36961
36962      # First remove it from the list of overridden variables, so we can test
36963      # for unknown variables in the end.
36964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36965
36966      # Check if the provided tool contains a complete path.
36967      tool_specified="$GNM"
36968      tool_basename="${tool_specified##*/}"
36969      if test "x$tool_basename" = "x$tool_specified"; then
36970        # A command without a complete path is provided, search $PATH.
36971        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36972$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36973        # Extract the first word of "$tool_basename", so it can be a program name with args.
36974set dummy $tool_basename; ac_word=$2
36975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36976$as_echo_n "checking for $ac_word... " >&6; }
36977if ${ac_cv_path_GNM+:} false; then :
36978  $as_echo_n "(cached) " >&6
36979else
36980  case $GNM in
36981  [\\/]* | ?:[\\/]*)
36982  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36983  ;;
36984  *)
36985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36986for as_dir in $PATH
36987do
36988  IFS=$as_save_IFS
36989  test -z "$as_dir" && as_dir=.
36990    for ac_exec_ext in '' $ac_executable_extensions; do
36991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36992    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36994    break 2
36995  fi
36996done
36997  done
36998IFS=$as_save_IFS
36999
37000  ;;
37001esac
37002fi
37003GNM=$ac_cv_path_GNM
37004if test -n "$GNM"; then
37005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37006$as_echo "$GNM" >&6; }
37007else
37008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37009$as_echo "no" >&6; }
37010fi
37011
37012
37013        if test "x$GNM" = x; then
37014          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37015        fi
37016      else
37017        # Otherwise we believe it is a complete path. Use it as it is.
37018        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37019$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37021$as_echo_n "checking for GNM... " >&6; }
37022        if test ! -x "$tool_specified"; then
37023          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37024$as_echo "not found" >&6; }
37025          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37026        fi
37027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37028$as_echo "$tool_specified" >&6; }
37029      fi
37030    fi
37031  fi
37032
37033
37034
37035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37036
37037  # First separate the path from the arguments. This will split at the first
37038  # space.
37039  complete="$GNM"
37040  path="${complete%% *}"
37041  tmp="$complete EOL"
37042  arguments="${tmp#* }"
37043
37044  # Input might be given as Windows format, start by converting to
37045  # unix format.
37046  new_path=`$CYGPATH -u "$path"`
37047
37048  # Now try to locate executable using which
37049  new_path=`$WHICH "$new_path" 2> /dev/null`
37050  # bat and cmd files are not always considered executable in cygwin causing which
37051  # to not find them
37052  if test "x$new_path" = x \
37053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37055    new_path=`$CYGPATH -u "$path"`
37056  fi
37057  if test "x$new_path" = x; then
37058    # Oops. Which didn't find the executable.
37059    # The splitting of arguments from the executable at a space might have been incorrect,
37060    # since paths with space are more likely in Windows. Give it another try with the whole
37061    # argument.
37062    path="$complete"
37063    arguments="EOL"
37064    new_path=`$CYGPATH -u "$path"`
37065    new_path=`$WHICH "$new_path" 2> /dev/null`
37066    # bat and cmd files are not always considered executable in cygwin causing which
37067    # to not find them
37068    if test "x$new_path" = x \
37069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37071      new_path=`$CYGPATH -u "$path"`
37072    fi
37073    if test "x$new_path" = x; then
37074      # It's still not found. Now this is an unrecoverable error.
37075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37076$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37077      has_space=`$ECHO "$complete" | $GREP " "`
37078      if test "x$has_space" != x; then
37079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37081      fi
37082      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37083    fi
37084  fi
37085
37086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37089  # "foo.exe" is OK but "foo" is an error.
37090  #
37091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37092  # It is also a way to make sure we got the proper file name for the real test later on.
37093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37094  if test "x$test_shortpath" = x; then
37095    # Short path failed, file does not exist as specified.
37096    # Try adding .exe or .cmd
37097    if test -f "${new_path}.exe"; then
37098      input_to_shortpath="${new_path}.exe"
37099    elif test -f "${new_path}.cmd"; then
37100      input_to_shortpath="${new_path}.cmd"
37101    else
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37103$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37106      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37107    fi
37108  else
37109    input_to_shortpath="$new_path"
37110  fi
37111
37112  # Call helper function which possibly converts this using DOS-style short mode.
37113  # If so, the updated path is stored in $new_path.
37114  new_path="$input_to_shortpath"
37115
37116  input_path="$input_to_shortpath"
37117  # Check if we need to convert this using DOS-style short mode. If the path
37118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37119  # take no chances and rewrite it.
37120  # Note: m4 eats our [], so we need to use [ and ] instead.
37121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37122  if test "x$has_forbidden_chars" != x; then
37123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37127      # Going to short mode and back again did indeed matter. Since short mode is
37128      # case insensitive, let's make it lowercase to improve readability.
37129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37130      # Now convert it back to Unix-stile (cygpath)
37131      input_path=`$CYGPATH -u "$shortmode_path"`
37132      new_path="$input_path"
37133    fi
37134  fi
37135
37136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37137  if test "x$test_cygdrive_prefix" = x; then
37138    # As a simple fix, exclude /usr/bin since it's not a real path.
37139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37141      # a path prefixed by /cygdrive for fixpath to work.
37142      new_path="$CYGWIN_ROOT_PATH$input_path"
37143    fi
37144  fi
37145
37146  # remove trailing .exe if any
37147  new_path="${new_path/%.exe/}"
37148
37149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37150
37151  # First separate the path from the arguments. This will split at the first
37152  # space.
37153  complete="$GNM"
37154  path="${complete%% *}"
37155  tmp="$complete EOL"
37156  arguments="${tmp#* }"
37157
37158  # Input might be given as Windows format, start by converting to
37159  # unix format.
37160  new_path="$path"
37161
37162  windows_path="$new_path"
37163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37164    unix_path=`$CYGPATH -u "$windows_path"`
37165    new_path="$unix_path"
37166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37168    new_path="$unix_path"
37169  fi
37170
37171
37172  # Now try to locate executable using which
37173  new_path=`$WHICH "$new_path" 2> /dev/null`
37174
37175  if test "x$new_path" = x; then
37176    # Oops. Which didn't find the executable.
37177    # The splitting of arguments from the executable at a space might have been incorrect,
37178    # since paths with space are more likely in Windows. Give it another try with the whole
37179    # argument.
37180    path="$complete"
37181    arguments="EOL"
37182    new_path="$path"
37183
37184  windows_path="$new_path"
37185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37186    unix_path=`$CYGPATH -u "$windows_path"`
37187    new_path="$unix_path"
37188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37190    new_path="$unix_path"
37191  fi
37192
37193
37194    new_path=`$WHICH "$new_path" 2> /dev/null`
37195
37196    if test "x$new_path" = x; then
37197      # It's still not found. Now this is an unrecoverable error.
37198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37199$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37200      has_space=`$ECHO "$complete" | $GREP " "`
37201      if test "x$has_space" != x; then
37202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37204      fi
37205      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37206    fi
37207  fi
37208
37209  # Now new_path has a complete unix path to the binary
37210  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37211    # Keep paths in /bin as-is, but remove trailing .exe if any
37212    new_path="${new_path/%.exe/}"
37213    # Do not save /bin paths to all_fixpath_prefixes!
37214  else
37215    # Not in mixed or Windows style, start by that.
37216    new_path=`cmd //c echo $new_path`
37217
37218  input_path="$new_path"
37219  # Check if we need to convert this using DOS-style short mode. If the path
37220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37221  # take no chances and rewrite it.
37222  # Note: m4 eats our [], so we need to use [ and ] instead.
37223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37224  if test "x$has_forbidden_chars" != x; then
37225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37226    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37227  fi
37228
37229    # Output is in $new_path
37230
37231  windows_path="$new_path"
37232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37233    unix_path=`$CYGPATH -u "$windows_path"`
37234    new_path="$unix_path"
37235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37237    new_path="$unix_path"
37238  fi
37239
37240    # remove trailing .exe if any
37241    new_path="${new_path/%.exe/}"
37242
37243    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37244    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37245  fi
37246
37247  else
37248    # We're on a posix platform. Hooray! :)
37249    # First separate the path from the arguments. This will split at the first
37250    # space.
37251    complete="$GNM"
37252    path="${complete%% *}"
37253    tmp="$complete EOL"
37254    arguments="${tmp#* }"
37255
37256    # Cannot rely on the command "which" here since it doesn't always work.
37257    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37258    if test -z "$is_absolute_path"; then
37259      # Path to executable is not absolute. Find it.
37260      IFS_save="$IFS"
37261      IFS=:
37262      for p in $PATH; do
37263        if test -f "$p/$path" && test -x "$p/$path"; then
37264          new_path="$p/$path"
37265          break
37266        fi
37267      done
37268      IFS="$IFS_save"
37269    else
37270      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
37271$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
37272      new_path="$path"
37273    fi
37274
37275    if test "x$new_path" = x; then
37276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37277$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37278      has_space=`$ECHO "$complete" | $GREP " "`
37279      if test "x$has_space" != x; then
37280        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37282      fi
37283      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37284    fi
37285  fi
37286
37287  # Now join together the path and the arguments once again
37288  if test "x$arguments" != xEOL; then
37289    new_complete="$new_path ${arguments% *}"
37290  else
37291    new_complete="$new_path"
37292  fi
37293
37294  if test "x$complete" != "x$new_complete"; then
37295    GNM="$new_complete"
37296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37297$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37298  fi
37299
37300
37301
37302  # Publish this variable in the help.
37303
37304
37305  if test "x$STRIP" = x; then
37306    # The variable is not set by user, try to locate tool using the code snippet
37307    for ac_prog in strip
37308do
37309  # Extract the first word of "$ac_prog", so it can be a program name with args.
37310set dummy $ac_prog; ac_word=$2
37311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37312$as_echo_n "checking for $ac_word... " >&6; }
37313if ${ac_cv_path_STRIP+:} false; then :
37314  $as_echo_n "(cached) " >&6
37315else
37316  case $STRIP in
37317  [\\/]* | ?:[\\/]*)
37318  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37319  ;;
37320  *)
37321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37322for as_dir in $PATH
37323do
37324  IFS=$as_save_IFS
37325  test -z "$as_dir" && as_dir=.
37326    for ac_exec_ext in '' $ac_executable_extensions; do
37327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37328    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37330    break 2
37331  fi
37332done
37333  done
37334IFS=$as_save_IFS
37335
37336  ;;
37337esac
37338fi
37339STRIP=$ac_cv_path_STRIP
37340if test -n "$STRIP"; then
37341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37342$as_echo "$STRIP" >&6; }
37343else
37344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37345$as_echo "no" >&6; }
37346fi
37347
37348
37349  test -n "$STRIP" && break
37350done
37351
37352  else
37353    # The variable is set, but is it from the command line or the environment?
37354
37355    # Try to remove the string !STRIP! from our list.
37356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37358      # If it failed, the variable was not from the command line. Ignore it,
37359      # but warn the user (except for BASH, which is always set by the calling BASH).
37360      if test "xSTRIP" != xBASH; then
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37362$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37363      fi
37364      # Try to locate tool using the code snippet
37365      for ac_prog in strip
37366do
37367  # Extract the first word of "$ac_prog", so it can be a program name with args.
37368set dummy $ac_prog; ac_word=$2
37369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37370$as_echo_n "checking for $ac_word... " >&6; }
37371if ${ac_cv_path_STRIP+:} false; then :
37372  $as_echo_n "(cached) " >&6
37373else
37374  case $STRIP in
37375  [\\/]* | ?:[\\/]*)
37376  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37377  ;;
37378  *)
37379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37380for as_dir in $PATH
37381do
37382  IFS=$as_save_IFS
37383  test -z "$as_dir" && as_dir=.
37384    for ac_exec_ext in '' $ac_executable_extensions; do
37385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37386    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37388    break 2
37389  fi
37390done
37391  done
37392IFS=$as_save_IFS
37393
37394  ;;
37395esac
37396fi
37397STRIP=$ac_cv_path_STRIP
37398if test -n "$STRIP"; then
37399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37400$as_echo "$STRIP" >&6; }
37401else
37402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37403$as_echo "no" >&6; }
37404fi
37405
37406
37407  test -n "$STRIP" && break
37408done
37409
37410    else
37411      # If it succeeded, then it was overridden by the user. We will use it
37412      # for the tool.
37413
37414      # First remove it from the list of overridden variables, so we can test
37415      # for unknown variables in the end.
37416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37417
37418      # Check if the provided tool contains a complete path.
37419      tool_specified="$STRIP"
37420      tool_basename="${tool_specified##*/}"
37421      if test "x$tool_basename" = "x$tool_specified"; then
37422        # A command without a complete path is provided, search $PATH.
37423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37424$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37425        # Extract the first word of "$tool_basename", so it can be a program name with args.
37426set dummy $tool_basename; ac_word=$2
37427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37428$as_echo_n "checking for $ac_word... " >&6; }
37429if ${ac_cv_path_STRIP+:} false; then :
37430  $as_echo_n "(cached) " >&6
37431else
37432  case $STRIP in
37433  [\\/]* | ?:[\\/]*)
37434  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37435  ;;
37436  *)
37437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37438for as_dir in $PATH
37439do
37440  IFS=$as_save_IFS
37441  test -z "$as_dir" && as_dir=.
37442    for ac_exec_ext in '' $ac_executable_extensions; do
37443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37444    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37446    break 2
37447  fi
37448done
37449  done
37450IFS=$as_save_IFS
37451
37452  ;;
37453esac
37454fi
37455STRIP=$ac_cv_path_STRIP
37456if test -n "$STRIP"; then
37457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37458$as_echo "$STRIP" >&6; }
37459else
37460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37461$as_echo "no" >&6; }
37462fi
37463
37464
37465        if test "x$STRIP" = x; then
37466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37467        fi
37468      else
37469        # Otherwise we believe it is a complete path. Use it as it is.
37470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37471$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37473$as_echo_n "checking for STRIP... " >&6; }
37474        if test ! -x "$tool_specified"; then
37475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37476$as_echo "not found" >&6; }
37477          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37478        fi
37479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37480$as_echo "$tool_specified" >&6; }
37481      fi
37482    fi
37483  fi
37484
37485
37486
37487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37488
37489  # First separate the path from the arguments. This will split at the first
37490  # space.
37491  complete="$STRIP"
37492  path="${complete%% *}"
37493  tmp="$complete EOL"
37494  arguments="${tmp#* }"
37495
37496  # Input might be given as Windows format, start by converting to
37497  # unix format.
37498  new_path=`$CYGPATH -u "$path"`
37499
37500  # Now try to locate executable using which
37501  new_path=`$WHICH "$new_path" 2> /dev/null`
37502  # bat and cmd files are not always considered executable in cygwin causing which
37503  # to not find them
37504  if test "x$new_path" = x \
37505      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37506      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37507    new_path=`$CYGPATH -u "$path"`
37508  fi
37509  if test "x$new_path" = x; then
37510    # Oops. Which didn't find the executable.
37511    # The splitting of arguments from the executable at a space might have been incorrect,
37512    # since paths with space are more likely in Windows. Give it another try with the whole
37513    # argument.
37514    path="$complete"
37515    arguments="EOL"
37516    new_path=`$CYGPATH -u "$path"`
37517    new_path=`$WHICH "$new_path" 2> /dev/null`
37518    # bat and cmd files are not always considered executable in cygwin causing which
37519    # to not find them
37520    if test "x$new_path" = x \
37521        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37522        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37523      new_path=`$CYGPATH -u "$path"`
37524    fi
37525    if test "x$new_path" = x; then
37526      # It's still not found. Now this is an unrecoverable error.
37527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37528$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37529      has_space=`$ECHO "$complete" | $GREP " "`
37530      if test "x$has_space" != x; then
37531        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37532$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37533      fi
37534      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37535    fi
37536  fi
37537
37538  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37539  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37540  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37541  # "foo.exe" is OK but "foo" is an error.
37542  #
37543  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37544  # It is also a way to make sure we got the proper file name for the real test later on.
37545  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37546  if test "x$test_shortpath" = x; then
37547    # Short path failed, file does not exist as specified.
37548    # Try adding .exe or .cmd
37549    if test -f "${new_path}.exe"; then
37550      input_to_shortpath="${new_path}.exe"
37551    elif test -f "${new_path}.cmd"; then
37552      input_to_shortpath="${new_path}.cmd"
37553    else
37554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37555$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37556      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37557$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37558      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37559    fi
37560  else
37561    input_to_shortpath="$new_path"
37562  fi
37563
37564  # Call helper function which possibly converts this using DOS-style short mode.
37565  # If so, the updated path is stored in $new_path.
37566  new_path="$input_to_shortpath"
37567
37568  input_path="$input_to_shortpath"
37569  # Check if we need to convert this using DOS-style short mode. If the path
37570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37571  # take no chances and rewrite it.
37572  # Note: m4 eats our [], so we need to use [ and ] instead.
37573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37574  if test "x$has_forbidden_chars" != x; then
37575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37579      # Going to short mode and back again did indeed matter. Since short mode is
37580      # case insensitive, let's make it lowercase to improve readability.
37581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37582      # Now convert it back to Unix-stile (cygpath)
37583      input_path=`$CYGPATH -u "$shortmode_path"`
37584      new_path="$input_path"
37585    fi
37586  fi
37587
37588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37589  if test "x$test_cygdrive_prefix" = x; then
37590    # As a simple fix, exclude /usr/bin since it's not a real path.
37591    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37593      # a path prefixed by /cygdrive for fixpath to work.
37594      new_path="$CYGWIN_ROOT_PATH$input_path"
37595    fi
37596  fi
37597
37598  # remove trailing .exe if any
37599  new_path="${new_path/%.exe/}"
37600
37601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37602
37603  # First separate the path from the arguments. This will split at the first
37604  # space.
37605  complete="$STRIP"
37606  path="${complete%% *}"
37607  tmp="$complete EOL"
37608  arguments="${tmp#* }"
37609
37610  # Input might be given as Windows format, start by converting to
37611  # unix format.
37612  new_path="$path"
37613
37614  windows_path="$new_path"
37615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37616    unix_path=`$CYGPATH -u "$windows_path"`
37617    new_path="$unix_path"
37618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37620    new_path="$unix_path"
37621  fi
37622
37623
37624  # Now try to locate executable using which
37625  new_path=`$WHICH "$new_path" 2> /dev/null`
37626
37627  if test "x$new_path" = x; then
37628    # Oops. Which didn't find the executable.
37629    # The splitting of arguments from the executable at a space might have been incorrect,
37630    # since paths with space are more likely in Windows. Give it another try with the whole
37631    # argument.
37632    path="$complete"
37633    arguments="EOL"
37634    new_path="$path"
37635
37636  windows_path="$new_path"
37637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37638    unix_path=`$CYGPATH -u "$windows_path"`
37639    new_path="$unix_path"
37640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37642    new_path="$unix_path"
37643  fi
37644
37645
37646    new_path=`$WHICH "$new_path" 2> /dev/null`
37647
37648    if test "x$new_path" = x; then
37649      # It's still not found. Now this is an unrecoverable error.
37650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37651$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37652      has_space=`$ECHO "$complete" | $GREP " "`
37653      if test "x$has_space" != x; then
37654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37656      fi
37657      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37658    fi
37659  fi
37660
37661  # Now new_path has a complete unix path to the binary
37662  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37663    # Keep paths in /bin as-is, but remove trailing .exe if any
37664    new_path="${new_path/%.exe/}"
37665    # Do not save /bin paths to all_fixpath_prefixes!
37666  else
37667    # Not in mixed or Windows style, start by that.
37668    new_path=`cmd //c echo $new_path`
37669
37670  input_path="$new_path"
37671  # Check if we need to convert this using DOS-style short mode. If the path
37672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37673  # take no chances and rewrite it.
37674  # Note: m4 eats our [], so we need to use [ and ] instead.
37675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37676  if test "x$has_forbidden_chars" != x; then
37677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37679  fi
37680
37681    # Output is in $new_path
37682
37683  windows_path="$new_path"
37684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37685    unix_path=`$CYGPATH -u "$windows_path"`
37686    new_path="$unix_path"
37687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37689    new_path="$unix_path"
37690  fi
37691
37692    # remove trailing .exe if any
37693    new_path="${new_path/%.exe/}"
37694
37695    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37696    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37697  fi
37698
37699  else
37700    # We're on a posix platform. Hooray! :)
37701    # First separate the path from the arguments. This will split at the first
37702    # space.
37703    complete="$STRIP"
37704    path="${complete%% *}"
37705    tmp="$complete EOL"
37706    arguments="${tmp#* }"
37707
37708    # Cannot rely on the command "which" here since it doesn't always work.
37709    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37710    if test -z "$is_absolute_path"; then
37711      # Path to executable is not absolute. Find it.
37712      IFS_save="$IFS"
37713      IFS=:
37714      for p in $PATH; do
37715        if test -f "$p/$path" && test -x "$p/$path"; then
37716          new_path="$p/$path"
37717          break
37718        fi
37719      done
37720      IFS="$IFS_save"
37721    else
37722      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37723$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37724      new_path="$path"
37725    fi
37726
37727    if test "x$new_path" = x; then
37728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37729$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37730      has_space=`$ECHO "$complete" | $GREP " "`
37731      if test "x$has_space" != x; then
37732        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37734      fi
37735      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37736    fi
37737  fi
37738
37739  # Now join together the path and the arguments once again
37740  if test "x$arguments" != xEOL; then
37741    new_complete="$new_path ${arguments% *}"
37742  else
37743    new_complete="$new_path"
37744  fi
37745
37746  if test "x$complete" != "x$new_complete"; then
37747    STRIP="$new_complete"
37748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37749$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37750  fi
37751
37752
37753
37754  # Publish this variable in the help.
37755
37756
37757  if test "x$MCS" = x; then
37758    # The variable is not set by user, try to locate tool using the code snippet
37759    for ac_prog in mcs
37760do
37761  # Extract the first word of "$ac_prog", so it can be a program name with args.
37762set dummy $ac_prog; ac_word=$2
37763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37764$as_echo_n "checking for $ac_word... " >&6; }
37765if ${ac_cv_path_MCS+:} false; then :
37766  $as_echo_n "(cached) " >&6
37767else
37768  case $MCS in
37769  [\\/]* | ?:[\\/]*)
37770  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37771  ;;
37772  *)
37773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37774for as_dir in $PATH
37775do
37776  IFS=$as_save_IFS
37777  test -z "$as_dir" && as_dir=.
37778    for ac_exec_ext in '' $ac_executable_extensions; do
37779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37780    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37782    break 2
37783  fi
37784done
37785  done
37786IFS=$as_save_IFS
37787
37788  ;;
37789esac
37790fi
37791MCS=$ac_cv_path_MCS
37792if test -n "$MCS"; then
37793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37794$as_echo "$MCS" >&6; }
37795else
37796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37797$as_echo "no" >&6; }
37798fi
37799
37800
37801  test -n "$MCS" && break
37802done
37803
37804  else
37805    # The variable is set, but is it from the command line or the environment?
37806
37807    # Try to remove the string !MCS! from our list.
37808    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37809    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37810      # If it failed, the variable was not from the command line. Ignore it,
37811      # but warn the user (except for BASH, which is always set by the calling BASH).
37812      if test "xMCS" != xBASH; then
37813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37814$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37815      fi
37816      # Try to locate tool using the code snippet
37817      for ac_prog in mcs
37818do
37819  # Extract the first word of "$ac_prog", so it can be a program name with args.
37820set dummy $ac_prog; ac_word=$2
37821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37822$as_echo_n "checking for $ac_word... " >&6; }
37823if ${ac_cv_path_MCS+:} false; then :
37824  $as_echo_n "(cached) " >&6
37825else
37826  case $MCS in
37827  [\\/]* | ?:[\\/]*)
37828  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37829  ;;
37830  *)
37831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37832for as_dir in $PATH
37833do
37834  IFS=$as_save_IFS
37835  test -z "$as_dir" && as_dir=.
37836    for ac_exec_ext in '' $ac_executable_extensions; do
37837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37838    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37840    break 2
37841  fi
37842done
37843  done
37844IFS=$as_save_IFS
37845
37846  ;;
37847esac
37848fi
37849MCS=$ac_cv_path_MCS
37850if test -n "$MCS"; then
37851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37852$as_echo "$MCS" >&6; }
37853else
37854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37855$as_echo "no" >&6; }
37856fi
37857
37858
37859  test -n "$MCS" && break
37860done
37861
37862    else
37863      # If it succeeded, then it was overridden by the user. We will use it
37864      # for the tool.
37865
37866      # First remove it from the list of overridden variables, so we can test
37867      # for unknown variables in the end.
37868      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37869
37870      # Check if the provided tool contains a complete path.
37871      tool_specified="$MCS"
37872      tool_basename="${tool_specified##*/}"
37873      if test "x$tool_basename" = "x$tool_specified"; then
37874        # A command without a complete path is provided, search $PATH.
37875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37876$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37877        # Extract the first word of "$tool_basename", so it can be a program name with args.
37878set dummy $tool_basename; ac_word=$2
37879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37880$as_echo_n "checking for $ac_word... " >&6; }
37881if ${ac_cv_path_MCS+:} false; then :
37882  $as_echo_n "(cached) " >&6
37883else
37884  case $MCS in
37885  [\\/]* | ?:[\\/]*)
37886  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37887  ;;
37888  *)
37889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37890for as_dir in $PATH
37891do
37892  IFS=$as_save_IFS
37893  test -z "$as_dir" && as_dir=.
37894    for ac_exec_ext in '' $ac_executable_extensions; do
37895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37896    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37898    break 2
37899  fi
37900done
37901  done
37902IFS=$as_save_IFS
37903
37904  ;;
37905esac
37906fi
37907MCS=$ac_cv_path_MCS
37908if test -n "$MCS"; then
37909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37910$as_echo "$MCS" >&6; }
37911else
37912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37913$as_echo "no" >&6; }
37914fi
37915
37916
37917        if test "x$MCS" = x; then
37918          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37919        fi
37920      else
37921        # Otherwise we believe it is a complete path. Use it as it is.
37922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37923$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37925$as_echo_n "checking for MCS... " >&6; }
37926        if test ! -x "$tool_specified"; then
37927          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37928$as_echo "not found" >&6; }
37929          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37930        fi
37931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37932$as_echo "$tool_specified" >&6; }
37933      fi
37934    fi
37935  fi
37936
37937
37938
37939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37940
37941  # First separate the path from the arguments. This will split at the first
37942  # space.
37943  complete="$MCS"
37944  path="${complete%% *}"
37945  tmp="$complete EOL"
37946  arguments="${tmp#* }"
37947
37948  # Input might be given as Windows format, start by converting to
37949  # unix format.
37950  new_path=`$CYGPATH -u "$path"`
37951
37952  # Now try to locate executable using which
37953  new_path=`$WHICH "$new_path" 2> /dev/null`
37954  # bat and cmd files are not always considered executable in cygwin causing which
37955  # to not find them
37956  if test "x$new_path" = x \
37957      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37958      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37959    new_path=`$CYGPATH -u "$path"`
37960  fi
37961  if test "x$new_path" = x; then
37962    # Oops. Which didn't find the executable.
37963    # The splitting of arguments from the executable at a space might have been incorrect,
37964    # since paths with space are more likely in Windows. Give it another try with the whole
37965    # argument.
37966    path="$complete"
37967    arguments="EOL"
37968    new_path=`$CYGPATH -u "$path"`
37969    new_path=`$WHICH "$new_path" 2> /dev/null`
37970    # bat and cmd files are not always considered executable in cygwin causing which
37971    # to not find them
37972    if test "x$new_path" = x \
37973        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37974        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37975      new_path=`$CYGPATH -u "$path"`
37976    fi
37977    if test "x$new_path" = x; then
37978      # It's still not found. Now this is an unrecoverable error.
37979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37980$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37981      has_space=`$ECHO "$complete" | $GREP " "`
37982      if test "x$has_space" != x; then
37983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37985      fi
37986      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37987    fi
37988  fi
37989
37990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37993  # "foo.exe" is OK but "foo" is an error.
37994  #
37995  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37996  # It is also a way to make sure we got the proper file name for the real test later on.
37997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37998  if test "x$test_shortpath" = x; then
37999    # Short path failed, file does not exist as specified.
38000    # Try adding .exe or .cmd
38001    if test -f "${new_path}.exe"; then
38002      input_to_shortpath="${new_path}.exe"
38003    elif test -f "${new_path}.cmd"; then
38004      input_to_shortpath="${new_path}.cmd"
38005    else
38006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
38007$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38010      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38011    fi
38012  else
38013    input_to_shortpath="$new_path"
38014  fi
38015
38016  # Call helper function which possibly converts this using DOS-style short mode.
38017  # If so, the updated path is stored in $new_path.
38018  new_path="$input_to_shortpath"
38019
38020  input_path="$input_to_shortpath"
38021  # Check if we need to convert this using DOS-style short mode. If the path
38022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38023  # take no chances and rewrite it.
38024  # Note: m4 eats our [], so we need to use [ and ] instead.
38025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38026  if test "x$has_forbidden_chars" != x; then
38027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38031      # Going to short mode and back again did indeed matter. Since short mode is
38032      # case insensitive, let's make it lowercase to improve readability.
38033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38034      # Now convert it back to Unix-stile (cygpath)
38035      input_path=`$CYGPATH -u "$shortmode_path"`
38036      new_path="$input_path"
38037    fi
38038  fi
38039
38040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38041  if test "x$test_cygdrive_prefix" = x; then
38042    # As a simple fix, exclude /usr/bin since it's not a real path.
38043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38045      # a path prefixed by /cygdrive for fixpath to work.
38046      new_path="$CYGWIN_ROOT_PATH$input_path"
38047    fi
38048  fi
38049
38050  # remove trailing .exe if any
38051  new_path="${new_path/%.exe/}"
38052
38053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38054
38055  # First separate the path from the arguments. This will split at the first
38056  # space.
38057  complete="$MCS"
38058  path="${complete%% *}"
38059  tmp="$complete EOL"
38060  arguments="${tmp#* }"
38061
38062  # Input might be given as Windows format, start by converting to
38063  # unix format.
38064  new_path="$path"
38065
38066  windows_path="$new_path"
38067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38068    unix_path=`$CYGPATH -u "$windows_path"`
38069    new_path="$unix_path"
38070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38072    new_path="$unix_path"
38073  fi
38074
38075
38076  # Now try to locate executable using which
38077  new_path=`$WHICH "$new_path" 2> /dev/null`
38078
38079  if test "x$new_path" = x; then
38080    # Oops. Which didn't find the executable.
38081    # The splitting of arguments from the executable at a space might have been incorrect,
38082    # since paths with space are more likely in Windows. Give it another try with the whole
38083    # argument.
38084    path="$complete"
38085    arguments="EOL"
38086    new_path="$path"
38087
38088  windows_path="$new_path"
38089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38090    unix_path=`$CYGPATH -u "$windows_path"`
38091    new_path="$unix_path"
38092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38094    new_path="$unix_path"
38095  fi
38096
38097
38098    new_path=`$WHICH "$new_path" 2> /dev/null`
38099
38100    if test "x$new_path" = x; then
38101      # It's still not found. Now this is an unrecoverable error.
38102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38103$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38104      has_space=`$ECHO "$complete" | $GREP " "`
38105      if test "x$has_space" != x; then
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38108      fi
38109      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38110    fi
38111  fi
38112
38113  # Now new_path has a complete unix path to the binary
38114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38115    # Keep paths in /bin as-is, but remove trailing .exe if any
38116    new_path="${new_path/%.exe/}"
38117    # Do not save /bin paths to all_fixpath_prefixes!
38118  else
38119    # Not in mixed or Windows style, start by that.
38120    new_path=`cmd //c echo $new_path`
38121
38122  input_path="$new_path"
38123  # Check if we need to convert this using DOS-style short mode. If the path
38124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38125  # take no chances and rewrite it.
38126  # Note: m4 eats our [], so we need to use [ and ] instead.
38127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38128  if test "x$has_forbidden_chars" != x; then
38129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38131  fi
38132
38133    # Output is in $new_path
38134
38135  windows_path="$new_path"
38136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38137    unix_path=`$CYGPATH -u "$windows_path"`
38138    new_path="$unix_path"
38139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38141    new_path="$unix_path"
38142  fi
38143
38144    # remove trailing .exe if any
38145    new_path="${new_path/%.exe/}"
38146
38147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38149  fi
38150
38151  else
38152    # We're on a posix platform. Hooray! :)
38153    # First separate the path from the arguments. This will split at the first
38154    # space.
38155    complete="$MCS"
38156    path="${complete%% *}"
38157    tmp="$complete EOL"
38158    arguments="${tmp#* }"
38159
38160    # Cannot rely on the command "which" here since it doesn't always work.
38161    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38162    if test -z "$is_absolute_path"; then
38163      # Path to executable is not absolute. Find it.
38164      IFS_save="$IFS"
38165      IFS=:
38166      for p in $PATH; do
38167        if test -f "$p/$path" && test -x "$p/$path"; then
38168          new_path="$p/$path"
38169          break
38170        fi
38171      done
38172      IFS="$IFS_save"
38173    else
38174      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
38175$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
38176      new_path="$path"
38177    fi
38178
38179    if test "x$new_path" = x; then
38180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38181$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38182      has_space=`$ECHO "$complete" | $GREP " "`
38183      if test "x$has_space" != x; then
38184        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38185$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38186      fi
38187      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38188    fi
38189  fi
38190
38191  # Now join together the path and the arguments once again
38192  if test "x$arguments" != xEOL; then
38193    new_complete="$new_path ${arguments% *}"
38194  else
38195    new_complete="$new_path"
38196  fi
38197
38198  if test "x$complete" != "x$new_complete"; then
38199    MCS="$new_complete"
38200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
38201$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
38202  fi
38203
38204  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
38205
38206
38207  # Publish this variable in the help.
38208
38209
38210  if test "x$NM" = x; then
38211    # The variable is not set by user, try to locate tool using the code snippet
38212    if test -n "$ac_tool_prefix"; then
38213  for ac_prog in nm
38214  do
38215    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38216set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38218$as_echo_n "checking for $ac_word... " >&6; }
38219if ${ac_cv_prog_NM+:} false; then :
38220  $as_echo_n "(cached) " >&6
38221else
38222  if test -n "$NM"; then
38223  ac_cv_prog_NM="$NM" # Let the user override the test.
38224else
38225as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38226for as_dir in $PATH
38227do
38228  IFS=$as_save_IFS
38229  test -z "$as_dir" && as_dir=.
38230    for ac_exec_ext in '' $ac_executable_extensions; do
38231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38232    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38234    break 2
38235  fi
38236done
38237  done
38238IFS=$as_save_IFS
38239
38240fi
38241fi
38242NM=$ac_cv_prog_NM
38243if test -n "$NM"; then
38244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38245$as_echo "$NM" >&6; }
38246else
38247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38248$as_echo "no" >&6; }
38249fi
38250
38251
38252    test -n "$NM" && break
38253  done
38254fi
38255if test -z "$NM"; then
38256  ac_ct_NM=$NM
38257  for ac_prog in nm
38258do
38259  # Extract the first word of "$ac_prog", so it can be a program name with args.
38260set dummy $ac_prog; ac_word=$2
38261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38262$as_echo_n "checking for $ac_word... " >&6; }
38263if ${ac_cv_prog_ac_ct_NM+:} false; then :
38264  $as_echo_n "(cached) " >&6
38265else
38266  if test -n "$ac_ct_NM"; then
38267  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38268else
38269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38270for as_dir in $PATH
38271do
38272  IFS=$as_save_IFS
38273  test -z "$as_dir" && as_dir=.
38274    for ac_exec_ext in '' $ac_executable_extensions; do
38275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38276    ac_cv_prog_ac_ct_NM="$ac_prog"
38277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38278    break 2
38279  fi
38280done
38281  done
38282IFS=$as_save_IFS
38283
38284fi
38285fi
38286ac_ct_NM=$ac_cv_prog_ac_ct_NM
38287if test -n "$ac_ct_NM"; then
38288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38289$as_echo "$ac_ct_NM" >&6; }
38290else
38291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38292$as_echo "no" >&6; }
38293fi
38294
38295
38296  test -n "$ac_ct_NM" && break
38297done
38298
38299  if test "x$ac_ct_NM" = x; then
38300    NM=""
38301  else
38302    case $cross_compiling:$ac_tool_warned in
38303yes:)
38304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38306ac_tool_warned=yes ;;
38307esac
38308    NM=$ac_ct_NM
38309  fi
38310fi
38311
38312  else
38313    # The variable is set, but is it from the command line or the environment?
38314
38315    # Try to remove the string !NM! from our list.
38316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38318      # If it failed, the variable was not from the command line. Ignore it,
38319      # but warn the user (except for BASH, which is always set by the calling BASH).
38320      if test "xNM" != xBASH; then
38321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38322$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38323      fi
38324      # Try to locate tool using the code snippet
38325      if test -n "$ac_tool_prefix"; then
38326  for ac_prog in nm
38327  do
38328    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38329set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38331$as_echo_n "checking for $ac_word... " >&6; }
38332if ${ac_cv_prog_NM+:} false; then :
38333  $as_echo_n "(cached) " >&6
38334else
38335  if test -n "$NM"; then
38336  ac_cv_prog_NM="$NM" # Let the user override the test.
38337else
38338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38339for as_dir in $PATH
38340do
38341  IFS=$as_save_IFS
38342  test -z "$as_dir" && as_dir=.
38343    for ac_exec_ext in '' $ac_executable_extensions; do
38344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38345    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38347    break 2
38348  fi
38349done
38350  done
38351IFS=$as_save_IFS
38352
38353fi
38354fi
38355NM=$ac_cv_prog_NM
38356if test -n "$NM"; then
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38358$as_echo "$NM" >&6; }
38359else
38360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38361$as_echo "no" >&6; }
38362fi
38363
38364
38365    test -n "$NM" && break
38366  done
38367fi
38368if test -z "$NM"; then
38369  ac_ct_NM=$NM
38370  for ac_prog in nm
38371do
38372  # Extract the first word of "$ac_prog", so it can be a program name with args.
38373set dummy $ac_prog; ac_word=$2
38374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38375$as_echo_n "checking for $ac_word... " >&6; }
38376if ${ac_cv_prog_ac_ct_NM+:} false; then :
38377  $as_echo_n "(cached) " >&6
38378else
38379  if test -n "$ac_ct_NM"; then
38380  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38381else
38382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38383for as_dir in $PATH
38384do
38385  IFS=$as_save_IFS
38386  test -z "$as_dir" && as_dir=.
38387    for ac_exec_ext in '' $ac_executable_extensions; do
38388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38389    ac_cv_prog_ac_ct_NM="$ac_prog"
38390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38391    break 2
38392  fi
38393done
38394  done
38395IFS=$as_save_IFS
38396
38397fi
38398fi
38399ac_ct_NM=$ac_cv_prog_ac_ct_NM
38400if test -n "$ac_ct_NM"; then
38401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38402$as_echo "$ac_ct_NM" >&6; }
38403else
38404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38405$as_echo "no" >&6; }
38406fi
38407
38408
38409  test -n "$ac_ct_NM" && break
38410done
38411
38412  if test "x$ac_ct_NM" = x; then
38413    NM=""
38414  else
38415    case $cross_compiling:$ac_tool_warned in
38416yes:)
38417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38419ac_tool_warned=yes ;;
38420esac
38421    NM=$ac_ct_NM
38422  fi
38423fi
38424
38425    else
38426      # If it succeeded, then it was overridden by the user. We will use it
38427      # for the tool.
38428
38429      # First remove it from the list of overridden variables, so we can test
38430      # for unknown variables in the end.
38431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38432
38433      # Check if the provided tool contains a complete path.
38434      tool_specified="$NM"
38435      tool_basename="${tool_specified##*/}"
38436      if test "x$tool_basename" = "x$tool_specified"; then
38437        # A command without a complete path is provided, search $PATH.
38438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38439$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38440        # Extract the first word of "$tool_basename", so it can be a program name with args.
38441set dummy $tool_basename; ac_word=$2
38442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38443$as_echo_n "checking for $ac_word... " >&6; }
38444if ${ac_cv_path_NM+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  case $NM in
38448  [\\/]* | ?:[\\/]*)
38449  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38450  ;;
38451  *)
38452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38453for as_dir in $PATH
38454do
38455  IFS=$as_save_IFS
38456  test -z "$as_dir" && as_dir=.
38457    for ac_exec_ext in '' $ac_executable_extensions; do
38458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38459    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38461    break 2
38462  fi
38463done
38464  done
38465IFS=$as_save_IFS
38466
38467  ;;
38468esac
38469fi
38470NM=$ac_cv_path_NM
38471if test -n "$NM"; then
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38473$as_echo "$NM" >&6; }
38474else
38475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38476$as_echo "no" >&6; }
38477fi
38478
38479
38480        if test "x$NM" = x; then
38481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38482        fi
38483      else
38484        # Otherwise we believe it is a complete path. Use it as it is.
38485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38486$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38488$as_echo_n "checking for NM... " >&6; }
38489        if test ! -x "$tool_specified"; then
38490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38491$as_echo "not found" >&6; }
38492          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38493        fi
38494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38495$as_echo "$tool_specified" >&6; }
38496      fi
38497    fi
38498  fi
38499
38500
38501
38502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38503
38504  # First separate the path from the arguments. This will split at the first
38505  # space.
38506  complete="$NM"
38507  path="${complete%% *}"
38508  tmp="$complete EOL"
38509  arguments="${tmp#* }"
38510
38511  # Input might be given as Windows format, start by converting to
38512  # unix format.
38513  new_path=`$CYGPATH -u "$path"`
38514
38515  # Now try to locate executable using which
38516  new_path=`$WHICH "$new_path" 2> /dev/null`
38517  # bat and cmd files are not always considered executable in cygwin causing which
38518  # to not find them
38519  if test "x$new_path" = x \
38520      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38521      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38522    new_path=`$CYGPATH -u "$path"`
38523  fi
38524  if test "x$new_path" = x; then
38525    # Oops. Which didn't find the executable.
38526    # The splitting of arguments from the executable at a space might have been incorrect,
38527    # since paths with space are more likely in Windows. Give it another try with the whole
38528    # argument.
38529    path="$complete"
38530    arguments="EOL"
38531    new_path=`$CYGPATH -u "$path"`
38532    new_path=`$WHICH "$new_path" 2> /dev/null`
38533    # bat and cmd files are not always considered executable in cygwin causing which
38534    # to not find them
38535    if test "x$new_path" = x \
38536        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38537        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38538      new_path=`$CYGPATH -u "$path"`
38539    fi
38540    if test "x$new_path" = x; then
38541      # It's still not found. Now this is an unrecoverable error.
38542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38543$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38544      has_space=`$ECHO "$complete" | $GREP " "`
38545      if test "x$has_space" != x; then
38546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38548      fi
38549      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38550    fi
38551  fi
38552
38553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38556  # "foo.exe" is OK but "foo" is an error.
38557  #
38558  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38559  # It is also a way to make sure we got the proper file name for the real test later on.
38560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38561  if test "x$test_shortpath" = x; then
38562    # Short path failed, file does not exist as specified.
38563    # Try adding .exe or .cmd
38564    if test -f "${new_path}.exe"; then
38565      input_to_shortpath="${new_path}.exe"
38566    elif test -f "${new_path}.cmd"; then
38567      input_to_shortpath="${new_path}.cmd"
38568    else
38569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38570$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38571      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38572$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38573      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38574    fi
38575  else
38576    input_to_shortpath="$new_path"
38577  fi
38578
38579  # Call helper function which possibly converts this using DOS-style short mode.
38580  # If so, the updated path is stored in $new_path.
38581  new_path="$input_to_shortpath"
38582
38583  input_path="$input_to_shortpath"
38584  # Check if we need to convert this using DOS-style short mode. If the path
38585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38586  # take no chances and rewrite it.
38587  # Note: m4 eats our [], so we need to use [ and ] instead.
38588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38589  if test "x$has_forbidden_chars" != x; then
38590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38594      # Going to short mode and back again did indeed matter. Since short mode is
38595      # case insensitive, let's make it lowercase to improve readability.
38596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38597      # Now convert it back to Unix-stile (cygpath)
38598      input_path=`$CYGPATH -u "$shortmode_path"`
38599      new_path="$input_path"
38600    fi
38601  fi
38602
38603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38604  if test "x$test_cygdrive_prefix" = x; then
38605    # As a simple fix, exclude /usr/bin since it's not a real path.
38606    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38608      # a path prefixed by /cygdrive for fixpath to work.
38609      new_path="$CYGWIN_ROOT_PATH$input_path"
38610    fi
38611  fi
38612
38613  # remove trailing .exe if any
38614  new_path="${new_path/%.exe/}"
38615
38616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38617
38618  # First separate the path from the arguments. This will split at the first
38619  # space.
38620  complete="$NM"
38621  path="${complete%% *}"
38622  tmp="$complete EOL"
38623  arguments="${tmp#* }"
38624
38625  # Input might be given as Windows format, start by converting to
38626  # unix format.
38627  new_path="$path"
38628
38629  windows_path="$new_path"
38630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38631    unix_path=`$CYGPATH -u "$windows_path"`
38632    new_path="$unix_path"
38633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38635    new_path="$unix_path"
38636  fi
38637
38638
38639  # Now try to locate executable using which
38640  new_path=`$WHICH "$new_path" 2> /dev/null`
38641
38642  if test "x$new_path" = x; then
38643    # Oops. Which didn't find the executable.
38644    # The splitting of arguments from the executable at a space might have been incorrect,
38645    # since paths with space are more likely in Windows. Give it another try with the whole
38646    # argument.
38647    path="$complete"
38648    arguments="EOL"
38649    new_path="$path"
38650
38651  windows_path="$new_path"
38652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38653    unix_path=`$CYGPATH -u "$windows_path"`
38654    new_path="$unix_path"
38655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38657    new_path="$unix_path"
38658  fi
38659
38660
38661    new_path=`$WHICH "$new_path" 2> /dev/null`
38662
38663    if test "x$new_path" = x; then
38664      # It's still not found. Now this is an unrecoverable error.
38665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38666$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38667      has_space=`$ECHO "$complete" | $GREP " "`
38668      if test "x$has_space" != x; then
38669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38671      fi
38672      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38673    fi
38674  fi
38675
38676  # Now new_path has a complete unix path to the binary
38677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38678    # Keep paths in /bin as-is, but remove trailing .exe if any
38679    new_path="${new_path/%.exe/}"
38680    # Do not save /bin paths to all_fixpath_prefixes!
38681  else
38682    # Not in mixed or Windows style, start by that.
38683    new_path=`cmd //c echo $new_path`
38684
38685  input_path="$new_path"
38686  # Check if we need to convert this using DOS-style short mode. If the path
38687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38688  # take no chances and rewrite it.
38689  # Note: m4 eats our [], so we need to use [ and ] instead.
38690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38691  if test "x$has_forbidden_chars" != x; then
38692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38694  fi
38695
38696    # Output is in $new_path
38697
38698  windows_path="$new_path"
38699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38700    unix_path=`$CYGPATH -u "$windows_path"`
38701    new_path="$unix_path"
38702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38704    new_path="$unix_path"
38705  fi
38706
38707    # remove trailing .exe if any
38708    new_path="${new_path/%.exe/}"
38709
38710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38712  fi
38713
38714  else
38715    # We're on a posix platform. Hooray! :)
38716    # First separate the path from the arguments. This will split at the first
38717    # space.
38718    complete="$NM"
38719    path="${complete%% *}"
38720    tmp="$complete EOL"
38721    arguments="${tmp#* }"
38722
38723    # Cannot rely on the command "which" here since it doesn't always work.
38724    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38725    if test -z "$is_absolute_path"; then
38726      # Path to executable is not absolute. Find it.
38727      IFS_save="$IFS"
38728      IFS=:
38729      for p in $PATH; do
38730        if test -f "$p/$path" && test -x "$p/$path"; then
38731          new_path="$p/$path"
38732          break
38733        fi
38734      done
38735      IFS="$IFS_save"
38736    else
38737      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
38738$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
38739      new_path="$path"
38740    fi
38741
38742    if test "x$new_path" = x; then
38743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38744$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38745      has_space=`$ECHO "$complete" | $GREP " "`
38746      if test "x$has_space" != x; then
38747        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38748$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38749      fi
38750      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38751    fi
38752  fi
38753
38754  # Now join together the path and the arguments once again
38755  if test "x$arguments" != xEOL; then
38756    new_complete="$new_path ${arguments% *}"
38757  else
38758    new_complete="$new_path"
38759  fi
38760
38761  if test "x$complete" != "x$new_complete"; then
38762    NM="$new_complete"
38763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38764$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38765  fi
38766
38767    GNM="$NM"
38768
38769
38770
38771  # Publish this variable in the help.
38772
38773
38774  if test "x$STRIP" = x; then
38775    # The variable is not set by user, try to locate tool using the code snippet
38776    if test -n "$ac_tool_prefix"; then
38777  for ac_prog in strip
38778  do
38779    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38780set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38782$as_echo_n "checking for $ac_word... " >&6; }
38783if ${ac_cv_prog_STRIP+:} false; then :
38784  $as_echo_n "(cached) " >&6
38785else
38786  if test -n "$STRIP"; then
38787  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38788else
38789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38790for as_dir in $PATH
38791do
38792  IFS=$as_save_IFS
38793  test -z "$as_dir" && as_dir=.
38794    for ac_exec_ext in '' $ac_executable_extensions; do
38795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38796    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38798    break 2
38799  fi
38800done
38801  done
38802IFS=$as_save_IFS
38803
38804fi
38805fi
38806STRIP=$ac_cv_prog_STRIP
38807if test -n "$STRIP"; then
38808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38809$as_echo "$STRIP" >&6; }
38810else
38811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38812$as_echo "no" >&6; }
38813fi
38814
38815
38816    test -n "$STRIP" && break
38817  done
38818fi
38819if test -z "$STRIP"; then
38820  ac_ct_STRIP=$STRIP
38821  for ac_prog in strip
38822do
38823  # Extract the first word of "$ac_prog", so it can be a program name with args.
38824set dummy $ac_prog; ac_word=$2
38825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38826$as_echo_n "checking for $ac_word... " >&6; }
38827if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38828  $as_echo_n "(cached) " >&6
38829else
38830  if test -n "$ac_ct_STRIP"; then
38831  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38832else
38833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38834for as_dir in $PATH
38835do
38836  IFS=$as_save_IFS
38837  test -z "$as_dir" && as_dir=.
38838    for ac_exec_ext in '' $ac_executable_extensions; do
38839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38840    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38842    break 2
38843  fi
38844done
38845  done
38846IFS=$as_save_IFS
38847
38848fi
38849fi
38850ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38851if test -n "$ac_ct_STRIP"; then
38852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38853$as_echo "$ac_ct_STRIP" >&6; }
38854else
38855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38856$as_echo "no" >&6; }
38857fi
38858
38859
38860  test -n "$ac_ct_STRIP" && break
38861done
38862
38863  if test "x$ac_ct_STRIP" = x; then
38864    STRIP=""
38865  else
38866    case $cross_compiling:$ac_tool_warned in
38867yes:)
38868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38870ac_tool_warned=yes ;;
38871esac
38872    STRIP=$ac_ct_STRIP
38873  fi
38874fi
38875
38876  else
38877    # The variable is set, but is it from the command line or the environment?
38878
38879    # Try to remove the string !STRIP! from our list.
38880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38882      # If it failed, the variable was not from the command line. Ignore it,
38883      # but warn the user (except for BASH, which is always set by the calling BASH).
38884      if test "xSTRIP" != xBASH; then
38885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38886$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38887      fi
38888      # Try to locate tool using the code snippet
38889      if test -n "$ac_tool_prefix"; then
38890  for ac_prog in strip
38891  do
38892    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38893set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38895$as_echo_n "checking for $ac_word... " >&6; }
38896if ${ac_cv_prog_STRIP+:} false; then :
38897  $as_echo_n "(cached) " >&6
38898else
38899  if test -n "$STRIP"; then
38900  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38901else
38902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38903for as_dir in $PATH
38904do
38905  IFS=$as_save_IFS
38906  test -z "$as_dir" && as_dir=.
38907    for ac_exec_ext in '' $ac_executable_extensions; do
38908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38909    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38911    break 2
38912  fi
38913done
38914  done
38915IFS=$as_save_IFS
38916
38917fi
38918fi
38919STRIP=$ac_cv_prog_STRIP
38920if test -n "$STRIP"; then
38921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38922$as_echo "$STRIP" >&6; }
38923else
38924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38925$as_echo "no" >&6; }
38926fi
38927
38928
38929    test -n "$STRIP" && break
38930  done
38931fi
38932if test -z "$STRIP"; then
38933  ac_ct_STRIP=$STRIP
38934  for ac_prog in strip
38935do
38936  # Extract the first word of "$ac_prog", so it can be a program name with args.
38937set dummy $ac_prog; ac_word=$2
38938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38939$as_echo_n "checking for $ac_word... " >&6; }
38940if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38941  $as_echo_n "(cached) " >&6
38942else
38943  if test -n "$ac_ct_STRIP"; then
38944  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38945else
38946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38947for as_dir in $PATH
38948do
38949  IFS=$as_save_IFS
38950  test -z "$as_dir" && as_dir=.
38951    for ac_exec_ext in '' $ac_executable_extensions; do
38952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38953    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38955    break 2
38956  fi
38957done
38958  done
38959IFS=$as_save_IFS
38960
38961fi
38962fi
38963ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38964if test -n "$ac_ct_STRIP"; then
38965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38966$as_echo "$ac_ct_STRIP" >&6; }
38967else
38968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38969$as_echo "no" >&6; }
38970fi
38971
38972
38973  test -n "$ac_ct_STRIP" && break
38974done
38975
38976  if test "x$ac_ct_STRIP" = x; then
38977    STRIP=""
38978  else
38979    case $cross_compiling:$ac_tool_warned in
38980yes:)
38981{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38982$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38983ac_tool_warned=yes ;;
38984esac
38985    STRIP=$ac_ct_STRIP
38986  fi
38987fi
38988
38989    else
38990      # If it succeeded, then it was overridden by the user. We will use it
38991      # for the tool.
38992
38993      # First remove it from the list of overridden variables, so we can test
38994      # for unknown variables in the end.
38995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38996
38997      # Check if the provided tool contains a complete path.
38998      tool_specified="$STRIP"
38999      tool_basename="${tool_specified##*/}"
39000      if test "x$tool_basename" = "x$tool_specified"; then
39001        # A command without a complete path is provided, search $PATH.
39002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39003$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39004        # Extract the first word of "$tool_basename", so it can be a program name with args.
39005set dummy $tool_basename; ac_word=$2
39006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39007$as_echo_n "checking for $ac_word... " >&6; }
39008if ${ac_cv_path_STRIP+:} false; then :
39009  $as_echo_n "(cached) " >&6
39010else
39011  case $STRIP in
39012  [\\/]* | ?:[\\/]*)
39013  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39014  ;;
39015  *)
39016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39017for as_dir in $PATH
39018do
39019  IFS=$as_save_IFS
39020  test -z "$as_dir" && as_dir=.
39021    for ac_exec_ext in '' $ac_executable_extensions; do
39022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39023    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39025    break 2
39026  fi
39027done
39028  done
39029IFS=$as_save_IFS
39030
39031  ;;
39032esac
39033fi
39034STRIP=$ac_cv_path_STRIP
39035if test -n "$STRIP"; then
39036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39037$as_echo "$STRIP" >&6; }
39038else
39039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39040$as_echo "no" >&6; }
39041fi
39042
39043
39044        if test "x$STRIP" = x; then
39045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39046        fi
39047      else
39048        # Otherwise we believe it is a complete path. Use it as it is.
39049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39050$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39052$as_echo_n "checking for STRIP... " >&6; }
39053        if test ! -x "$tool_specified"; then
39054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39055$as_echo "not found" >&6; }
39056          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39057        fi
39058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39059$as_echo "$tool_specified" >&6; }
39060      fi
39061    fi
39062  fi
39063
39064
39065
39066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39067
39068  # First separate the path from the arguments. This will split at the first
39069  # space.
39070  complete="$STRIP"
39071  path="${complete%% *}"
39072  tmp="$complete EOL"
39073  arguments="${tmp#* }"
39074
39075  # Input might be given as Windows format, start by converting to
39076  # unix format.
39077  new_path=`$CYGPATH -u "$path"`
39078
39079  # Now try to locate executable using which
39080  new_path=`$WHICH "$new_path" 2> /dev/null`
39081  # bat and cmd files are not always considered executable in cygwin causing which
39082  # to not find them
39083  if test "x$new_path" = x \
39084      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39085      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39086    new_path=`$CYGPATH -u "$path"`
39087  fi
39088  if test "x$new_path" = x; then
39089    # Oops. Which didn't find the executable.
39090    # The splitting of arguments from the executable at a space might have been incorrect,
39091    # since paths with space are more likely in Windows. Give it another try with the whole
39092    # argument.
39093    path="$complete"
39094    arguments="EOL"
39095    new_path=`$CYGPATH -u "$path"`
39096    new_path=`$WHICH "$new_path" 2> /dev/null`
39097    # bat and cmd files are not always considered executable in cygwin causing which
39098    # to not find them
39099    if test "x$new_path" = x \
39100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39102      new_path=`$CYGPATH -u "$path"`
39103    fi
39104    if test "x$new_path" = x; then
39105      # It's still not found. Now this is an unrecoverable error.
39106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39107$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39108      has_space=`$ECHO "$complete" | $GREP " "`
39109      if test "x$has_space" != x; then
39110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39112      fi
39113      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39114    fi
39115  fi
39116
39117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39120  # "foo.exe" is OK but "foo" is an error.
39121  #
39122  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39123  # It is also a way to make sure we got the proper file name for the real test later on.
39124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39125  if test "x$test_shortpath" = x; then
39126    # Short path failed, file does not exist as specified.
39127    # Try adding .exe or .cmd
39128    if test -f "${new_path}.exe"; then
39129      input_to_shortpath="${new_path}.exe"
39130    elif test -f "${new_path}.cmd"; then
39131      input_to_shortpath="${new_path}.cmd"
39132    else
39133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39134$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39137      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39138    fi
39139  else
39140    input_to_shortpath="$new_path"
39141  fi
39142
39143  # Call helper function which possibly converts this using DOS-style short mode.
39144  # If so, the updated path is stored in $new_path.
39145  new_path="$input_to_shortpath"
39146
39147  input_path="$input_to_shortpath"
39148  # Check if we need to convert this using DOS-style short mode. If the path
39149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39150  # take no chances and rewrite it.
39151  # Note: m4 eats our [], so we need to use [ and ] instead.
39152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39153  if test "x$has_forbidden_chars" != x; then
39154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39158      # Going to short mode and back again did indeed matter. Since short mode is
39159      # case insensitive, let's make it lowercase to improve readability.
39160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39161      # Now convert it back to Unix-stile (cygpath)
39162      input_path=`$CYGPATH -u "$shortmode_path"`
39163      new_path="$input_path"
39164    fi
39165  fi
39166
39167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39168  if test "x$test_cygdrive_prefix" = x; then
39169    # As a simple fix, exclude /usr/bin since it's not a real path.
39170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39172      # a path prefixed by /cygdrive for fixpath to work.
39173      new_path="$CYGWIN_ROOT_PATH$input_path"
39174    fi
39175  fi
39176
39177  # remove trailing .exe if any
39178  new_path="${new_path/%.exe/}"
39179
39180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39181
39182  # First separate the path from the arguments. This will split at the first
39183  # space.
39184  complete="$STRIP"
39185  path="${complete%% *}"
39186  tmp="$complete EOL"
39187  arguments="${tmp#* }"
39188
39189  # Input might be given as Windows format, start by converting to
39190  # unix format.
39191  new_path="$path"
39192
39193  windows_path="$new_path"
39194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39195    unix_path=`$CYGPATH -u "$windows_path"`
39196    new_path="$unix_path"
39197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39199    new_path="$unix_path"
39200  fi
39201
39202
39203  # Now try to locate executable using which
39204  new_path=`$WHICH "$new_path" 2> /dev/null`
39205
39206  if test "x$new_path" = x; then
39207    # Oops. Which didn't find the executable.
39208    # The splitting of arguments from the executable at a space might have been incorrect,
39209    # since paths with space are more likely in Windows. Give it another try with the whole
39210    # argument.
39211    path="$complete"
39212    arguments="EOL"
39213    new_path="$path"
39214
39215  windows_path="$new_path"
39216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39217    unix_path=`$CYGPATH -u "$windows_path"`
39218    new_path="$unix_path"
39219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39221    new_path="$unix_path"
39222  fi
39223
39224
39225    new_path=`$WHICH "$new_path" 2> /dev/null`
39226
39227    if test "x$new_path" = x; then
39228      # It's still not found. Now this is an unrecoverable error.
39229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39230$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39231      has_space=`$ECHO "$complete" | $GREP " "`
39232      if test "x$has_space" != x; then
39233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39235      fi
39236      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39237    fi
39238  fi
39239
39240  # Now new_path has a complete unix path to the binary
39241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39242    # Keep paths in /bin as-is, but remove trailing .exe if any
39243    new_path="${new_path/%.exe/}"
39244    # Do not save /bin paths to all_fixpath_prefixes!
39245  else
39246    # Not in mixed or Windows style, start by that.
39247    new_path=`cmd //c echo $new_path`
39248
39249  input_path="$new_path"
39250  # Check if we need to convert this using DOS-style short mode. If the path
39251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39252  # take no chances and rewrite it.
39253  # Note: m4 eats our [], so we need to use [ and ] instead.
39254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39255  if test "x$has_forbidden_chars" != x; then
39256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39258  fi
39259
39260    # Output is in $new_path
39261
39262  windows_path="$new_path"
39263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39264    unix_path=`$CYGPATH -u "$windows_path"`
39265    new_path="$unix_path"
39266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39268    new_path="$unix_path"
39269  fi
39270
39271    # remove trailing .exe if any
39272    new_path="${new_path/%.exe/}"
39273
39274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39276  fi
39277
39278  else
39279    # We're on a posix platform. Hooray! :)
39280    # First separate the path from the arguments. This will split at the first
39281    # space.
39282    complete="$STRIP"
39283    path="${complete%% *}"
39284    tmp="$complete EOL"
39285    arguments="${tmp#* }"
39286
39287    # Cannot rely on the command "which" here since it doesn't always work.
39288    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39289    if test -z "$is_absolute_path"; then
39290      # Path to executable is not absolute. Find it.
39291      IFS_save="$IFS"
39292      IFS=:
39293      for p in $PATH; do
39294        if test -f "$p/$path" && test -x "$p/$path"; then
39295          new_path="$p/$path"
39296          break
39297        fi
39298      done
39299      IFS="$IFS_save"
39300    else
39301      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
39302$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
39303      new_path="$path"
39304    fi
39305
39306    if test "x$new_path" = x; then
39307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39308$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39309      has_space=`$ECHO "$complete" | $GREP " "`
39310      if test "x$has_space" != x; then
39311        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39313      fi
39314      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39315    fi
39316  fi
39317
39318  # Now join together the path and the arguments once again
39319  if test "x$arguments" != xEOL; then
39320    new_complete="$new_path ${arguments% *}"
39321  else
39322    new_complete="$new_path"
39323  fi
39324
39325  if test "x$complete" != "x$new_complete"; then
39326    STRIP="$new_complete"
39327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39328$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39329  fi
39330
39331  fi
39332
39333  # objcopy is used for moving debug symbols to separate files when
39334  # full debug symbols are enabled.
39335  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
39336
39337
39338  # Publish this variable in the help.
39339
39340
39341  if test "x$OBJCOPY" = x; then
39342    # The variable is not set by user, try to locate tool using the code snippet
39343    if test -n "$ac_tool_prefix"; then
39344  for ac_prog in gobjcopy objcopy
39345  do
39346    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39347set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39349$as_echo_n "checking for $ac_word... " >&6; }
39350if ${ac_cv_prog_OBJCOPY+:} false; then :
39351  $as_echo_n "(cached) " >&6
39352else
39353  if test -n "$OBJCOPY"; then
39354  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39355else
39356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39357for as_dir in $PATH
39358do
39359  IFS=$as_save_IFS
39360  test -z "$as_dir" && as_dir=.
39361    for ac_exec_ext in '' $ac_executable_extensions; do
39362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39363    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39365    break 2
39366  fi
39367done
39368  done
39369IFS=$as_save_IFS
39370
39371fi
39372fi
39373OBJCOPY=$ac_cv_prog_OBJCOPY
39374if test -n "$OBJCOPY"; then
39375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39376$as_echo "$OBJCOPY" >&6; }
39377else
39378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39379$as_echo "no" >&6; }
39380fi
39381
39382
39383    test -n "$OBJCOPY" && break
39384  done
39385fi
39386if test -z "$OBJCOPY"; then
39387  ac_ct_OBJCOPY=$OBJCOPY
39388  for ac_prog in gobjcopy objcopy
39389do
39390  # Extract the first word of "$ac_prog", so it can be a program name with args.
39391set dummy $ac_prog; ac_word=$2
39392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39393$as_echo_n "checking for $ac_word... " >&6; }
39394if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39395  $as_echo_n "(cached) " >&6
39396else
39397  if test -n "$ac_ct_OBJCOPY"; then
39398  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39399else
39400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39401for as_dir in $PATH
39402do
39403  IFS=$as_save_IFS
39404  test -z "$as_dir" && as_dir=.
39405    for ac_exec_ext in '' $ac_executable_extensions; do
39406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39407    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39409    break 2
39410  fi
39411done
39412  done
39413IFS=$as_save_IFS
39414
39415fi
39416fi
39417ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39418if test -n "$ac_ct_OBJCOPY"; then
39419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39420$as_echo "$ac_ct_OBJCOPY" >&6; }
39421else
39422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39423$as_echo "no" >&6; }
39424fi
39425
39426
39427  test -n "$ac_ct_OBJCOPY" && break
39428done
39429
39430  if test "x$ac_ct_OBJCOPY" = x; then
39431    OBJCOPY=""
39432  else
39433    case $cross_compiling:$ac_tool_warned in
39434yes:)
39435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39437ac_tool_warned=yes ;;
39438esac
39439    OBJCOPY=$ac_ct_OBJCOPY
39440  fi
39441fi
39442
39443  else
39444    # The variable is set, but is it from the command line or the environment?
39445
39446    # Try to remove the string !OBJCOPY! from our list.
39447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
39448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39449      # If it failed, the variable was not from the command line. Ignore it,
39450      # but warn the user (except for BASH, which is always set by the calling BASH).
39451      if test "xOBJCOPY" != xBASH; then
39452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
39453$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
39454      fi
39455      # Try to locate tool using the code snippet
39456      if test -n "$ac_tool_prefix"; then
39457  for ac_prog in gobjcopy objcopy
39458  do
39459    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39460set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39462$as_echo_n "checking for $ac_word... " >&6; }
39463if ${ac_cv_prog_OBJCOPY+:} false; then :
39464  $as_echo_n "(cached) " >&6
39465else
39466  if test -n "$OBJCOPY"; then
39467  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39468else
39469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39470for as_dir in $PATH
39471do
39472  IFS=$as_save_IFS
39473  test -z "$as_dir" && as_dir=.
39474    for ac_exec_ext in '' $ac_executable_extensions; do
39475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39476    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39478    break 2
39479  fi
39480done
39481  done
39482IFS=$as_save_IFS
39483
39484fi
39485fi
39486OBJCOPY=$ac_cv_prog_OBJCOPY
39487if test -n "$OBJCOPY"; then
39488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39489$as_echo "$OBJCOPY" >&6; }
39490else
39491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39492$as_echo "no" >&6; }
39493fi
39494
39495
39496    test -n "$OBJCOPY" && break
39497  done
39498fi
39499if test -z "$OBJCOPY"; then
39500  ac_ct_OBJCOPY=$OBJCOPY
39501  for ac_prog in gobjcopy objcopy
39502do
39503  # Extract the first word of "$ac_prog", so it can be a program name with args.
39504set dummy $ac_prog; ac_word=$2
39505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39506$as_echo_n "checking for $ac_word... " >&6; }
39507if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39508  $as_echo_n "(cached) " >&6
39509else
39510  if test -n "$ac_ct_OBJCOPY"; then
39511  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39512else
39513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39514for as_dir in $PATH
39515do
39516  IFS=$as_save_IFS
39517  test -z "$as_dir" && as_dir=.
39518    for ac_exec_ext in '' $ac_executable_extensions; do
39519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39520    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39522    break 2
39523  fi
39524done
39525  done
39526IFS=$as_save_IFS
39527
39528fi
39529fi
39530ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39531if test -n "$ac_ct_OBJCOPY"; then
39532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39533$as_echo "$ac_ct_OBJCOPY" >&6; }
39534else
39535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39536$as_echo "no" >&6; }
39537fi
39538
39539
39540  test -n "$ac_ct_OBJCOPY" && break
39541done
39542
39543  if test "x$ac_ct_OBJCOPY" = x; then
39544    OBJCOPY=""
39545  else
39546    case $cross_compiling:$ac_tool_warned in
39547yes:)
39548{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39549$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39550ac_tool_warned=yes ;;
39551esac
39552    OBJCOPY=$ac_ct_OBJCOPY
39553  fi
39554fi
39555
39556    else
39557      # If it succeeded, then it was overridden by the user. We will use it
39558      # for the tool.
39559
39560      # First remove it from the list of overridden variables, so we can test
39561      # for unknown variables in the end.
39562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39563
39564      # Check if the provided tool contains a complete path.
39565      tool_specified="$OBJCOPY"
39566      tool_basename="${tool_specified##*/}"
39567      if test "x$tool_basename" = "x$tool_specified"; then
39568        # A command without a complete path is provided, search $PATH.
39569        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39570$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39571        # Extract the first word of "$tool_basename", so it can be a program name with args.
39572set dummy $tool_basename; ac_word=$2
39573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39574$as_echo_n "checking for $ac_word... " >&6; }
39575if ${ac_cv_path_OBJCOPY+:} false; then :
39576  $as_echo_n "(cached) " >&6
39577else
39578  case $OBJCOPY in
39579  [\\/]* | ?:[\\/]*)
39580  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39581  ;;
39582  *)
39583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39584for as_dir in $PATH
39585do
39586  IFS=$as_save_IFS
39587  test -z "$as_dir" && as_dir=.
39588    for ac_exec_ext in '' $ac_executable_extensions; do
39589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39590    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39592    break 2
39593  fi
39594done
39595  done
39596IFS=$as_save_IFS
39597
39598  ;;
39599esac
39600fi
39601OBJCOPY=$ac_cv_path_OBJCOPY
39602if test -n "$OBJCOPY"; then
39603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39604$as_echo "$OBJCOPY" >&6; }
39605else
39606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39607$as_echo "no" >&6; }
39608fi
39609
39610
39611        if test "x$OBJCOPY" = x; then
39612          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39613        fi
39614      else
39615        # Otherwise we believe it is a complete path. Use it as it is.
39616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39617$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39619$as_echo_n "checking for OBJCOPY... " >&6; }
39620        if test ! -x "$tool_specified"; then
39621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39622$as_echo "not found" >&6; }
39623          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39624        fi
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39626$as_echo "$tool_specified" >&6; }
39627      fi
39628    fi
39629  fi
39630
39631
39632    # Only call fixup if objcopy was found.
39633    if test -n "$OBJCOPY"; then
39634
39635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39636
39637  # First separate the path from the arguments. This will split at the first
39638  # space.
39639  complete="$OBJCOPY"
39640  path="${complete%% *}"
39641  tmp="$complete EOL"
39642  arguments="${tmp#* }"
39643
39644  # Input might be given as Windows format, start by converting to
39645  # unix format.
39646  new_path=`$CYGPATH -u "$path"`
39647
39648  # Now try to locate executable using which
39649  new_path=`$WHICH "$new_path" 2> /dev/null`
39650  # bat and cmd files are not always considered executable in cygwin causing which
39651  # to not find them
39652  if test "x$new_path" = x \
39653      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39654      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39655    new_path=`$CYGPATH -u "$path"`
39656  fi
39657  if test "x$new_path" = x; then
39658    # Oops. Which didn't find the executable.
39659    # The splitting of arguments from the executable at a space might have been incorrect,
39660    # since paths with space are more likely in Windows. Give it another try with the whole
39661    # argument.
39662    path="$complete"
39663    arguments="EOL"
39664    new_path=`$CYGPATH -u "$path"`
39665    new_path=`$WHICH "$new_path" 2> /dev/null`
39666    # bat and cmd files are not always considered executable in cygwin causing which
39667    # to not find them
39668    if test "x$new_path" = x \
39669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39671      new_path=`$CYGPATH -u "$path"`
39672    fi
39673    if test "x$new_path" = x; then
39674      # It's still not found. Now this is an unrecoverable error.
39675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39676$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39677      has_space=`$ECHO "$complete" | $GREP " "`
39678      if test "x$has_space" != x; then
39679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39681      fi
39682      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39683    fi
39684  fi
39685
39686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39689  # "foo.exe" is OK but "foo" is an error.
39690  #
39691  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39692  # It is also a way to make sure we got the proper file name for the real test later on.
39693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39694  if test "x$test_shortpath" = x; then
39695    # Short path failed, file does not exist as specified.
39696    # Try adding .exe or .cmd
39697    if test -f "${new_path}.exe"; then
39698      input_to_shortpath="${new_path}.exe"
39699    elif test -f "${new_path}.cmd"; then
39700      input_to_shortpath="${new_path}.cmd"
39701    else
39702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39703$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39706      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39707    fi
39708  else
39709    input_to_shortpath="$new_path"
39710  fi
39711
39712  # Call helper function which possibly converts this using DOS-style short mode.
39713  # If so, the updated path is stored in $new_path.
39714  new_path="$input_to_shortpath"
39715
39716  input_path="$input_to_shortpath"
39717  # Check if we need to convert this using DOS-style short mode. If the path
39718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39719  # take no chances and rewrite it.
39720  # Note: m4 eats our [], so we need to use [ and ] instead.
39721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39722  if test "x$has_forbidden_chars" != x; then
39723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39727      # Going to short mode and back again did indeed matter. Since short mode is
39728      # case insensitive, let's make it lowercase to improve readability.
39729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39730      # Now convert it back to Unix-stile (cygpath)
39731      input_path=`$CYGPATH -u "$shortmode_path"`
39732      new_path="$input_path"
39733    fi
39734  fi
39735
39736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39737  if test "x$test_cygdrive_prefix" = x; then
39738    # As a simple fix, exclude /usr/bin since it's not a real path.
39739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39741      # a path prefixed by /cygdrive for fixpath to work.
39742      new_path="$CYGWIN_ROOT_PATH$input_path"
39743    fi
39744  fi
39745
39746  # remove trailing .exe if any
39747  new_path="${new_path/%.exe/}"
39748
39749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39750
39751  # First separate the path from the arguments. This will split at the first
39752  # space.
39753  complete="$OBJCOPY"
39754  path="${complete%% *}"
39755  tmp="$complete EOL"
39756  arguments="${tmp#* }"
39757
39758  # Input might be given as Windows format, start by converting to
39759  # unix format.
39760  new_path="$path"
39761
39762  windows_path="$new_path"
39763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39764    unix_path=`$CYGPATH -u "$windows_path"`
39765    new_path="$unix_path"
39766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39768    new_path="$unix_path"
39769  fi
39770
39771
39772  # Now try to locate executable using which
39773  new_path=`$WHICH "$new_path" 2> /dev/null`
39774
39775  if test "x$new_path" = x; then
39776    # Oops. Which didn't find the executable.
39777    # The splitting of arguments from the executable at a space might have been incorrect,
39778    # since paths with space are more likely in Windows. Give it another try with the whole
39779    # argument.
39780    path="$complete"
39781    arguments="EOL"
39782    new_path="$path"
39783
39784  windows_path="$new_path"
39785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39786    unix_path=`$CYGPATH -u "$windows_path"`
39787    new_path="$unix_path"
39788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39790    new_path="$unix_path"
39791  fi
39792
39793
39794    new_path=`$WHICH "$new_path" 2> /dev/null`
39795
39796    if test "x$new_path" = x; then
39797      # It's still not found. Now this is an unrecoverable error.
39798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39799$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39800      has_space=`$ECHO "$complete" | $GREP " "`
39801      if test "x$has_space" != x; then
39802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39804      fi
39805      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39806    fi
39807  fi
39808
39809  # Now new_path has a complete unix path to the binary
39810  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39811    # Keep paths in /bin as-is, but remove trailing .exe if any
39812    new_path="${new_path/%.exe/}"
39813    # Do not save /bin paths to all_fixpath_prefixes!
39814  else
39815    # Not in mixed or Windows style, start by that.
39816    new_path=`cmd //c echo $new_path`
39817
39818  input_path="$new_path"
39819  # Check if we need to convert this using DOS-style short mode. If the path
39820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39821  # take no chances and rewrite it.
39822  # Note: m4 eats our [], so we need to use [ and ] instead.
39823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39824  if test "x$has_forbidden_chars" != x; then
39825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39827  fi
39828
39829    # Output is in $new_path
39830
39831  windows_path="$new_path"
39832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39833    unix_path=`$CYGPATH -u "$windows_path"`
39834    new_path="$unix_path"
39835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39837    new_path="$unix_path"
39838  fi
39839
39840    # remove trailing .exe if any
39841    new_path="${new_path/%.exe/}"
39842
39843    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39844    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39845  fi
39846
39847  else
39848    # We're on a posix platform. Hooray! :)
39849    # First separate the path from the arguments. This will split at the first
39850    # space.
39851    complete="$OBJCOPY"
39852    path="${complete%% *}"
39853    tmp="$complete EOL"
39854    arguments="${tmp#* }"
39855
39856    # Cannot rely on the command "which" here since it doesn't always work.
39857    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39858    if test -z "$is_absolute_path"; then
39859      # Path to executable is not absolute. Find it.
39860      IFS_save="$IFS"
39861      IFS=:
39862      for p in $PATH; do
39863        if test -f "$p/$path" && test -x "$p/$path"; then
39864          new_path="$p/$path"
39865          break
39866        fi
39867      done
39868      IFS="$IFS_save"
39869    else
39870      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
39871$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
39872      new_path="$path"
39873    fi
39874
39875    if test "x$new_path" = x; then
39876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39877$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39878      has_space=`$ECHO "$complete" | $GREP " "`
39879      if test "x$has_space" != x; then
39880        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39882      fi
39883      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39884    fi
39885  fi
39886
39887  # Now join together the path and the arguments once again
39888  if test "x$arguments" != xEOL; then
39889    new_complete="$new_path ${arguments% *}"
39890  else
39891    new_complete="$new_path"
39892  fi
39893
39894  if test "x$complete" != "x$new_complete"; then
39895    OBJCOPY="$new_complete"
39896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39897$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39898  fi
39899
39900    fi
39901  fi
39902
39903
39904
39905  # Publish this variable in the help.
39906
39907
39908  if test "x$OBJDUMP" = x; then
39909    # The variable is not set by user, try to locate tool using the code snippet
39910    if test -n "$ac_tool_prefix"; then
39911  for ac_prog in gobjdump objdump
39912  do
39913    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39914set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39916$as_echo_n "checking for $ac_word... " >&6; }
39917if ${ac_cv_prog_OBJDUMP+:} false; then :
39918  $as_echo_n "(cached) " >&6
39919else
39920  if test -n "$OBJDUMP"; then
39921  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39922else
39923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39924for as_dir in $PATH
39925do
39926  IFS=$as_save_IFS
39927  test -z "$as_dir" && as_dir=.
39928    for ac_exec_ext in '' $ac_executable_extensions; do
39929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39930    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39932    break 2
39933  fi
39934done
39935  done
39936IFS=$as_save_IFS
39937
39938fi
39939fi
39940OBJDUMP=$ac_cv_prog_OBJDUMP
39941if test -n "$OBJDUMP"; then
39942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39943$as_echo "$OBJDUMP" >&6; }
39944else
39945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39946$as_echo "no" >&6; }
39947fi
39948
39949
39950    test -n "$OBJDUMP" && break
39951  done
39952fi
39953if test -z "$OBJDUMP"; then
39954  ac_ct_OBJDUMP=$OBJDUMP
39955  for ac_prog in gobjdump objdump
39956do
39957  # Extract the first word of "$ac_prog", so it can be a program name with args.
39958set dummy $ac_prog; ac_word=$2
39959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39960$as_echo_n "checking for $ac_word... " >&6; }
39961if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39962  $as_echo_n "(cached) " >&6
39963else
39964  if test -n "$ac_ct_OBJDUMP"; then
39965  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39966else
39967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39968for as_dir in $PATH
39969do
39970  IFS=$as_save_IFS
39971  test -z "$as_dir" && as_dir=.
39972    for ac_exec_ext in '' $ac_executable_extensions; do
39973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39974    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39976    break 2
39977  fi
39978done
39979  done
39980IFS=$as_save_IFS
39981
39982fi
39983fi
39984ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39985if test -n "$ac_ct_OBJDUMP"; then
39986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39987$as_echo "$ac_ct_OBJDUMP" >&6; }
39988else
39989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39990$as_echo "no" >&6; }
39991fi
39992
39993
39994  test -n "$ac_ct_OBJDUMP" && break
39995done
39996
39997  if test "x$ac_ct_OBJDUMP" = x; then
39998    OBJDUMP=""
39999  else
40000    case $cross_compiling:$ac_tool_warned in
40001yes:)
40002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40004ac_tool_warned=yes ;;
40005esac
40006    OBJDUMP=$ac_ct_OBJDUMP
40007  fi
40008fi
40009
40010  else
40011    # The variable is set, but is it from the command line or the environment?
40012
40013    # Try to remove the string !OBJDUMP! from our list.
40014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
40015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40016      # If it failed, the variable was not from the command line. Ignore it,
40017      # but warn the user (except for BASH, which is always set by the calling BASH).
40018      if test "xOBJDUMP" != xBASH; then
40019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
40020$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
40021      fi
40022      # Try to locate tool using the code snippet
40023      if test -n "$ac_tool_prefix"; then
40024  for ac_prog in gobjdump objdump
40025  do
40026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40029$as_echo_n "checking for $ac_word... " >&6; }
40030if ${ac_cv_prog_OBJDUMP+:} false; then :
40031  $as_echo_n "(cached) " >&6
40032else
40033  if test -n "$OBJDUMP"; then
40034  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
40035else
40036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40037for as_dir in $PATH
40038do
40039  IFS=$as_save_IFS
40040  test -z "$as_dir" && as_dir=.
40041    for ac_exec_ext in '' $ac_executable_extensions; do
40042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40043    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
40044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40045    break 2
40046  fi
40047done
40048  done
40049IFS=$as_save_IFS
40050
40051fi
40052fi
40053OBJDUMP=$ac_cv_prog_OBJDUMP
40054if test -n "$OBJDUMP"; then
40055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40056$as_echo "$OBJDUMP" >&6; }
40057else
40058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40059$as_echo "no" >&6; }
40060fi
40061
40062
40063    test -n "$OBJDUMP" && break
40064  done
40065fi
40066if test -z "$OBJDUMP"; then
40067  ac_ct_OBJDUMP=$OBJDUMP
40068  for ac_prog in gobjdump objdump
40069do
40070  # Extract the first word of "$ac_prog", so it can be a program name with args.
40071set dummy $ac_prog; ac_word=$2
40072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40073$as_echo_n "checking for $ac_word... " >&6; }
40074if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
40075  $as_echo_n "(cached) " >&6
40076else
40077  if test -n "$ac_ct_OBJDUMP"; then
40078  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
40079else
40080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40081for as_dir in $PATH
40082do
40083  IFS=$as_save_IFS
40084  test -z "$as_dir" && as_dir=.
40085    for ac_exec_ext in '' $ac_executable_extensions; do
40086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40087    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
40088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40089    break 2
40090  fi
40091done
40092  done
40093IFS=$as_save_IFS
40094
40095fi
40096fi
40097ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
40098if test -n "$ac_ct_OBJDUMP"; then
40099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
40100$as_echo "$ac_ct_OBJDUMP" >&6; }
40101else
40102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40103$as_echo "no" >&6; }
40104fi
40105
40106
40107  test -n "$ac_ct_OBJDUMP" && break
40108done
40109
40110  if test "x$ac_ct_OBJDUMP" = x; then
40111    OBJDUMP=""
40112  else
40113    case $cross_compiling:$ac_tool_warned in
40114yes:)
40115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40117ac_tool_warned=yes ;;
40118esac
40119    OBJDUMP=$ac_ct_OBJDUMP
40120  fi
40121fi
40122
40123    else
40124      # If it succeeded, then it was overridden by the user. We will use it
40125      # for the tool.
40126
40127      # First remove it from the list of overridden variables, so we can test
40128      # for unknown variables in the end.
40129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40130
40131      # Check if the provided tool contains a complete path.
40132      tool_specified="$OBJDUMP"
40133      tool_basename="${tool_specified##*/}"
40134      if test "x$tool_basename" = "x$tool_specified"; then
40135        # A command without a complete path is provided, search $PATH.
40136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
40137$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
40138        # Extract the first word of "$tool_basename", so it can be a program name with args.
40139set dummy $tool_basename; ac_word=$2
40140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40141$as_echo_n "checking for $ac_word... " >&6; }
40142if ${ac_cv_path_OBJDUMP+:} false; then :
40143  $as_echo_n "(cached) " >&6
40144else
40145  case $OBJDUMP in
40146  [\\/]* | ?:[\\/]*)
40147  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
40148  ;;
40149  *)
40150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40151for as_dir in $PATH
40152do
40153  IFS=$as_save_IFS
40154  test -z "$as_dir" && as_dir=.
40155    for ac_exec_ext in '' $ac_executable_extensions; do
40156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40157    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
40158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40159    break 2
40160  fi
40161done
40162  done
40163IFS=$as_save_IFS
40164
40165  ;;
40166esac
40167fi
40168OBJDUMP=$ac_cv_path_OBJDUMP
40169if test -n "$OBJDUMP"; then
40170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40171$as_echo "$OBJDUMP" >&6; }
40172else
40173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40174$as_echo "no" >&6; }
40175fi
40176
40177
40178        if test "x$OBJDUMP" = x; then
40179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40180        fi
40181      else
40182        # Otherwise we believe it is a complete path. Use it as it is.
40183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
40184$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
40185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
40186$as_echo_n "checking for OBJDUMP... " >&6; }
40187        if test ! -x "$tool_specified"; then
40188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40189$as_echo "not found" >&6; }
40190          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
40191        fi
40192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40193$as_echo "$tool_specified" >&6; }
40194      fi
40195    fi
40196  fi
40197
40198
40199  if test "x$OBJDUMP" != x; then
40200    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
40201
40202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40203
40204  # First separate the path from the arguments. This will split at the first
40205  # space.
40206  complete="$OBJDUMP"
40207  path="${complete%% *}"
40208  tmp="$complete EOL"
40209  arguments="${tmp#* }"
40210
40211  # Input might be given as Windows format, start by converting to
40212  # unix format.
40213  new_path=`$CYGPATH -u "$path"`
40214
40215  # Now try to locate executable using which
40216  new_path=`$WHICH "$new_path" 2> /dev/null`
40217  # bat and cmd files are not always considered executable in cygwin causing which
40218  # to not find them
40219  if test "x$new_path" = x \
40220      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40221      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40222    new_path=`$CYGPATH -u "$path"`
40223  fi
40224  if test "x$new_path" = x; then
40225    # Oops. Which didn't find the executable.
40226    # The splitting of arguments from the executable at a space might have been incorrect,
40227    # since paths with space are more likely in Windows. Give it another try with the whole
40228    # argument.
40229    path="$complete"
40230    arguments="EOL"
40231    new_path=`$CYGPATH -u "$path"`
40232    new_path=`$WHICH "$new_path" 2> /dev/null`
40233    # bat and cmd files are not always considered executable in cygwin causing which
40234    # to not find them
40235    if test "x$new_path" = x \
40236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40238      new_path=`$CYGPATH -u "$path"`
40239    fi
40240    if test "x$new_path" = x; then
40241      # It's still not found. Now this is an unrecoverable error.
40242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40243$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40244      has_space=`$ECHO "$complete" | $GREP " "`
40245      if test "x$has_space" != x; then
40246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40248      fi
40249      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40250    fi
40251  fi
40252
40253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40256  # "foo.exe" is OK but "foo" is an error.
40257  #
40258  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40259  # It is also a way to make sure we got the proper file name for the real test later on.
40260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40261  if test "x$test_shortpath" = x; then
40262    # Short path failed, file does not exist as specified.
40263    # Try adding .exe or .cmd
40264    if test -f "${new_path}.exe"; then
40265      input_to_shortpath="${new_path}.exe"
40266    elif test -f "${new_path}.cmd"; then
40267      input_to_shortpath="${new_path}.cmd"
40268    else
40269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
40270$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
40271      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40272$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40273      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40274    fi
40275  else
40276    input_to_shortpath="$new_path"
40277  fi
40278
40279  # Call helper function which possibly converts this using DOS-style short mode.
40280  # If so, the updated path is stored in $new_path.
40281  new_path="$input_to_shortpath"
40282
40283  input_path="$input_to_shortpath"
40284  # Check if we need to convert this using DOS-style short mode. If the path
40285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40286  # take no chances and rewrite it.
40287  # Note: m4 eats our [], so we need to use [ and ] instead.
40288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40289  if test "x$has_forbidden_chars" != x; then
40290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40291    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40292    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40293    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40294      # Going to short mode and back again did indeed matter. Since short mode is
40295      # case insensitive, let's make it lowercase to improve readability.
40296      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40297      # Now convert it back to Unix-stile (cygpath)
40298      input_path=`$CYGPATH -u "$shortmode_path"`
40299      new_path="$input_path"
40300    fi
40301  fi
40302
40303  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40304  if test "x$test_cygdrive_prefix" = x; then
40305    # As a simple fix, exclude /usr/bin since it's not a real path.
40306    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40307      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40308      # a path prefixed by /cygdrive for fixpath to work.
40309      new_path="$CYGWIN_ROOT_PATH$input_path"
40310    fi
40311  fi
40312
40313  # remove trailing .exe if any
40314  new_path="${new_path/%.exe/}"
40315
40316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40317
40318  # First separate the path from the arguments. This will split at the first
40319  # space.
40320  complete="$OBJDUMP"
40321  path="${complete%% *}"
40322  tmp="$complete EOL"
40323  arguments="${tmp#* }"
40324
40325  # Input might be given as Windows format, start by converting to
40326  # unix format.
40327  new_path="$path"
40328
40329  windows_path="$new_path"
40330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40331    unix_path=`$CYGPATH -u "$windows_path"`
40332    new_path="$unix_path"
40333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40335    new_path="$unix_path"
40336  fi
40337
40338
40339  # Now try to locate executable using which
40340  new_path=`$WHICH "$new_path" 2> /dev/null`
40341
40342  if test "x$new_path" = x; then
40343    # Oops. Which didn't find the executable.
40344    # The splitting of arguments from the executable at a space might have been incorrect,
40345    # since paths with space are more likely in Windows. Give it another try with the whole
40346    # argument.
40347    path="$complete"
40348    arguments="EOL"
40349    new_path="$path"
40350
40351  windows_path="$new_path"
40352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40353    unix_path=`$CYGPATH -u "$windows_path"`
40354    new_path="$unix_path"
40355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40357    new_path="$unix_path"
40358  fi
40359
40360
40361    new_path=`$WHICH "$new_path" 2> /dev/null`
40362
40363    if test "x$new_path" = x; then
40364      # It's still not found. Now this is an unrecoverable error.
40365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40366$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40367      has_space=`$ECHO "$complete" | $GREP " "`
40368      if test "x$has_space" != x; then
40369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40371      fi
40372      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40373    fi
40374  fi
40375
40376  # Now new_path has a complete unix path to the binary
40377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40378    # Keep paths in /bin as-is, but remove trailing .exe if any
40379    new_path="${new_path/%.exe/}"
40380    # Do not save /bin paths to all_fixpath_prefixes!
40381  else
40382    # Not in mixed or Windows style, start by that.
40383    new_path=`cmd //c echo $new_path`
40384
40385  input_path="$new_path"
40386  # Check if we need to convert this using DOS-style short mode. If the path
40387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40388  # take no chances and rewrite it.
40389  # Note: m4 eats our [], so we need to use [ and ] instead.
40390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40391  if test "x$has_forbidden_chars" != x; then
40392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40394  fi
40395
40396    # Output is in $new_path
40397
40398  windows_path="$new_path"
40399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40400    unix_path=`$CYGPATH -u "$windows_path"`
40401    new_path="$unix_path"
40402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40404    new_path="$unix_path"
40405  fi
40406
40407    # remove trailing .exe if any
40408    new_path="${new_path/%.exe/}"
40409
40410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40412  fi
40413
40414  else
40415    # We're on a posix platform. Hooray! :)
40416    # First separate the path from the arguments. This will split at the first
40417    # space.
40418    complete="$OBJDUMP"
40419    path="${complete%% *}"
40420    tmp="$complete EOL"
40421    arguments="${tmp#* }"
40422
40423    # Cannot rely on the command "which" here since it doesn't always work.
40424    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40425    if test -z "$is_absolute_path"; then
40426      # Path to executable is not absolute. Find it.
40427      IFS_save="$IFS"
40428      IFS=:
40429      for p in $PATH; do
40430        if test -f "$p/$path" && test -x "$p/$path"; then
40431          new_path="$p/$path"
40432          break
40433        fi
40434      done
40435      IFS="$IFS_save"
40436    else
40437      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
40438$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
40439      new_path="$path"
40440    fi
40441
40442    if test "x$new_path" = x; then
40443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40444$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40445      has_space=`$ECHO "$complete" | $GREP " "`
40446      if test "x$has_space" != x; then
40447        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40449      fi
40450      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40451    fi
40452  fi
40453
40454  # Now join together the path and the arguments once again
40455  if test "x$arguments" != xEOL; then
40456    new_complete="$new_path ${arguments% *}"
40457  else
40458    new_complete="$new_path"
40459  fi
40460
40461  if test "x$complete" != "x$new_complete"; then
40462    OBJDUMP="$new_complete"
40463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40464$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40465  fi
40466
40467  fi
40468
40469  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
40470
40471
40472  # Publish this variable in the help.
40473
40474
40475  if test "x$LIPO" = x; then
40476    # The variable is not set by user, try to locate tool using the code snippet
40477    for ac_prog in lipo
40478do
40479  # Extract the first word of "$ac_prog", so it can be a program name with args.
40480set dummy $ac_prog; ac_word=$2
40481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40482$as_echo_n "checking for $ac_word... " >&6; }
40483if ${ac_cv_path_LIPO+:} false; then :
40484  $as_echo_n "(cached) " >&6
40485else
40486  case $LIPO in
40487  [\\/]* | ?:[\\/]*)
40488  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40489  ;;
40490  *)
40491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40492for as_dir in $PATH
40493do
40494  IFS=$as_save_IFS
40495  test -z "$as_dir" && as_dir=.
40496    for ac_exec_ext in '' $ac_executable_extensions; do
40497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40498    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40500    break 2
40501  fi
40502done
40503  done
40504IFS=$as_save_IFS
40505
40506  ;;
40507esac
40508fi
40509LIPO=$ac_cv_path_LIPO
40510if test -n "$LIPO"; then
40511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40512$as_echo "$LIPO" >&6; }
40513else
40514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40515$as_echo "no" >&6; }
40516fi
40517
40518
40519  test -n "$LIPO" && break
40520done
40521
40522  else
40523    # The variable is set, but is it from the command line or the environment?
40524
40525    # Try to remove the string !LIPO! from our list.
40526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
40527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40528      # If it failed, the variable was not from the command line. Ignore it,
40529      # but warn the user (except for BASH, which is always set by the calling BASH).
40530      if test "xLIPO" != xBASH; then
40531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
40532$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
40533      fi
40534      # Try to locate tool using the code snippet
40535      for ac_prog in lipo
40536do
40537  # Extract the first word of "$ac_prog", so it can be a program name with args.
40538set dummy $ac_prog; ac_word=$2
40539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40540$as_echo_n "checking for $ac_word... " >&6; }
40541if ${ac_cv_path_LIPO+:} false; then :
40542  $as_echo_n "(cached) " >&6
40543else
40544  case $LIPO in
40545  [\\/]* | ?:[\\/]*)
40546  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40547  ;;
40548  *)
40549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40550for as_dir in $PATH
40551do
40552  IFS=$as_save_IFS
40553  test -z "$as_dir" && as_dir=.
40554    for ac_exec_ext in '' $ac_executable_extensions; do
40555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40556    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40558    break 2
40559  fi
40560done
40561  done
40562IFS=$as_save_IFS
40563
40564  ;;
40565esac
40566fi
40567LIPO=$ac_cv_path_LIPO
40568if test -n "$LIPO"; then
40569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40570$as_echo "$LIPO" >&6; }
40571else
40572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40573$as_echo "no" >&6; }
40574fi
40575
40576
40577  test -n "$LIPO" && break
40578done
40579
40580    else
40581      # If it succeeded, then it was overridden by the user. We will use it
40582      # for the tool.
40583
40584      # First remove it from the list of overridden variables, so we can test
40585      # for unknown variables in the end.
40586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40587
40588      # Check if the provided tool contains a complete path.
40589      tool_specified="$LIPO"
40590      tool_basename="${tool_specified##*/}"
40591      if test "x$tool_basename" = "x$tool_specified"; then
40592        # A command without a complete path is provided, search $PATH.
40593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
40594$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
40595        # Extract the first word of "$tool_basename", so it can be a program name with args.
40596set dummy $tool_basename; ac_word=$2
40597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40598$as_echo_n "checking for $ac_word... " >&6; }
40599if ${ac_cv_path_LIPO+:} false; then :
40600  $as_echo_n "(cached) " >&6
40601else
40602  case $LIPO in
40603  [\\/]* | ?:[\\/]*)
40604  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40605  ;;
40606  *)
40607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40608for as_dir in $PATH
40609do
40610  IFS=$as_save_IFS
40611  test -z "$as_dir" && as_dir=.
40612    for ac_exec_ext in '' $ac_executable_extensions; do
40613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40614    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40616    break 2
40617  fi
40618done
40619  done
40620IFS=$as_save_IFS
40621
40622  ;;
40623esac
40624fi
40625LIPO=$ac_cv_path_LIPO
40626if test -n "$LIPO"; then
40627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40628$as_echo "$LIPO" >&6; }
40629else
40630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40631$as_echo "no" >&6; }
40632fi
40633
40634
40635        if test "x$LIPO" = x; then
40636          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40637        fi
40638      else
40639        # Otherwise we believe it is a complete path. Use it as it is.
40640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
40641$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
40642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
40643$as_echo_n "checking for LIPO... " >&6; }
40644        if test ! -x "$tool_specified"; then
40645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40646$as_echo "not found" >&6; }
40647          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
40648        fi
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40650$as_echo "$tool_specified" >&6; }
40651      fi
40652    fi
40653  fi
40654
40655
40656
40657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40658
40659  # First separate the path from the arguments. This will split at the first
40660  # space.
40661  complete="$LIPO"
40662  path="${complete%% *}"
40663  tmp="$complete EOL"
40664  arguments="${tmp#* }"
40665
40666  # Input might be given as Windows format, start by converting to
40667  # unix format.
40668  new_path=`$CYGPATH -u "$path"`
40669
40670  # Now try to locate executable using which
40671  new_path=`$WHICH "$new_path" 2> /dev/null`
40672  # bat and cmd files are not always considered executable in cygwin causing which
40673  # to not find them
40674  if test "x$new_path" = x \
40675      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40676      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40677    new_path=`$CYGPATH -u "$path"`
40678  fi
40679  if test "x$new_path" = x; then
40680    # Oops. Which didn't find the executable.
40681    # The splitting of arguments from the executable at a space might have been incorrect,
40682    # since paths with space are more likely in Windows. Give it another try with the whole
40683    # argument.
40684    path="$complete"
40685    arguments="EOL"
40686    new_path=`$CYGPATH -u "$path"`
40687    new_path=`$WHICH "$new_path" 2> /dev/null`
40688    # bat and cmd files are not always considered executable in cygwin causing which
40689    # to not find them
40690    if test "x$new_path" = x \
40691        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40692        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40693      new_path=`$CYGPATH -u "$path"`
40694    fi
40695    if test "x$new_path" = x; then
40696      # It's still not found. Now this is an unrecoverable error.
40697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40698$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40699      has_space=`$ECHO "$complete" | $GREP " "`
40700      if test "x$has_space" != x; then
40701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40703      fi
40704      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40705    fi
40706  fi
40707
40708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40711  # "foo.exe" is OK but "foo" is an error.
40712  #
40713  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40714  # It is also a way to make sure we got the proper file name for the real test later on.
40715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40716  if test "x$test_shortpath" = x; then
40717    # Short path failed, file does not exist as specified.
40718    # Try adding .exe or .cmd
40719    if test -f "${new_path}.exe"; then
40720      input_to_shortpath="${new_path}.exe"
40721    elif test -f "${new_path}.cmd"; then
40722      input_to_shortpath="${new_path}.cmd"
40723    else
40724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
40725$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
40726      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40727$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40728      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40729    fi
40730  else
40731    input_to_shortpath="$new_path"
40732  fi
40733
40734  # Call helper function which possibly converts this using DOS-style short mode.
40735  # If so, the updated path is stored in $new_path.
40736  new_path="$input_to_shortpath"
40737
40738  input_path="$input_to_shortpath"
40739  # Check if we need to convert this using DOS-style short mode. If the path
40740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40741  # take no chances and rewrite it.
40742  # Note: m4 eats our [], so we need to use [ and ] instead.
40743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40744  if test "x$has_forbidden_chars" != x; then
40745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40749      # Going to short mode and back again did indeed matter. Since short mode is
40750      # case insensitive, let's make it lowercase to improve readability.
40751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40752      # Now convert it back to Unix-stile (cygpath)
40753      input_path=`$CYGPATH -u "$shortmode_path"`
40754      new_path="$input_path"
40755    fi
40756  fi
40757
40758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40759  if test "x$test_cygdrive_prefix" = x; then
40760    # As a simple fix, exclude /usr/bin since it's not a real path.
40761    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40763      # a path prefixed by /cygdrive for fixpath to work.
40764      new_path="$CYGWIN_ROOT_PATH$input_path"
40765    fi
40766  fi
40767
40768  # remove trailing .exe if any
40769  new_path="${new_path/%.exe/}"
40770
40771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40772
40773  # First separate the path from the arguments. This will split at the first
40774  # space.
40775  complete="$LIPO"
40776  path="${complete%% *}"
40777  tmp="$complete EOL"
40778  arguments="${tmp#* }"
40779
40780  # Input might be given as Windows format, start by converting to
40781  # unix format.
40782  new_path="$path"
40783
40784  windows_path="$new_path"
40785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40786    unix_path=`$CYGPATH -u "$windows_path"`
40787    new_path="$unix_path"
40788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40790    new_path="$unix_path"
40791  fi
40792
40793
40794  # Now try to locate executable using which
40795  new_path=`$WHICH "$new_path" 2> /dev/null`
40796
40797  if test "x$new_path" = x; then
40798    # Oops. Which didn't find the executable.
40799    # The splitting of arguments from the executable at a space might have been incorrect,
40800    # since paths with space are more likely in Windows. Give it another try with the whole
40801    # argument.
40802    path="$complete"
40803    arguments="EOL"
40804    new_path="$path"
40805
40806  windows_path="$new_path"
40807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40808    unix_path=`$CYGPATH -u "$windows_path"`
40809    new_path="$unix_path"
40810  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40811    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40812    new_path="$unix_path"
40813  fi
40814
40815
40816    new_path=`$WHICH "$new_path" 2> /dev/null`
40817
40818    if test "x$new_path" = x; then
40819      # It's still not found. Now this is an unrecoverable error.
40820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40821$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40822      has_space=`$ECHO "$complete" | $GREP " "`
40823      if test "x$has_space" != x; then
40824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40826      fi
40827      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40828    fi
40829  fi
40830
40831  # Now new_path has a complete unix path to the binary
40832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40833    # Keep paths in /bin as-is, but remove trailing .exe if any
40834    new_path="${new_path/%.exe/}"
40835    # Do not save /bin paths to all_fixpath_prefixes!
40836  else
40837    # Not in mixed or Windows style, start by that.
40838    new_path=`cmd //c echo $new_path`
40839
40840  input_path="$new_path"
40841  # Check if we need to convert this using DOS-style short mode. If the path
40842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40843  # take no chances and rewrite it.
40844  # Note: m4 eats our [], so we need to use [ and ] instead.
40845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40846  if test "x$has_forbidden_chars" != x; then
40847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40849  fi
40850
40851    # Output is in $new_path
40852
40853  windows_path="$new_path"
40854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40855    unix_path=`$CYGPATH -u "$windows_path"`
40856    new_path="$unix_path"
40857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40859    new_path="$unix_path"
40860  fi
40861
40862    # remove trailing .exe if any
40863    new_path="${new_path/%.exe/}"
40864
40865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40867  fi
40868
40869  else
40870    # We're on a posix platform. Hooray! :)
40871    # First separate the path from the arguments. This will split at the first
40872    # space.
40873    complete="$LIPO"
40874    path="${complete%% *}"
40875    tmp="$complete EOL"
40876    arguments="${tmp#* }"
40877
40878    # Cannot rely on the command "which" here since it doesn't always work.
40879    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40880    if test -z "$is_absolute_path"; then
40881      # Path to executable is not absolute. Find it.
40882      IFS_save="$IFS"
40883      IFS=:
40884      for p in $PATH; do
40885        if test -f "$p/$path" && test -x "$p/$path"; then
40886          new_path="$p/$path"
40887          break
40888        fi
40889      done
40890      IFS="$IFS_save"
40891    else
40892      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
40893$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
40894      new_path="$path"
40895    fi
40896
40897    if test "x$new_path" = x; then
40898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40899$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40900      has_space=`$ECHO "$complete" | $GREP " "`
40901      if test "x$has_space" != x; then
40902        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40903$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40904      fi
40905      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40906    fi
40907  fi
40908
40909  # Now join together the path and the arguments once again
40910  if test "x$arguments" != xEOL; then
40911    new_complete="$new_path ${arguments% *}"
40912  else
40913    new_complete="$new_path"
40914  fi
40915
40916  if test "x$complete" != "x$new_complete"; then
40917    LIPO="$new_complete"
40918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
40919$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
40920  fi
40921
40922  fi
40923
40924
40925
40926  # Restore old path without tools dir
40927  PATH="$OLD_PATH"
40928
40929
40930# FIXME: Currently we must test this after paths but before flags. Fix!
40931
40932# And we can test some aspects on the target using configure macros.
40933
40934
40935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40936$as_echo_n "checking for ANSI C header files... " >&6; }
40937if ${ac_cv_header_stdc+:} false; then :
40938  $as_echo_n "(cached) " >&6
40939else
40940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40941/* end confdefs.h.  */
40942#include <stdlib.h>
40943#include <stdarg.h>
40944#include <string.h>
40945#include <float.h>
40946
40947int
40948main ()
40949{
40950
40951  ;
40952  return 0;
40953}
40954_ACEOF
40955if ac_fn_cxx_try_compile "$LINENO"; then :
40956  ac_cv_header_stdc=yes
40957else
40958  ac_cv_header_stdc=no
40959fi
40960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40961
40962if test $ac_cv_header_stdc = yes; then
40963  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40965/* end confdefs.h.  */
40966#include <string.h>
40967
40968_ACEOF
40969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40970  $EGREP "memchr" >/dev/null 2>&1; then :
40971
40972else
40973  ac_cv_header_stdc=no
40974fi
40975rm -f conftest*
40976
40977fi
40978
40979if test $ac_cv_header_stdc = yes; then
40980  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40982/* end confdefs.h.  */
40983#include <stdlib.h>
40984
40985_ACEOF
40986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40987  $EGREP "free" >/dev/null 2>&1; then :
40988
40989else
40990  ac_cv_header_stdc=no
40991fi
40992rm -f conftest*
40993
40994fi
40995
40996if test $ac_cv_header_stdc = yes; then
40997  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40998  if test "$cross_compiling" = yes; then :
40999  :
41000else
41001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41002/* end confdefs.h.  */
41003#include <ctype.h>
41004#include <stdlib.h>
41005#if ((' ' & 0x0FF) == 0x020)
41006# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41007# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41008#else
41009# define ISLOWER(c) \
41010		   (('a' <= (c) && (c) <= 'i') \
41011		     || ('j' <= (c) && (c) <= 'r') \
41012		     || ('s' <= (c) && (c) <= 'z'))
41013# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41014#endif
41015
41016#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41017int
41018main ()
41019{
41020  int i;
41021  for (i = 0; i < 256; i++)
41022    if (XOR (islower (i), ISLOWER (i))
41023	|| toupper (i) != TOUPPER (i))
41024      return 2;
41025  return 0;
41026}
41027_ACEOF
41028if ac_fn_cxx_try_run "$LINENO"; then :
41029
41030else
41031  ac_cv_header_stdc=no
41032fi
41033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41034  conftest.$ac_objext conftest.beam conftest.$ac_ext
41035fi
41036
41037fi
41038fi
41039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41040$as_echo "$ac_cv_header_stdc" >&6; }
41041if test $ac_cv_header_stdc = yes; then
41042
41043$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41044
41045fi
41046
41047# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41048for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41049		  inttypes.h stdint.h unistd.h
41050do :
41051  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41052ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41053"
41054if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41055  cat >>confdefs.h <<_ACEOF
41056#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41057_ACEOF
41058
41059fi
41060
41061done
41062
41063
41064
41065  ###############################################################################
41066  #
41067  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41068  # (The JVM can use 32 or 64 bit Java pointers but that decision
41069  # is made at runtime.)
41070  #
41071
41072  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41073    # Always specify -m flag on Solaris
41074    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41075
41076  # When we add flags to the "official" CFLAGS etc, we need to
41077  # keep track of these additions in ADDED_CFLAGS etc. These
41078  # will later be checked to make sure only controlled additions
41079  # have been made to CFLAGS etc.
41080  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41081  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41082  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41083
41084  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41085  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41086  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41087
41088  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41089  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41090  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41091
41092  elif test "x$COMPILE_TYPE" = xreduced; then
41093    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41094      # Specify -m if running reduced on other Posix platforms
41095
41096  # When we add flags to the "official" CFLAGS etc, we need to
41097  # keep track of these additions in ADDED_CFLAGS etc. These
41098  # will later be checked to make sure only controlled additions
41099  # have been made to CFLAGS etc.
41100  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41101  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41102  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41103
41104  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41105  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41106  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41107
41108  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41109  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41110  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41111
41112    fi
41113  fi
41114
41115  # Make compilation sanity check
41116  for ac_header in stdio.h
41117do :
41118  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41119if test "x$ac_cv_header_stdio_h" = xyes; then :
41120  cat >>confdefs.h <<_ACEOF
41121#define HAVE_STDIO_H 1
41122_ACEOF
41123
41124else
41125
41126    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41127$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41128    if test "x$COMPILE_TYPE" = xreduced; then
41129      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41130$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41131    elif test "x$COMPILE_TYPE" = xcross; then
41132      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41133$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41134    fi
41135    as_fn_error $? "Cannot continue." "$LINENO" 5
41136
41137fi
41138
41139done
41140
41141
41142  # The cast to long int works around a bug in the HP C Compiler
41143# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41144# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41145# This bug is HP SR number 8606223364.
41146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41147$as_echo_n "checking size of int *... " >&6; }
41148if ${ac_cv_sizeof_int_p+:} false; then :
41149  $as_echo_n "(cached) " >&6
41150else
41151  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41152
41153else
41154  if test "$ac_cv_type_int_p" = yes; then
41155     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41156$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41157as_fn_error 77 "cannot compute sizeof (int *)
41158See \`config.log' for more details" "$LINENO" 5; }
41159   else
41160     ac_cv_sizeof_int_p=0
41161   fi
41162fi
41163
41164fi
41165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41166$as_echo "$ac_cv_sizeof_int_p" >&6; }
41167
41168
41169
41170cat >>confdefs.h <<_ACEOF
41171#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41172_ACEOF
41173
41174
41175
41176  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41177  if test "x$ac_cv_sizeof_int_p" = x; then
41178    # The test failed, lets stick to the assumed value.
41179    { $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
41180$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41181  else
41182    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41183
41184    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41185      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41186      # Let's try to implicitely set the compilers target architecture and retry the test
41187      { $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
41188$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;}
41189      { $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
41190$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;}
41191
41192  # When we add flags to the "official" CFLAGS etc, we need to
41193  # keep track of these additions in ADDED_CFLAGS etc. These
41194  # will later be checked to make sure only controlled additions
41195  # have been made to CFLAGS etc.
41196  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41197  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41198  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41199
41200  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41201  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41202  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41203
41204  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41205  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41206  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41207
41208
41209      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41210      unset ac_cv_sizeof_int_p
41211      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41212      cat >>confdefs.h <<_ACEOF
41213#undef SIZEOF_INT_P
41214_ACEOF
41215
41216      # The cast to long int works around a bug in the HP C Compiler
41217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41219# This bug is HP SR number 8606223364.
41220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41221$as_echo_n "checking size of int *... " >&6; }
41222if ${ac_cv_sizeof_int_p+:} false; then :
41223  $as_echo_n "(cached) " >&6
41224else
41225  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41226
41227else
41228  if test "$ac_cv_type_int_p" = yes; then
41229     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41231as_fn_error 77 "cannot compute sizeof (int *)
41232See \`config.log' for more details" "$LINENO" 5; }
41233   else
41234     ac_cv_sizeof_int_p=0
41235   fi
41236fi
41237
41238fi
41239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41240$as_echo "$ac_cv_sizeof_int_p" >&6; }
41241
41242
41243
41244cat >>confdefs.h <<_ACEOF
41245#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41246_ACEOF
41247
41248
41249
41250      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41251
41252      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41253        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
41254      fi
41255    fi
41256  fi
41257
41258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41259$as_echo_n "checking for target address size... " >&6; }
41260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41261$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41262
41263
41264  ###############################################################################
41265  #
41266  # Is the target little of big endian?
41267  #
41268   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41269$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41270if ${ac_cv_c_bigendian+:} false; then :
41271  $as_echo_n "(cached) " >&6
41272else
41273  ac_cv_c_bigendian=unknown
41274    # See if we're dealing with a universal compiler.
41275    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41276/* end confdefs.h.  */
41277#ifndef __APPLE_CC__
41278	       not a universal capable compiler
41279	     #endif
41280	     typedef int dummy;
41281
41282_ACEOF
41283if ac_fn_cxx_try_compile "$LINENO"; then :
41284
41285	# Check for potential -arch flags.  It is not universal unless
41286	# there are at least two -arch flags with different values.
41287	ac_arch=
41288	ac_prev=
41289	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41290	 if test -n "$ac_prev"; then
41291	   case $ac_word in
41292	     i?86 | x86_64 | ppc | ppc64)
41293	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41294		 ac_arch=$ac_word
41295	       else
41296		 ac_cv_c_bigendian=universal
41297		 break
41298	       fi
41299	       ;;
41300	   esac
41301	   ac_prev=
41302	 elif test "x$ac_word" = "x-arch"; then
41303	   ac_prev=arch
41304	 fi
41305       done
41306fi
41307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41308    if test $ac_cv_c_bigendian = unknown; then
41309      # See if sys/param.h defines the BYTE_ORDER macro.
41310      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41311/* end confdefs.h.  */
41312#include <sys/types.h>
41313	     #include <sys/param.h>
41314
41315int
41316main ()
41317{
41318#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41319		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41320		     && LITTLE_ENDIAN)
41321	      bogus endian macros
41322	     #endif
41323
41324  ;
41325  return 0;
41326}
41327_ACEOF
41328if ac_fn_cxx_try_compile "$LINENO"; then :
41329  # It does; now see whether it defined to BIG_ENDIAN or not.
41330	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41331/* end confdefs.h.  */
41332#include <sys/types.h>
41333		#include <sys/param.h>
41334
41335int
41336main ()
41337{
41338#if BYTE_ORDER != BIG_ENDIAN
41339		 not big endian
41340		#endif
41341
41342  ;
41343  return 0;
41344}
41345_ACEOF
41346if ac_fn_cxx_try_compile "$LINENO"; then :
41347  ac_cv_c_bigendian=yes
41348else
41349  ac_cv_c_bigendian=no
41350fi
41351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41352fi
41353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41354    fi
41355    if test $ac_cv_c_bigendian = unknown; then
41356      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41357      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41358/* end confdefs.h.  */
41359#include <limits.h>
41360
41361int
41362main ()
41363{
41364#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41365	      bogus endian macros
41366	     #endif
41367
41368  ;
41369  return 0;
41370}
41371_ACEOF
41372if ac_fn_cxx_try_compile "$LINENO"; then :
41373  # It does; now see whether it defined to _BIG_ENDIAN or not.
41374	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41375/* end confdefs.h.  */
41376#include <limits.h>
41377
41378int
41379main ()
41380{
41381#ifndef _BIG_ENDIAN
41382		 not big endian
41383		#endif
41384
41385  ;
41386  return 0;
41387}
41388_ACEOF
41389if ac_fn_cxx_try_compile "$LINENO"; then :
41390  ac_cv_c_bigendian=yes
41391else
41392  ac_cv_c_bigendian=no
41393fi
41394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41395fi
41396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41397    fi
41398    if test $ac_cv_c_bigendian = unknown; then
41399      # Compile a test program.
41400      if test "$cross_compiling" = yes; then :
41401  # Try to guess by grepping values from an object file.
41402	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41403/* end confdefs.h.  */
41404short int ascii_mm[] =
41405		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41406		short int ascii_ii[] =
41407		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41408		int use_ascii (int i) {
41409		  return ascii_mm[i] + ascii_ii[i];
41410		}
41411		short int ebcdic_ii[] =
41412		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41413		short int ebcdic_mm[] =
41414		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41415		int use_ebcdic (int i) {
41416		  return ebcdic_mm[i] + ebcdic_ii[i];
41417		}
41418		extern int foo;
41419
41420int
41421main ()
41422{
41423return use_ascii (foo) == use_ebcdic (foo);
41424  ;
41425  return 0;
41426}
41427_ACEOF
41428if ac_fn_cxx_try_compile "$LINENO"; then :
41429  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41430	      ac_cv_c_bigendian=yes
41431	    fi
41432	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41433	      if test "$ac_cv_c_bigendian" = unknown; then
41434		ac_cv_c_bigendian=no
41435	      else
41436		# finding both strings is unlikely to happen, but who knows?
41437		ac_cv_c_bigendian=unknown
41438	      fi
41439	    fi
41440fi
41441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41442else
41443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41444/* end confdefs.h.  */
41445$ac_includes_default
41446int
41447main ()
41448{
41449
41450	     /* Are we little or big endian?  From Harbison&Steele.  */
41451	     union
41452	     {
41453	       long int l;
41454	       char c[sizeof (long int)];
41455	     } u;
41456	     u.l = 1;
41457	     return u.c[sizeof (long int) - 1] == 1;
41458
41459  ;
41460  return 0;
41461}
41462_ACEOF
41463if ac_fn_cxx_try_run "$LINENO"; then :
41464  ac_cv_c_bigendian=no
41465else
41466  ac_cv_c_bigendian=yes
41467fi
41468rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41469  conftest.$ac_objext conftest.beam conftest.$ac_ext
41470fi
41471
41472    fi
41473fi
41474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41475$as_echo "$ac_cv_c_bigendian" >&6; }
41476 case $ac_cv_c_bigendian in #(
41477   yes)
41478     ENDIAN="big";; #(
41479   no)
41480     ENDIAN="little" ;; #(
41481   universal)
41482     ENDIAN="universal_endianness"
41483     ;; #(
41484   *)
41485     ENDIAN="unknown" ;;
41486 esac
41487
41488
41489  if test "x$ENDIAN" = xuniversal_endianness; then
41490    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41491  fi
41492  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41493    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
41494  fi
41495
41496
41497# Configure flags for the tools
41498
41499
41500  ###############################################################################
41501  #
41502  # How to compile shared libraries.
41503  #
41504
41505  if test "x$GCC" = xyes; then
41506    COMPILER_NAME=gcc
41507    PICFLAG="-fPIC"
41508    LIBRARY_PREFIX=lib
41509    SHARED_LIBRARY='lib$1.so'
41510    STATIC_LIBRARY='lib$1.a'
41511    SHARED_LIBRARY_FLAGS="-shared"
41512    SHARED_LIBRARY_SUFFIX='.so'
41513    STATIC_LIBRARY_SUFFIX='.a'
41514    OBJ_SUFFIX='.o'
41515    EXE_SUFFIX=''
41516    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41517    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41518    C_FLAG_REORDER=''
41519    CXX_FLAG_REORDER=''
41520    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41521    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41522    LD="$CC"
41523    LDEXE="$CC"
41524    LDCXX="$CXX"
41525    LDEXECXX="$CXX"
41526    POST_STRIP_CMD="$STRIP -g"
41527
41528    # Linking is different on MacOSX
41529    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41530      # Might change in the future to clang.
41531      COMPILER_NAME=gcc
41532      SHARED_LIBRARY='lib$1.dylib'
41533      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41534      SHARED_LIBRARY_SUFFIX='.dylib'
41535      EXE_SUFFIX=''
41536      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41537      SET_SHARED_LIBRARY_MAPFILE=''
41538      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41539      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41540      POST_STRIP_CMD="$STRIP -S"
41541    fi
41542  else
41543    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41544      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
41545      COMPILER_NAME=ossc
41546      PICFLAG="-KPIC"
41547      LIBRARY_PREFIX=lib
41548      SHARED_LIBRARY='lib$1.so'
41549      STATIC_LIBRARY='lib$1.a'
41550      SHARED_LIBRARY_FLAGS="-G"
41551      SHARED_LIBRARY_SUFFIX='.so'
41552      STATIC_LIBRARY_SUFFIX='.a'
41553      OBJ_SUFFIX='.o'
41554      EXE_SUFFIX=''
41555      SET_SHARED_LIBRARY_NAME=''
41556      SET_SHARED_LIBRARY_MAPFILE='-M$1'
41557      C_FLAG_REORDER='-xF'
41558      CXX_FLAG_REORDER='-xF'
41559      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
41560      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41561      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41562      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41563      CFLAGS_JDKLIB_EXTRA='-xstrconst'
41564      POST_STRIP_CMD="$STRIP -x"
41565      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41566    fi
41567    if test "x$OPENJDK_TARGET_OS" = xaix; then
41568        COMPILER_NAME=xlc
41569        PICFLAG="-qpic=large"
41570        LIBRARY_PREFIX=lib
41571        SHARED_LIBRARY='lib$1.so'
41572        STATIC_LIBRARY='lib$1.a'
41573        SHARED_LIBRARY_FLAGS="-qmkshrobj"
41574        SHARED_LIBRARY_SUFFIX='.so'
41575        STATIC_LIBRARY_SUFFIX='.a'
41576        OBJ_SUFFIX='.o'
41577        EXE_SUFFIX=''
41578        SET_SHARED_LIBRARY_NAME=''
41579        SET_SHARED_LIBRARY_MAPFILE=''
41580        C_FLAG_REORDER=''
41581        CXX_FLAG_REORDER=''
41582        SET_SHARED_LIBRARY_ORIGIN=''
41583        SET_EXECUTABLE_ORIGIN=""
41584        CFLAGS_JDK=""
41585        CXXFLAGS_JDK=""
41586        CFLAGS_JDKLIB_EXTRA=''
41587        POST_STRIP_CMD="$STRIP -X32_64"
41588        POST_MCS_CMD=""
41589    fi
41590    if test "x$OPENJDK_TARGET_OS" = xwindows; then
41591      # If it is not gcc, then assume it is the MS Visual Studio compiler
41592      COMPILER_NAME=cl
41593      PICFLAG=""
41594      LIBRARY_PREFIX=
41595      SHARED_LIBRARY='$1.dll'
41596      STATIC_LIBRARY='$1.lib'
41597      SHARED_LIBRARY_FLAGS="-LD"
41598      SHARED_LIBRARY_SUFFIX='.dll'
41599      STATIC_LIBRARY_SUFFIX='.lib'
41600      OBJ_SUFFIX='.obj'
41601      EXE_SUFFIX='.exe'
41602      SET_SHARED_LIBRARY_NAME=''
41603      SET_SHARED_LIBRARY_MAPFILE=''
41604      SET_SHARED_LIBRARY_ORIGIN=''
41605      SET_EXECUTABLE_ORIGIN=''
41606    fi
41607  fi
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627  # The (cross) compiler is now configured, we can now test capabilities
41628  # of the target platform.
41629
41630
41631
41632  ###############################################################################
41633  #
41634  # Setup the opt flags for different compilers
41635  # and different operating systems.
41636  #
41637
41638  #
41639  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
41640  #
41641  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
41642    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
41643    # While waiting for a better solution, the current workaround is to use -mstackrealign.
41644    CFLAGS="$CFLAGS -mstackrealign"
41645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
41646$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
41647    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41648/* end confdefs.h.  */
41649int main() { return 0; }
41650_ACEOF
41651if ac_fn_cxx_try_link "$LINENO"; then :
41652
41653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41654$as_echo "yes" >&6; }
41655
41656else
41657
41658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41659$as_echo "no" >&6; }
41660          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
41661
41662
41663fi
41664rm -f core conftest.err conftest.$ac_objext \
41665    conftest$ac_exeext conftest.$ac_ext
41666  fi
41667
41668  C_FLAG_DEPS="-MMD -MF"
41669  CXX_FLAG_DEPS="-MMD -MF"
41670
41671  case $COMPILER_TYPE in
41672    CC )
41673      case $COMPILER_NAME in
41674        gcc )
41675          case $OPENJDK_TARGET_OS in
41676            macosx )
41677              # On MacOSX we optimize for size, something
41678              # we should do for all platforms?
41679              C_O_FLAG_HI="-Os"
41680              C_O_FLAG_NORM="-Os"
41681              C_O_FLAG_NONE=""
41682              ;;
41683            *)
41684              C_O_FLAG_HI="-O3"
41685              C_O_FLAG_NORM="-O2"
41686              C_O_FLAG_NONE="-O0"
41687              ;;
41688          esac
41689          CXX_O_FLAG_HI="$C_O_FLAG_HI"
41690          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41691          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41692          CFLAGS_DEBUG_SYMBOLS="-g"
41693          CXXFLAGS_DEBUG_SYMBOLS="-g"
41694          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41695            CFLAGS_DEBUG_SYMBOLS="-g1"
41696            CXXFLAGS_DEBUG_SYMBOLS="-g1"
41697          fi
41698          ;;
41699        ossc )
41700          #
41701          # Forte has different names for this with their C++ compiler...
41702          #
41703          C_FLAG_DEPS="-xMMD -xMF"
41704          CXX_FLAG_DEPS="-xMMD -xMF"
41705
41706          # Extra options used with HIGHEST
41707          #
41708          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
41709          #          done with care, there are some assumptions below that need to
41710          #          be understood about the use of pointers, and IEEE behavior.
41711          #
41712          # Use non-standard floating point mode (not IEEE 754)
41713          CC_HIGHEST="$CC_HIGHEST -fns"
41714          # Do some simplification of floating point arithmetic (not IEEE 754)
41715          CC_HIGHEST="$CC_HIGHEST -fsimple"
41716          # Use single precision floating point with 'float'
41717          CC_HIGHEST="$CC_HIGHEST -fsingle"
41718          # Assume memory references via basic pointer types do not alias
41719          #   (Source with excessing pointer casting and data access with mixed
41720          #    pointer types are not recommended)
41721          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
41722          # Use intrinsic or inline versions for math/std functions
41723          #   (If you expect perfect errno behavior, do not use this)
41724          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
41725          # Loop data dependency optimizations (need -xO3 or higher)
41726          CC_HIGHEST="$CC_HIGHEST -xdepend"
41727          # Pointer parameters to functions do not overlap
41728          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
41729          #    If you pass in multiple pointers to the same data, do not use this)
41730          CC_HIGHEST="$CC_HIGHEST -xrestrict"
41731          # Inline some library routines
41732          #   (If you expect perfect errno behavior, do not use this)
41733          CC_HIGHEST="$CC_HIGHEST -xlibmil"
41734          # Use optimized math routines
41735          #   (If you expect perfect errno behavior, do not use this)
41736          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
41737          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
41738
41739          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
41740            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
41741            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
41742          fi
41743
41744          case $OPENJDK_TARGET_CPU_ARCH in
41745            x86)
41746              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41747              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41748              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41749              C_O_FLAG_NONE="-xregs=no%frameptr"
41750              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41751              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41752              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41753              CXX_O_FLAG_NONE="-xregs=no%frameptr"
41754              if test "x$OPENJDK_TARGET_CPU" = xx86; then
41755                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41756                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41757              fi
41758              ;;
41759            sparc)
41760              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41761              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41762              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41763              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41764              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41765              C_O_FLAG_NONE=""
41766              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41767              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41768              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41769              CXX_O_FLAG_NONE=""
41770              ;;
41771          esac
41772
41773          CFLAGS_DEBUG_SYMBOLS="-g -xs"
41774          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41775          ;;
41776        xlc )
41777          C_FLAG_DEPS="-qmakedep=gcc -MF"
41778          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
41779          C_O_FLAG_HIGHEST="-O3"
41780          C_O_FLAG_HI="-O3 -qstrict"
41781          C_O_FLAG_NORM="-O2"
41782          C_O_FLAG_NONE=""
41783          CXX_O_FLAG_HIGHEST="-O3"
41784          CXX_O_FLAG_HI="-O3 -qstrict"
41785          CXX_O_FLAG_NORM="-O2"
41786          CXX_O_FLAG_NONE=""
41787          CFLAGS_DEBUG_SYMBOLS="-g"
41788          CXXFLAGS_DEBUG_SYMBOLS="-g"
41789          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41790          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41791          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41792          ;;
41793      esac
41794      ;;
41795    CL )
41796      C_O_FLAG_HIGHEST="-O2"
41797      C_O_FLAG_HI="-O1"
41798      C_O_FLAG_NORM="-O1"
41799      C_O_FLAG_NONE="-Od"
41800      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41801      CXX_O_FLAG_HI="$C_O_FLAG_HI"
41802      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41803      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41804      ;;
41805  esac
41806
41807  if test -z "$C_O_FLAG_HIGHEST"; then
41808    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
41809  fi
41810
41811  if test -z "$CXX_O_FLAG_HIGHEST"; then
41812    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
41813  fi
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41829    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41830$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41831  fi
41832
41833  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41834    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41835$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41836  fi
41837
41838  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41839    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41840$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41841  fi
41842
41843
41844# Check whether --with-extra-cflags was given.
41845if test "${with_extra_cflags+set}" = set; then :
41846  withval=$with_extra_cflags;
41847fi
41848
41849
41850
41851# Check whether --with-extra-cxxflags was given.
41852if test "${with_extra_cxxflags+set}" = set; then :
41853  withval=$with_extra_cxxflags;
41854fi
41855
41856
41857
41858# Check whether --with-extra-ldflags was given.
41859if test "${with_extra_ldflags+set}" = set; then :
41860  withval=$with_extra_ldflags;
41861fi
41862
41863
41864  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41865  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41866  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41867
41868  # Hotspot needs these set in their legacy form
41869  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41870  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41871  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41872
41873
41874
41875
41876
41877  ###############################################################################
41878  #
41879  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41880  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41881  #
41882  case $COMPILER_NAME in
41883    gcc )
41884      # these options are used for both C and C++ compiles
41885      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41886      -pipe \
41887      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41888      case $OPENJDK_TARGET_CPU_ARCH in
41889        arm )
41890          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41891          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41892          ;;
41893        ppc )
41894          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41895          ;;
41896        * )
41897          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41898          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41899          ;;
41900      esac
41901      ;;
41902    ossc )
41903      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41904      case $OPENJDK_TARGET_CPU_ARCH in
41905        x86 )
41906          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41907          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41908          ;;
41909      esac
41910
41911      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41912      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41913
41914      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41915      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41916      ;;
41917    xlc )
41918      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41919      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41920
41921      LDFLAGS_JDK="$LDFLAGS_JDK"
41922      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
41923      ;;
41924    cl )
41925      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41926      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41927      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41928      -DWIN32 -DIAL"
41929      case $OPENJDK_TARGET_CPU in
41930        x86 )
41931          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41932          ;;
41933        x86_64 )
41934          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41935          ;;
41936      esac
41937      ;;
41938  esac
41939
41940  ###############################################################################
41941
41942  # Adjust flags according to debug level.
41943  case $DEBUG_LEVEL in
41944    fastdebug )
41945      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41946      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41947      C_O_FLAG_HI="$C_O_FLAG_NORM"
41948      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41949      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41950      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41951      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41952      ;;
41953    slowdebug )
41954      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41955      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41956      C_O_FLAG_HI="$C_O_FLAG_NONE"
41957      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41958      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41959      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41960      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41961      ;;
41962  esac
41963
41964  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41965
41966  # The package path is used only on macosx?
41967  PACKAGE_PATH=/opt/local
41968
41969
41970  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41971    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41972    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41973    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41974    #   Note: -Dmacro         is the same as    #define macro 1
41975    #         -Dmacro=        is the same as    #define macro
41976    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41977      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41978    else
41979      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41980    fi
41981  else
41982    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41983  fi
41984  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41985    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
41986  fi
41987  if test "x$OPENJDK_TARGET_OS" = xwindows; then
41988    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
41989  fi
41990  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41991    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
41992  fi
41993  if test "x$OPENJDK_TARGET_OS" = xaix; then
41994    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
41995  fi
41996  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41997    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41998    # Setting these parameters makes it an error to link to macosx APIs that are
41999    # newer than the given OS version and makes the linked binaries compatible even
42000    # if built on a newer version of the OS.
42001    # The expected format is X.Y.Z
42002    MACOSX_VERSION_MIN=10.7.0
42003
42004    # The macro takes the version with no dots, ex: 1070
42005    # Let the flags variables get resolved in make for easier override on make
42006    # command line.
42007    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42008    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42009  fi
42010  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42011    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
42012  fi
42013  if test "x$DEBUG_LEVEL" = xrelease; then
42014    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42015  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42016    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42017  fi
42018  else
42019    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42020  fi
42021
42022  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42023  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42024
42025  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42026      -I${JDK_OUTPUTDIR}/include \
42027      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42028      -I${JDK_TOPDIR}/src/share/javavm/export \
42029      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42030      -I${JDK_TOPDIR}/src/share/native/common \
42031      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42032
42033  # The shared libraries are compiled using the picflag.
42034  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42035  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42036
42037  # Executable flags
42038  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
42039  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
42040
42041  # Now this is odd. The JDK native libraries have to link against libjvm.so
42042  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42043  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42044  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42045  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42046  # libraries will link to whatever is in memory. Yuck.
42047  #
42048  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42049  if test "x$COMPILER_NAME" = xcl; then
42050    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42051    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42052      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42053    fi
42054    # TODO: make -debug optional "--disable-full-debug-symbols"
42055    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42056    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42057    LDFLAGS_JDKLIB_SUFFIX=""
42058    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42059      LDFLAGS_STACK_SIZE=1048576
42060    else
42061      LDFLAGS_STACK_SIZE=327680
42062    fi
42063    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42064  else
42065    if test "x$COMPILER_NAME" = xgcc; then
42066      # If this is a --hash-style=gnu system, use --hash-style=both, why?
42067      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
42068      if test -n "$HAS_GNU_HASH"; then
42069        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42070      fi
42071      if test "x$OPENJDK_TARGET_OS" = xlinux; then
42072        # And since we now know that the linker is gnu, then add -z defs, to forbid
42073        # undefined symbols in object files.
42074        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42075        if test "x$DEBUG_LEVEL" = "xrelease"; then
42076          # When building release libraries, tell the linker optimize them.
42077          # Should this be supplied to the OSS linker as well?
42078          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42079        fi
42080      fi
42081    fi
42082    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42083        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42084
42085    # On some platforms (mac) the linker warns about non existing -L dirs.
42086    # Add server first if available. Linking aginst client does not always produce the same results.
42087    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42088    # Default to server for other variants.
42089    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42090      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42091    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42092      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42093    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42094      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42095    else
42096      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42097    fi
42098
42099    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42100    if test "x$COMPILER_NAME" = xossc; then
42101      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42102    fi
42103
42104    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42105    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42106      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42107    fi
42108  fi
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124  # Some Zero and Shark settings.
42125  # ZERO_ARCHFLAG tells the compiler which mode to build for
42126  case "${OPENJDK_TARGET_CPU}" in
42127    s390)
42128      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42129      ;;
42130    *)
42131      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42132  esac
42133
42134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42135$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42136  supports=yes
42137
42138  saved_cflags="$CFLAGS"
42139  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42140  ac_ext=c
42141ac_cpp='$CPP $CPPFLAGS'
42142ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42143ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42144ac_compiler_gnu=$ac_cv_c_compiler_gnu
42145
42146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42147/* end confdefs.h.  */
42148int i;
42149_ACEOF
42150if ac_fn_c_try_compile "$LINENO"; then :
42151
42152else
42153  supports=no
42154fi
42155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42156  ac_ext=cpp
42157ac_cpp='$CXXCPP $CPPFLAGS'
42158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42161
42162  CFLAGS="$saved_cflags"
42163
42164  saved_cxxflags="$CXXFLAGS"
42165  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42166  ac_ext=cpp
42167ac_cpp='$CXXCPP $CPPFLAGS'
42168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42171
42172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42173/* end confdefs.h.  */
42174int i;
42175_ACEOF
42176if ac_fn_cxx_try_compile "$LINENO"; then :
42177
42178else
42179  supports=no
42180fi
42181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42182  ac_ext=cpp
42183ac_cpp='$CXXCPP $CPPFLAGS'
42184ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42185ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42186ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42187
42188  CXXFLAGS="$saved_cxxflags"
42189
42190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42191$as_echo "$supports" >&6; }
42192  if test "x$supports" = "xyes" ; then
42193    :
42194  else
42195    ZERO_ARCHFLAG=""
42196  fi
42197
42198
42199
42200  # Check that the compiler supports -mX (or -qX on AIX) flags
42201  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42202
42203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42204$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42205  supports=yes
42206
42207  saved_cflags="$CFLAGS"
42208  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42209  ac_ext=c
42210ac_cpp='$CPP $CPPFLAGS'
42211ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42212ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42213ac_compiler_gnu=$ac_cv_c_compiler_gnu
42214
42215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42216/* end confdefs.h.  */
42217int i;
42218_ACEOF
42219if ac_fn_c_try_compile "$LINENO"; then :
42220
42221else
42222  supports=no
42223fi
42224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42225  ac_ext=cpp
42226ac_cpp='$CXXCPP $CPPFLAGS'
42227ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42228ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42229ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42230
42231  CFLAGS="$saved_cflags"
42232
42233  saved_cxxflags="$CXXFLAGS"
42234  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42235  ac_ext=cpp
42236ac_cpp='$CXXCPP $CPPFLAGS'
42237ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42238ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42239ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42240
42241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42242/* end confdefs.h.  */
42243int i;
42244_ACEOF
42245if ac_fn_cxx_try_compile "$LINENO"; then :
42246
42247else
42248  supports=no
42249fi
42250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42251  ac_ext=cpp
42252ac_cpp='$CXXCPP $CPPFLAGS'
42253ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42254ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42255ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42256
42257  CXXFLAGS="$saved_cxxflags"
42258
42259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42260$as_echo "$supports" >&6; }
42261  if test "x$supports" = "xyes" ; then
42262    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42263  else
42264    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42265  fi
42266
42267
42268
42269
42270  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
42271  USING_BROKEN_SUSE_LD=no
42272  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
42273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
42274$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
42275    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
42276    echo "int main() { }" > main.c
42277    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
42278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42279$as_echo "no" >&6; }
42280      USING_BROKEN_SUSE_LD=no
42281    else
42282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42283$as_echo "yes" >&6; }
42284      USING_BROKEN_SUSE_LD=yes
42285    fi
42286    rm -rf version-script.map main.c a.out
42287  fi
42288
42289
42290
42291# Setup debug symbols (need objcopy from the toolchain for that)
42292
42293  #
42294  # ENABLE_DEBUG_SYMBOLS
42295  # This must be done after the toolchain is setup, since we're looking at objcopy.
42296  #
42297  # Check whether --enable-debug-symbols was given.
42298if test "${enable_debug_symbols+set}" = set; then :
42299  enableval=$enable_debug_symbols;
42300fi
42301
42302
42303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42304$as_echo_n "checking if we should generate debug symbols... " >&6; }
42305
42306  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42307    # explicit enabling of enable-debug-symbols and can't find objcopy
42308    #   this is an error
42309    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42310  fi
42311
42312  if test "x$enable_debug_symbols" = "xyes"; then
42313    ENABLE_DEBUG_SYMBOLS=true
42314  elif test "x$enable_debug_symbols" = "xno"; then
42315    ENABLE_DEBUG_SYMBOLS=false
42316  else
42317    # Default is on if objcopy is found
42318    if test "x$OBJCOPY" != x; then
42319      ENABLE_DEBUG_SYMBOLS=true
42320    # MacOS X and Windows don't use objcopy but default is on for those OSes
42321    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42322      ENABLE_DEBUG_SYMBOLS=true
42323    else
42324      ENABLE_DEBUG_SYMBOLS=false
42325    fi
42326  fi
42327
42328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42329$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42330
42331  #
42332  # ZIP_DEBUGINFO_FILES
42333  #
42334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42335$as_echo_n "checking if we should zip debug-info files... " >&6; }
42336  # Check whether --enable-zip-debug-info was given.
42337if test "${enable_zip_debug_info+set}" = set; then :
42338  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42339else
42340  enable_zip_debug_info="yes"
42341fi
42342
42343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42344$as_echo "${enable_zip_debug_info}" >&6; }
42345
42346  if test "x${enable_zip_debug_info}" = "xno"; then
42347    ZIP_DEBUGINFO_FILES=false
42348  else
42349    ZIP_DEBUGINFO_FILES=true
42350  fi
42351
42352
42353
42354
42355
42356
42357
42358###############################################################################
42359#
42360# Check dependencies for external and internal libraries.
42361#
42362###############################################################################
42363
42364# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42365
42366  # When using cygwin or msys, we need a wrapper binary that renames
42367  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42368  # @files and rewrites these too! This wrapper binary is
42369  # called fixpath.
42370  FIXPATH=
42371  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42373$as_echo_n "checking if fixpath can be created... " >&6; }
42374    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42375    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42376    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42377      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42378      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42379      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42380      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42381    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42382      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42383      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42384
42385      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42386      # @ was chosen as separator to minimize risk of other tools messing around with it
42387      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42388      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42389
42390      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42391    fi
42392    rm -f $OUTPUT_ROOT/fixpath*
42393    cd $OUTPUT_ROOT
42394    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42395    cd $CURDIR
42396
42397    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42399$as_echo "no" >&6; }
42400      cat $OUTPUT_ROOT/fixpath1.log
42401      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42402    fi
42403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42404$as_echo "yes" >&6; }
42405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42406$as_echo_n "checking if fixpath.exe works... " >&6; }
42407    cd $OUTPUT_ROOT
42408    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42409    cd $CURDIR
42410    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42412$as_echo "no" >&6; }
42413      cat $OUTPUT_ROOT/fixpath2.log
42414      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42415    fi
42416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42417$as_echo "yes" >&6; }
42418    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42419  fi
42420
42421
42422
42423
42424
42425
42426  ###############################################################################
42427  #
42428  # OS specific settings that we never will need to probe.
42429  #
42430  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42432$as_echo_n "checking what is not needed on Linux?... " >&6; }
42433    PULSE_NOT_NEEDED=yes
42434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42435$as_echo "pulse" >&6; }
42436  fi
42437
42438  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42440$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42441    ALSA_NOT_NEEDED=yes
42442    PULSE_NOT_NEEDED=yes
42443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42444$as_echo "alsa pulse" >&6; }
42445  fi
42446
42447  if test "x$OPENJDK_TARGET_OS" = xaix; then
42448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42449$as_echo_n "checking what is not needed on AIX?... " >&6; }
42450    ALSA_NOT_NEEDED=yes
42451    PULSE_NOT_NEEDED=yes
42452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42453$as_echo "alsa pulse" >&6; }
42454  fi
42455
42456
42457  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42459$as_echo_n "checking what is not needed on Windows?... " >&6; }
42460    CUPS_NOT_NEEDED=yes
42461    ALSA_NOT_NEEDED=yes
42462    PULSE_NOT_NEEDED=yes
42463    X11_NOT_NEEDED=yes
42464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42465$as_echo "alsa cups pulse x11" >&6; }
42466  fi
42467
42468  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42470$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42471    ALSA_NOT_NEEDED=yes
42472    PULSE_NOT_NEEDED=yes
42473    X11_NOT_NEEDED=yes
42474    # If the java runtime framework is disabled, then we need X11.
42475    # This will be adjusted below.
42476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42477$as_echo "alsa pulse x11" >&6; }
42478  fi
42479
42480  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42482$as_echo_n "checking what is not needed on bsd?... " >&6; }
42483    ALSA_NOT_NEEDED=yes
42484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42485$as_echo "alsa" >&6; }
42486  fi
42487
42488  if test "x$OPENJDK" = "xfalse"; then
42489    FREETYPE_NOT_NEEDED=yes
42490  fi
42491
42492  if test "x$SUPPORT_HEADFUL" = xno; then
42493    X11_NOT_NEEDED=yes
42494  fi
42495
42496  ###############################################################################
42497  #
42498  # Check for MacOSX support for OpenJDK.
42499  #
42500
42501
42502  # Check whether --enable-macosx-runtime-support was given.
42503if test "${enable_macosx_runtime_support+set}" = set; then :
42504  enableval=$enable_macosx_runtime_support;
42505fi
42506
42507  if test "x$enable_macosx_runtime_support" != x; then
42508    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42509$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42510  fi
42511
42512
42513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42514$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42515  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42517$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42518  else
42519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42520$as_echo "no" >&6; }
42521  fi
42522
42523
42524
42525  ###############################################################################
42526  #
42527  # Check for X Windows
42528  #
42529
42530  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42531  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42532  # --x-libraries for the sysroot, if that seems to be correct.
42533  if test "x$SYS_ROOT" != "x/"; then
42534    if test "x$x_includes" = xNONE; then
42535      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42536        x_includes="$SYS_ROOT/usr/X11R6/include"
42537      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42538        x_includes="$SYS_ROOT/usr/include"
42539      fi
42540    fi
42541    if test "x$x_libraries" = xNONE; then
42542      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42543        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42544      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42545        x_libraries="$SYS_ROOT/usr/lib64"
42546      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42547        x_libraries="$SYS_ROOT/usr/lib"
42548      fi
42549    fi
42550  fi
42551
42552  # Now let autoconf do it's magic
42553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42554$as_echo_n "checking for X... " >&6; }
42555
42556
42557# Check whether --with-x was given.
42558if test "${with_x+set}" = set; then :
42559  withval=$with_x;
42560fi
42561
42562# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42563if test "x$with_x" = xno; then
42564  # The user explicitly disabled X.
42565  have_x=disabled
42566else
42567  case $x_includes,$x_libraries in #(
42568    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42569    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42570  $as_echo_n "(cached) " >&6
42571else
42572  # One or both of the vars are not set, and there is no cached value.
42573ac_x_includes=no ac_x_libraries=no
42574rm -f -r conftest.dir
42575if mkdir conftest.dir; then
42576  cd conftest.dir
42577  cat >Imakefile <<'_ACEOF'
42578incroot:
42579	@echo incroot='${INCROOT}'
42580usrlibdir:
42581	@echo usrlibdir='${USRLIBDIR}'
42582libdir:
42583	@echo libdir='${LIBDIR}'
42584_ACEOF
42585  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42586    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42587    for ac_var in incroot usrlibdir libdir; do
42588      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42589    done
42590    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42591    for ac_extension in a so sl dylib la dll; do
42592      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42593	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42594	ac_im_usrlibdir=$ac_im_libdir; break
42595      fi
42596    done
42597    # Screen out bogus values from the imake configuration.  They are
42598    # bogus both because they are the default anyway, and because
42599    # using them would break gcc on systems where it needs fixed includes.
42600    case $ac_im_incroot in
42601	/usr/include) ac_x_includes= ;;
42602	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42603    esac
42604    case $ac_im_usrlibdir in
42605	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42606	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42607    esac
42608  fi
42609  cd ..
42610  rm -f -r conftest.dir
42611fi
42612
42613# Standard set of common directories for X headers.
42614# Check X11 before X11Rn because it is often a symlink to the current release.
42615ac_x_header_dirs='
42616/usr/X11/include
42617/usr/X11R7/include
42618/usr/X11R6/include
42619/usr/X11R5/include
42620/usr/X11R4/include
42621
42622/usr/include/X11
42623/usr/include/X11R7
42624/usr/include/X11R6
42625/usr/include/X11R5
42626/usr/include/X11R4
42627
42628/usr/local/X11/include
42629/usr/local/X11R7/include
42630/usr/local/X11R6/include
42631/usr/local/X11R5/include
42632/usr/local/X11R4/include
42633
42634/usr/local/include/X11
42635/usr/local/include/X11R7
42636/usr/local/include/X11R6
42637/usr/local/include/X11R5
42638/usr/local/include/X11R4
42639
42640/usr/X386/include
42641/usr/x386/include
42642/usr/XFree86/include/X11
42643
42644/usr/include
42645/usr/local/include
42646/usr/unsupported/include
42647/usr/athena/include
42648/usr/local/x11r5/include
42649/usr/lpp/Xamples/include
42650
42651/usr/openwin/include
42652/usr/openwin/share/include'
42653
42654if test "$ac_x_includes" = no; then
42655  # Guess where to find include files, by looking for Xlib.h.
42656  # First, try using that file with no special directory specified.
42657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42658/* end confdefs.h.  */
42659#include <X11/Xlib.h>
42660_ACEOF
42661if ac_fn_cxx_try_cpp "$LINENO"; then :
42662  # We can compile using X headers with no special include directory.
42663ac_x_includes=
42664else
42665  for ac_dir in $ac_x_header_dirs; do
42666  if test -r "$ac_dir/X11/Xlib.h"; then
42667    ac_x_includes=$ac_dir
42668    break
42669  fi
42670done
42671fi
42672rm -f conftest.err conftest.i conftest.$ac_ext
42673fi # $ac_x_includes = no
42674
42675if test "$ac_x_libraries" = no; then
42676  # Check for the libraries.
42677  # See if we find them without any special options.
42678  # Don't add to $LIBS permanently.
42679  ac_save_LIBS=$LIBS
42680  LIBS="-lX11 $LIBS"
42681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42682/* end confdefs.h.  */
42683#include <X11/Xlib.h>
42684int
42685main ()
42686{
42687XrmInitialize ()
42688  ;
42689  return 0;
42690}
42691_ACEOF
42692if ac_fn_cxx_try_link "$LINENO"; then :
42693  LIBS=$ac_save_LIBS
42694# We can link X programs with no special library path.
42695ac_x_libraries=
42696else
42697  LIBS=$ac_save_LIBS
42698for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42699do
42700  # Don't even attempt the hair of trying to link an X program!
42701  for ac_extension in a so sl dylib la dll; do
42702    if test -r "$ac_dir/libX11.$ac_extension"; then
42703      ac_x_libraries=$ac_dir
42704      break 2
42705    fi
42706  done
42707done
42708fi
42709rm -f core conftest.err conftest.$ac_objext \
42710    conftest$ac_exeext conftest.$ac_ext
42711fi # $ac_x_libraries = no
42712
42713case $ac_x_includes,$ac_x_libraries in #(
42714  no,* | *,no | *\'*)
42715    # Didn't find X, or a directory has "'" in its name.
42716    ac_cv_have_x="have_x=no";; #(
42717  *)
42718    # Record where we found X for the cache.
42719    ac_cv_have_x="have_x=yes\
42720	ac_x_includes='$ac_x_includes'\
42721	ac_x_libraries='$ac_x_libraries'"
42722esac
42723fi
42724;; #(
42725    *) have_x=yes;;
42726  esac
42727  eval "$ac_cv_have_x"
42728fi # $with_x != no
42729
42730if test "$have_x" != yes; then
42731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42732$as_echo "$have_x" >&6; }
42733  no_x=yes
42734else
42735  # If each of the values was on the command line, it overrides each guess.
42736  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42737  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42738  # Update the cache value to reflect the command line values.
42739  ac_cv_have_x="have_x=yes\
42740	ac_x_includes='$x_includes'\
42741	ac_x_libraries='$x_libraries'"
42742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42743$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42744fi
42745
42746  if test "$no_x" = yes; then
42747  # Not all programs may use this symbol, but it does not hurt to define it.
42748
42749$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42750
42751  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42752else
42753  if test -n "$x_includes"; then
42754    X_CFLAGS="$X_CFLAGS -I$x_includes"
42755  fi
42756
42757  # It would also be nice to do this for all -L options, not just this one.
42758  if test -n "$x_libraries"; then
42759    X_LIBS="$X_LIBS -L$x_libraries"
42760    # For Solaris; some versions of Sun CC require a space after -R and
42761    # others require no space.  Words are not sufficient . . . .
42762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42763$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42764    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42765    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42766    ac_cxx_werror_flag=yes
42767    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42768/* end confdefs.h.  */
42769
42770int
42771main ()
42772{
42773
42774  ;
42775  return 0;
42776}
42777_ACEOF
42778if ac_fn_cxx_try_link "$LINENO"; then :
42779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42780$as_echo "no" >&6; }
42781       X_LIBS="$X_LIBS -R$x_libraries"
42782else
42783  LIBS="$ac_xsave_LIBS -R $x_libraries"
42784       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42785/* end confdefs.h.  */
42786
42787int
42788main ()
42789{
42790
42791  ;
42792  return 0;
42793}
42794_ACEOF
42795if ac_fn_cxx_try_link "$LINENO"; then :
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42797$as_echo "yes" >&6; }
42798	  X_LIBS="$X_LIBS -R $x_libraries"
42799else
42800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42801$as_echo "neither works" >&6; }
42802fi
42803rm -f core conftest.err conftest.$ac_objext \
42804    conftest$ac_exeext conftest.$ac_ext
42805fi
42806rm -f core conftest.err conftest.$ac_objext \
42807    conftest$ac_exeext conftest.$ac_ext
42808    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42809    LIBS=$ac_xsave_LIBS
42810  fi
42811
42812  # Check for system-dependent libraries X programs must link with.
42813  # Do this before checking for the system-independent R6 libraries
42814  # (-lICE), since we may need -lsocket or whatever for X linking.
42815
42816  if test "$ISC" = yes; then
42817    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42818  else
42819    # Martyn Johnson says this is needed for Ultrix, if the X
42820    # libraries were built with DECnet support.  And Karl Berry says
42821    # the Alpha needs dnet_stub (dnet does not exist).
42822    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42823    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42824/* end confdefs.h.  */
42825
42826/* Override any GCC internal prototype to avoid an error.
42827   Use char because int might match the return type of a GCC
42828   builtin and then its argument prototype would still apply.  */
42829#ifdef __cplusplus
42830extern "C"
42831#endif
42832char XOpenDisplay ();
42833int
42834main ()
42835{
42836return XOpenDisplay ();
42837  ;
42838  return 0;
42839}
42840_ACEOF
42841if ac_fn_cxx_try_link "$LINENO"; then :
42842
42843else
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42845$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42846if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42847  $as_echo_n "(cached) " >&6
42848else
42849  ac_check_lib_save_LIBS=$LIBS
42850LIBS="-ldnet  $LIBS"
42851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42852/* end confdefs.h.  */
42853
42854/* Override any GCC internal prototype to avoid an error.
42855   Use char because int might match the return type of a GCC
42856   builtin and then its argument prototype would still apply.  */
42857#ifdef __cplusplus
42858extern "C"
42859#endif
42860char dnet_ntoa ();
42861int
42862main ()
42863{
42864return dnet_ntoa ();
42865  ;
42866  return 0;
42867}
42868_ACEOF
42869if ac_fn_cxx_try_link "$LINENO"; then :
42870  ac_cv_lib_dnet_dnet_ntoa=yes
42871else
42872  ac_cv_lib_dnet_dnet_ntoa=no
42873fi
42874rm -f core conftest.err conftest.$ac_objext \
42875    conftest$ac_exeext conftest.$ac_ext
42876LIBS=$ac_check_lib_save_LIBS
42877fi
42878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42879$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42880if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42881  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42882fi
42883
42884    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42886$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42887if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42888  $as_echo_n "(cached) " >&6
42889else
42890  ac_check_lib_save_LIBS=$LIBS
42891LIBS="-ldnet_stub  $LIBS"
42892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42893/* end confdefs.h.  */
42894
42895/* Override any GCC internal prototype to avoid an error.
42896   Use char because int might match the return type of a GCC
42897   builtin and then its argument prototype would still apply.  */
42898#ifdef __cplusplus
42899extern "C"
42900#endif
42901char dnet_ntoa ();
42902int
42903main ()
42904{
42905return dnet_ntoa ();
42906  ;
42907  return 0;
42908}
42909_ACEOF
42910if ac_fn_cxx_try_link "$LINENO"; then :
42911  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42912else
42913  ac_cv_lib_dnet_stub_dnet_ntoa=no
42914fi
42915rm -f core conftest.err conftest.$ac_objext \
42916    conftest$ac_exeext conftest.$ac_ext
42917LIBS=$ac_check_lib_save_LIBS
42918fi
42919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42920$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42921if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42922  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42923fi
42924
42925    fi
42926fi
42927rm -f core conftest.err conftest.$ac_objext \
42928    conftest$ac_exeext conftest.$ac_ext
42929    LIBS="$ac_xsave_LIBS"
42930
42931    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42932    # to get the SysV transport functions.
42933    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42934    # needs -lnsl.
42935    # The nsl library prevents programs from opening the X display
42936    # on Irix 5.2, according to T.E. Dickey.
42937    # The functions gethostbyname, getservbyname, and inet_addr are
42938    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42939    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42940if test "x$ac_cv_func_gethostbyname" = xyes; then :
42941
42942fi
42943
42944    if test $ac_cv_func_gethostbyname = no; then
42945      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42946$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42947if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42948  $as_echo_n "(cached) " >&6
42949else
42950  ac_check_lib_save_LIBS=$LIBS
42951LIBS="-lnsl  $LIBS"
42952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42953/* end confdefs.h.  */
42954
42955/* Override any GCC internal prototype to avoid an error.
42956   Use char because int might match the return type of a GCC
42957   builtin and then its argument prototype would still apply.  */
42958#ifdef __cplusplus
42959extern "C"
42960#endif
42961char gethostbyname ();
42962int
42963main ()
42964{
42965return gethostbyname ();
42966  ;
42967  return 0;
42968}
42969_ACEOF
42970if ac_fn_cxx_try_link "$LINENO"; then :
42971  ac_cv_lib_nsl_gethostbyname=yes
42972else
42973  ac_cv_lib_nsl_gethostbyname=no
42974fi
42975rm -f core conftest.err conftest.$ac_objext \
42976    conftest$ac_exeext conftest.$ac_ext
42977LIBS=$ac_check_lib_save_LIBS
42978fi
42979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42980$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42981if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42982  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42983fi
42984
42985      if test $ac_cv_lib_nsl_gethostbyname = no; then
42986	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42987$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42988if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42989  $as_echo_n "(cached) " >&6
42990else
42991  ac_check_lib_save_LIBS=$LIBS
42992LIBS="-lbsd  $LIBS"
42993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42994/* end confdefs.h.  */
42995
42996/* Override any GCC internal prototype to avoid an error.
42997   Use char because int might match the return type of a GCC
42998   builtin and then its argument prototype would still apply.  */
42999#ifdef __cplusplus
43000extern "C"
43001#endif
43002char gethostbyname ();
43003int
43004main ()
43005{
43006return gethostbyname ();
43007  ;
43008  return 0;
43009}
43010_ACEOF
43011if ac_fn_cxx_try_link "$LINENO"; then :
43012  ac_cv_lib_bsd_gethostbyname=yes
43013else
43014  ac_cv_lib_bsd_gethostbyname=no
43015fi
43016rm -f core conftest.err conftest.$ac_objext \
43017    conftest$ac_exeext conftest.$ac_ext
43018LIBS=$ac_check_lib_save_LIBS
43019fi
43020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43021$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43022if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43023  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43024fi
43025
43026      fi
43027    fi
43028
43029    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43030    # socket/setsockopt and other routines are undefined under SCO ODT
43031    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43032    # on later versions), says Simon Leinen: it contains gethostby*
43033    # variants that don't use the name server (or something).  -lsocket
43034    # must be given before -lnsl if both are needed.  We assume that
43035    # if connect needs -lnsl, so does gethostbyname.
43036    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43037if test "x$ac_cv_func_connect" = xyes; then :
43038
43039fi
43040
43041    if test $ac_cv_func_connect = no; then
43042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43043$as_echo_n "checking for connect in -lsocket... " >&6; }
43044if ${ac_cv_lib_socket_connect+:} false; then :
43045  $as_echo_n "(cached) " >&6
43046else
43047  ac_check_lib_save_LIBS=$LIBS
43048LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43050/* end confdefs.h.  */
43051
43052/* Override any GCC internal prototype to avoid an error.
43053   Use char because int might match the return type of a GCC
43054   builtin and then its argument prototype would still apply.  */
43055#ifdef __cplusplus
43056extern "C"
43057#endif
43058char connect ();
43059int
43060main ()
43061{
43062return connect ();
43063  ;
43064  return 0;
43065}
43066_ACEOF
43067if ac_fn_cxx_try_link "$LINENO"; then :
43068  ac_cv_lib_socket_connect=yes
43069else
43070  ac_cv_lib_socket_connect=no
43071fi
43072rm -f core conftest.err conftest.$ac_objext \
43073    conftest$ac_exeext conftest.$ac_ext
43074LIBS=$ac_check_lib_save_LIBS
43075fi
43076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43077$as_echo "$ac_cv_lib_socket_connect" >&6; }
43078if test "x$ac_cv_lib_socket_connect" = xyes; then :
43079  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43080fi
43081
43082    fi
43083
43084    # Guillermo Gomez says -lposix is necessary on A/UX.
43085    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43086if test "x$ac_cv_func_remove" = xyes; then :
43087
43088fi
43089
43090    if test $ac_cv_func_remove = no; then
43091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43092$as_echo_n "checking for remove in -lposix... " >&6; }
43093if ${ac_cv_lib_posix_remove+:} false; then :
43094  $as_echo_n "(cached) " >&6
43095else
43096  ac_check_lib_save_LIBS=$LIBS
43097LIBS="-lposix  $LIBS"
43098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43099/* end confdefs.h.  */
43100
43101/* Override any GCC internal prototype to avoid an error.
43102   Use char because int might match the return type of a GCC
43103   builtin and then its argument prototype would still apply.  */
43104#ifdef __cplusplus
43105extern "C"
43106#endif
43107char remove ();
43108int
43109main ()
43110{
43111return remove ();
43112  ;
43113  return 0;
43114}
43115_ACEOF
43116if ac_fn_cxx_try_link "$LINENO"; then :
43117  ac_cv_lib_posix_remove=yes
43118else
43119  ac_cv_lib_posix_remove=no
43120fi
43121rm -f core conftest.err conftest.$ac_objext \
43122    conftest$ac_exeext conftest.$ac_ext
43123LIBS=$ac_check_lib_save_LIBS
43124fi
43125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43126$as_echo "$ac_cv_lib_posix_remove" >&6; }
43127if test "x$ac_cv_lib_posix_remove" = xyes; then :
43128  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43129fi
43130
43131    fi
43132
43133    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43134    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43135if test "x$ac_cv_func_shmat" = xyes; then :
43136
43137fi
43138
43139    if test $ac_cv_func_shmat = no; then
43140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43141$as_echo_n "checking for shmat in -lipc... " >&6; }
43142if ${ac_cv_lib_ipc_shmat+:} false; then :
43143  $as_echo_n "(cached) " >&6
43144else
43145  ac_check_lib_save_LIBS=$LIBS
43146LIBS="-lipc  $LIBS"
43147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43148/* end confdefs.h.  */
43149
43150/* Override any GCC internal prototype to avoid an error.
43151   Use char because int might match the return type of a GCC
43152   builtin and then its argument prototype would still apply.  */
43153#ifdef __cplusplus
43154extern "C"
43155#endif
43156char shmat ();
43157int
43158main ()
43159{
43160return shmat ();
43161  ;
43162  return 0;
43163}
43164_ACEOF
43165if ac_fn_cxx_try_link "$LINENO"; then :
43166  ac_cv_lib_ipc_shmat=yes
43167else
43168  ac_cv_lib_ipc_shmat=no
43169fi
43170rm -f core conftest.err conftest.$ac_objext \
43171    conftest$ac_exeext conftest.$ac_ext
43172LIBS=$ac_check_lib_save_LIBS
43173fi
43174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43175$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43176if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43177  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43178fi
43179
43180    fi
43181  fi
43182
43183  # Check for libraries that X11R6 Xt/Xaw programs need.
43184  ac_save_LDFLAGS=$LDFLAGS
43185  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43186  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43187  # check for ICE first), but we must link in the order -lSM -lICE or
43188  # we get undefined symbols.  So assume we have SM if we have ICE.
43189  # These have to be linked with before -lX11, unlike the other
43190  # libraries we check for below, so use a different variable.
43191  # John Interrante, Karl Berry
43192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43193$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43194if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43195  $as_echo_n "(cached) " >&6
43196else
43197  ac_check_lib_save_LIBS=$LIBS
43198LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43200/* end confdefs.h.  */
43201
43202/* Override any GCC internal prototype to avoid an error.
43203   Use char because int might match the return type of a GCC
43204   builtin and then its argument prototype would still apply.  */
43205#ifdef __cplusplus
43206extern "C"
43207#endif
43208char IceConnectionNumber ();
43209int
43210main ()
43211{
43212return IceConnectionNumber ();
43213  ;
43214  return 0;
43215}
43216_ACEOF
43217if ac_fn_cxx_try_link "$LINENO"; then :
43218  ac_cv_lib_ICE_IceConnectionNumber=yes
43219else
43220  ac_cv_lib_ICE_IceConnectionNumber=no
43221fi
43222rm -f core conftest.err conftest.$ac_objext \
43223    conftest$ac_exeext conftest.$ac_ext
43224LIBS=$ac_check_lib_save_LIBS
43225fi
43226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43227$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43228if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43229  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43230fi
43231
43232  LDFLAGS=$ac_save_LDFLAGS
43233
43234fi
43235
43236
43237  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43238  # this doesn't make sense so we remove it.
43239  if test "x$COMPILE_TYPE" = xcross; then
43240    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43241  fi
43242
43243  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43244
43245  # Print a helpful message on how to acquire the necessary build dependency.
43246  # x11 is the help tag: freetype, cups, pulse, alsa etc
43247  MISSING_DEPENDENCY=x11
43248
43249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43250    cygwin_help $MISSING_DEPENDENCY
43251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43252    msys_help $MISSING_DEPENDENCY
43253  else
43254    PKGHANDLER_COMMAND=
43255
43256    case $PKGHANDLER in
43257      apt-get)
43258        apt_help     $MISSING_DEPENDENCY ;;
43259      yum)
43260        yum_help     $MISSING_DEPENDENCY ;;
43261      port)
43262        port_help    $MISSING_DEPENDENCY ;;
43263      pkgutil)
43264        pkgutil_help $MISSING_DEPENDENCY ;;
43265      pkgadd)
43266        pkgadd_help  $MISSING_DEPENDENCY ;;
43267    esac
43268
43269    if test "x$PKGHANDLER_COMMAND" != x; then
43270      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43271    fi
43272  fi
43273
43274    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43275  fi
43276
43277  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43278    OPENWIN_HOME="/usr/openwin"
43279  fi
43280
43281
43282
43283  #
43284  # Weird Sol10 something check...TODO change to try compile
43285  #
43286  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43287    if test "`uname -r`" = "5.10"; then
43288      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43289        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43290      fi
43291    fi
43292  fi
43293
43294  ac_ext=c
43295ac_cpp='$CPP $CPPFLAGS'
43296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43298ac_compiler_gnu=$ac_cv_c_compiler_gnu
43299
43300  OLD_CFLAGS="$CFLAGS"
43301  CFLAGS="$CFLAGS $X_CFLAGS"
43302
43303  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43304  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43305do :
43306  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43307ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43308        # include <X11/Xlib.h>
43309        # include <X11/Xutil.h>
43310
43311
43312"
43313if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43314  cat >>confdefs.h <<_ACEOF
43315#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43316_ACEOF
43317 X11_A_OK=yes
43318else
43319  X11_A_OK=no; break
43320fi
43321
43322done
43323
43324
43325  CFLAGS="$OLD_CFLAGS"
43326  ac_ext=cpp
43327ac_cpp='$CXXCPP $CPPFLAGS'
43328ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43329ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43330ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43331
43332
43333  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43334
43335  # Print a helpful message on how to acquire the necessary build dependency.
43336  # x11 is the help tag: freetype, cups, pulse, alsa etc
43337  MISSING_DEPENDENCY=x11
43338
43339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43340    cygwin_help $MISSING_DEPENDENCY
43341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43342    msys_help $MISSING_DEPENDENCY
43343  else
43344    PKGHANDLER_COMMAND=
43345
43346    case $PKGHANDLER in
43347      apt-get)
43348        apt_help     $MISSING_DEPENDENCY ;;
43349      yum)
43350        yum_help     $MISSING_DEPENDENCY ;;
43351      port)
43352        port_help    $MISSING_DEPENDENCY ;;
43353      pkgutil)
43354        pkgutil_help $MISSING_DEPENDENCY ;;
43355      pkgadd)
43356        pkgadd_help  $MISSING_DEPENDENCY ;;
43357    esac
43358
43359    if test "x$PKGHANDLER_COMMAND" != x; then
43360      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43361    fi
43362  fi
43363
43364    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43365  fi
43366
43367
43368
43369
43370
43371
43372  ###############################################################################
43373  #
43374  # The common unix printing system cups is used to print from java.
43375  #
43376
43377# Check whether --with-cups was given.
43378if test "${with_cups+set}" = set; then :
43379  withval=$with_cups;
43380fi
43381
43382
43383# Check whether --with-cups-include was given.
43384if test "${with_cups_include+set}" = set; then :
43385  withval=$with_cups_include;
43386fi
43387
43388
43389  if test "x$CUPS_NOT_NEEDED" = xyes; then
43390    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43391      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43392$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43393    fi
43394    CUPS_CFLAGS=
43395  else
43396    CUPS_FOUND=no
43397
43398    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43399      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43400    fi
43401
43402    if test "x${with_cups}" != x; then
43403      CUPS_CFLAGS="-I${with_cups}/include"
43404      CUPS_FOUND=yes
43405    fi
43406    if test "x${with_cups_include}" != x; then
43407      CUPS_CFLAGS="-I${with_cups_include}"
43408      CUPS_FOUND=yes
43409    fi
43410    if test "x$CUPS_FOUND" = xno; then
43411
43412
43413  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43414    # Source the builddeps file again, to make sure it uses the latest variables!
43415    . $builddepsfile
43416    # Look for a target and build machine specific resource!
43417    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43418    if test "x$resource" = x; then
43419      # Ok, lets instead look for a target specific resource
43420      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43421    fi
43422    if test "x$resource" = x; then
43423      # Ok, lets instead look for a build specific resource
43424      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43425    fi
43426    if test "x$resource" = x; then
43427      # Ok, lets instead look for a generic resource
43428      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43429      resource=${builddep_cups}
43430    fi
43431    if test "x$resource" != x; then
43432      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43433$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43434      # If the resource in the builddeps.conf file is an existing directory,
43435      # for example /java/linux/cups
43436      if test -d ${resource}; then
43437        depdir=${resource}
43438      else
43439
43440  # cups is for example mymodule
43441  # $resource is for example libs/general/libmymod_1_2_3.zip
43442  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43443  # $with_builddeps_dir is for example /localhome/builddeps
43444  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43445  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43446  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43447  filename=`basename $resource`
43448  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43449  filebase=${filename%%.*}
43450  extension=${filename#*.}
43451  installdir=$with_builddeps_dir/$filebase
43452  if test ! -f $installdir/$filename.unpacked; then
43453    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43454$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43455    if test ! -d $installdir; then
43456      mkdir -p $installdir
43457    fi
43458    if test ! -d $installdir; then
43459      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43460    fi
43461    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43462    touch $tmpfile
43463    if test ! -f $tmpfile; then
43464      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43465    fi
43466
43467  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43468  # $tmpfile is the local file name for the downloaded file.
43469  VALID_TOOL=no
43470  if test "x$BDEPS_FTP" = xwget; then
43471    VALID_TOOL=yes
43472    wget -O $tmpfile $with_builddeps_server/$resource
43473  fi
43474  if test "x$BDEPS_FTP" = xlftp; then
43475    VALID_TOOL=yes
43476    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43477  fi
43478  if test "x$BDEPS_FTP" = xftp; then
43479    VALID_TOOL=yes
43480    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43481    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43482    FTPUSERPWD=${FTPSERVER%%@*}
43483    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43484      FTPUSER=${userpwd%%:*}
43485      FTPPWD=${userpwd#*@}
43486      FTPSERVER=${FTPSERVER#*@}
43487    else
43488      FTPUSER=ftp
43489      FTPPWD=ftp
43490    fi
43491    # the "pass" command does not work on some
43492    # ftp clients (read ftp.exe) but if it works,
43493    # passive mode is better!
43494    ( \
43495        echo "user $FTPUSER $FTPPWD"        ; \
43496        echo "pass"                         ; \
43497        echo "bin"                          ; \
43498        echo "get $FTPPATH $tmpfile"              ; \
43499    ) | ftp -in $FTPSERVER
43500  fi
43501  if test "x$VALID_TOOL" != xyes; then
43502    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43503  fi
43504
43505    mv $tmpfile $installdir/$filename
43506    if test ! -s $installdir/$filename; then
43507      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43508    fi
43509    case "$extension" in
43510      zip)  echo "Unzipping $installdir/$filename..."
43511        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43512        ;;
43513      tar.gz) echo "Untaring $installdir/$filename..."
43514        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43515        ;;
43516      tgz) echo "Untaring $installdir/$filename..."
43517        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43518        ;;
43519      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43520        ;;
43521    esac
43522  fi
43523  if test -f $installdir/$filename.unpacked; then
43524    depdir=$installdir
43525  fi
43526
43527      fi
43528      # Source the builddeps file again, because in the previous command, the depdir
43529      # was updated to point at the current build dependency install directory.
43530      . $builddepsfile
43531      # Now extract variables from the builddeps.conf files.
43532      theroot=${builddep_cups_ROOT}
43533      thecflags=${builddep_cups_CFLAGS}
43534      thelibs=${builddep_cups_LIBS}
43535      if test "x$depdir" = x; then
43536        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43537      fi
43538      CUPS=$depdir
43539      if test "x$theroot" != x; then
43540        CUPS="$theroot"
43541      fi
43542      if test "x$thecflags" != x; then
43543        CUPS_CFLAGS="$thecflags"
43544      fi
43545      if test "x$thelibs" != x; then
43546        CUPS_LIBS="$thelibs"
43547      fi
43548      CUPS_FOUND=yes
43549
43550    fi
43551
43552  fi
43553
43554    fi
43555    if test "x$CUPS_FOUND" = xno; then
43556      # Are the cups headers installed in the default /usr/include location?
43557      for ac_header in cups/cups.h cups/ppd.h
43558do :
43559  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43560ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43561if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43562  cat >>confdefs.h <<_ACEOF
43563#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43564_ACEOF
43565
43566            CUPS_FOUND=yes
43567            CUPS_CFLAGS=
43568            DEFAULT_CUPS=yes
43569
43570
43571fi
43572
43573done
43574
43575    fi
43576    if test "x$CUPS_FOUND" = xno; then
43577      # Getting nervous now? Lets poke around for standard Solaris third-party
43578      # package installation locations.
43579      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43580$as_echo_n "checking for cups headers... " >&6; }
43581      if test -s /opt/sfw/cups/include/cups/cups.h; then
43582        # An SFW package seems to be installed!
43583        CUPS_FOUND=yes
43584        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43585      elif test -s /opt/csw/include/cups/cups.h; then
43586        # A CSW package seems to be installed!
43587        CUPS_FOUND=yes
43588        CUPS_CFLAGS="-I/opt/csw/include"
43589      fi
43590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43591$as_echo "$CUPS_FOUND" >&6; }
43592    fi
43593    if test "x$CUPS_FOUND" = xno; then
43594
43595  # Print a helpful message on how to acquire the necessary build dependency.
43596  # cups is the help tag: freetype, cups, pulse, alsa etc
43597  MISSING_DEPENDENCY=cups
43598
43599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43600    cygwin_help $MISSING_DEPENDENCY
43601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43602    msys_help $MISSING_DEPENDENCY
43603  else
43604    PKGHANDLER_COMMAND=
43605
43606    case $PKGHANDLER in
43607      apt-get)
43608        apt_help     $MISSING_DEPENDENCY ;;
43609      yum)
43610        yum_help     $MISSING_DEPENDENCY ;;
43611      port)
43612        port_help    $MISSING_DEPENDENCY ;;
43613      pkgutil)
43614        pkgutil_help $MISSING_DEPENDENCY ;;
43615      pkgadd)
43616        pkgadd_help  $MISSING_DEPENDENCY ;;
43617    esac
43618
43619    if test "x$PKGHANDLER_COMMAND" != x; then
43620      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43621    fi
43622  fi
43623
43624      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43625    fi
43626  fi
43627
43628
43629
43630
43631
43632
43633  ###############################################################################
43634  #
43635  # The ubiquitous freetype library is used to render fonts.
43636  #
43637
43638# Check whether --with-freetype was given.
43639if test "${with_freetype+set}" = set; then :
43640  withval=$with_freetype;
43641fi
43642
43643
43644# Check whether --with-freetype-include was given.
43645if test "${with_freetype_include+set}" = set; then :
43646  withval=$with_freetype_include;
43647fi
43648
43649
43650# Check whether --with-freetype-lib was given.
43651if test "${with_freetype_lib+set}" = set; then :
43652  withval=$with_freetype_lib;
43653fi
43654
43655  # Check whether --enable-freetype-bundling was given.
43656if test "${enable_freetype_bundling+set}" = set; then :
43657  enableval=$enable_freetype_bundling;
43658fi
43659
43660
43661  FREETYPE_CFLAGS=
43662  FREETYPE_LIBS=
43663  FREETYPE_BUNDLE_LIB_PATH=
43664
43665  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43666    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43667      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43668$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43669    fi
43670    if test "x$enable_freetype_bundling" != x; then
43671      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43672$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43673    fi
43674  else
43675    # freetype is needed to build; go get it!
43676
43677    BUNDLE_FREETYPE="$enable_freetype_bundling"
43678
43679    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43680      # User has specified settings
43681
43682      if test "x$BUNDLE_FREETYPE" = x; then
43683        # If not specified, default is to bundle freetype
43684        BUNDLE_FREETYPE=yes
43685      fi
43686
43687      if test "x$with_freetype" != x; then
43688        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43689        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43690      fi
43691
43692      # Allow --with-freetype-lib and --with-freetype-include to override
43693      if test "x$with_freetype_include" != x; then
43694        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43695      fi
43696      if test "x$with_freetype_lib" != x; then
43697        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43698      fi
43699
43700      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43701        # Okay, we got it. Check that it works.
43702
43703  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43704  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43705  METHOD="--with-freetype"
43706
43707  # First check if the files exists.
43708  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43709    # We found an arbitrary include file. That's a good sign.
43710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43711$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43712    FOUND_FREETYPE=yes
43713
43714    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43715    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43716      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43718      FOUND_FREETYPE=no
43719    else
43720      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43721        # On Windows, we will need both .lib and .dll file.
43722        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43723          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43725          FOUND_FREETYPE=no
43726        fi
43727      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
43728        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43729        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43730      fi
43731    fi
43732  fi
43733
43734  if test "x$FOUND_FREETYPE" = xyes; then
43735
43736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43737
43738  # Input might be given as Windows format, start by converting to
43739  # unix format.
43740  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43741  new_path=`$CYGPATH -u "$path"`
43742
43743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43746  # "foo.exe" is OK but "foo" is an error.
43747  #
43748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43749  # It is also a way to make sure we got the proper file name for the real test later on.
43750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43751  if test "x$test_shortpath" = x; then
43752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43754    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43755  fi
43756
43757  # Call helper function which possibly converts this using DOS-style short mode.
43758  # If so, the updated path is stored in $new_path.
43759
43760  input_path="$new_path"
43761  # Check if we need to convert this using DOS-style short mode. If the path
43762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43763  # take no chances and rewrite it.
43764  # Note: m4 eats our [], so we need to use [ and ] instead.
43765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43766  if test "x$has_forbidden_chars" != x; then
43767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43771      # Going to short mode and back again did indeed matter. Since short mode is
43772      # case insensitive, let's make it lowercase to improve readability.
43773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43774      # Now convert it back to Unix-stile (cygpath)
43775      input_path=`$CYGPATH -u "$shortmode_path"`
43776      new_path="$input_path"
43777    fi
43778  fi
43779
43780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43781  if test "x$test_cygdrive_prefix" = x; then
43782    # As a simple fix, exclude /usr/bin since it's not a real path.
43783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43785      # a path prefixed by /cygdrive for fixpath to work.
43786      new_path="$CYGWIN_ROOT_PATH$input_path"
43787    fi
43788  fi
43789
43790
43791  if test "x$path" != "x$new_path"; then
43792    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43795  fi
43796
43797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43798
43799  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43800  has_colon=`$ECHO $path | $GREP ^.:`
43801  new_path="$path"
43802  if test "x$has_colon" = x; then
43803    # Not in mixed or Windows style, start by that.
43804    new_path=`cmd //c echo $path`
43805  fi
43806
43807
43808  input_path="$new_path"
43809  # Check if we need to convert this using DOS-style short mode. If the path
43810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43811  # take no chances and rewrite it.
43812  # Note: m4 eats our [], so we need to use [ and ] instead.
43813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43814  if test "x$has_forbidden_chars" != x; then
43815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43817  fi
43818
43819
43820  windows_path="$new_path"
43821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43822    unix_path=`$CYGPATH -u "$windows_path"`
43823    new_path="$unix_path"
43824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43826    new_path="$unix_path"
43827  fi
43828
43829  if test "x$path" != "x$new_path"; then
43830    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43832$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43833  fi
43834
43835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43837
43838  else
43839    # We're on a posix platform. Hooray! :)
43840    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43841    has_space=`$ECHO "$path" | $GREP " "`
43842    if test "x$has_space" != x; then
43843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43845      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43846    fi
43847
43848    # Use eval to expand a potential ~
43849    eval path="$path"
43850    if test ! -f "$path" && test ! -d "$path"; then
43851      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43852    fi
43853
43854    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43855  fi
43856
43857
43858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43859
43860  # Input might be given as Windows format, start by converting to
43861  # unix format.
43862  path="$POTENTIAL_FREETYPE_LIB_PATH"
43863  new_path=`$CYGPATH -u "$path"`
43864
43865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43868  # "foo.exe" is OK but "foo" is an error.
43869  #
43870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43871  # It is also a way to make sure we got the proper file name for the real test later on.
43872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43873  if test "x$test_shortpath" = x; then
43874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43875$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43876    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43877  fi
43878
43879  # Call helper function which possibly converts this using DOS-style short mode.
43880  # If so, the updated path is stored in $new_path.
43881
43882  input_path="$new_path"
43883  # Check if we need to convert this using DOS-style short mode. If the path
43884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43885  # take no chances and rewrite it.
43886  # Note: m4 eats our [], so we need to use [ and ] instead.
43887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43888  if test "x$has_forbidden_chars" != x; then
43889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43893      # Going to short mode and back again did indeed matter. Since short mode is
43894      # case insensitive, let's make it lowercase to improve readability.
43895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43896      # Now convert it back to Unix-stile (cygpath)
43897      input_path=`$CYGPATH -u "$shortmode_path"`
43898      new_path="$input_path"
43899    fi
43900  fi
43901
43902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43903  if test "x$test_cygdrive_prefix" = x; then
43904    # As a simple fix, exclude /usr/bin since it's not a real path.
43905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43907      # a path prefixed by /cygdrive for fixpath to work.
43908      new_path="$CYGWIN_ROOT_PATH$input_path"
43909    fi
43910  fi
43911
43912
43913  if test "x$path" != "x$new_path"; then
43914    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43916$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43917  fi
43918
43919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43920
43921  path="$POTENTIAL_FREETYPE_LIB_PATH"
43922  has_colon=`$ECHO $path | $GREP ^.:`
43923  new_path="$path"
43924  if test "x$has_colon" = x; then
43925    # Not in mixed or Windows style, start by that.
43926    new_path=`cmd //c echo $path`
43927  fi
43928
43929
43930  input_path="$new_path"
43931  # Check if we need to convert this using DOS-style short mode. If the path
43932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43933  # take no chances and rewrite it.
43934  # Note: m4 eats our [], so we need to use [ and ] instead.
43935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43936  if test "x$has_forbidden_chars" != x; then
43937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43939  fi
43940
43941
43942  windows_path="$new_path"
43943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43944    unix_path=`$CYGPATH -u "$windows_path"`
43945    new_path="$unix_path"
43946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43948    new_path="$unix_path"
43949  fi
43950
43951  if test "x$path" != "x$new_path"; then
43952    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43955  fi
43956
43957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43959
43960  else
43961    # We're on a posix platform. Hooray! :)
43962    path="$POTENTIAL_FREETYPE_LIB_PATH"
43963    has_space=`$ECHO "$path" | $GREP " "`
43964    if test "x$has_space" != x; then
43965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43966$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43967      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43968    fi
43969
43970    # Use eval to expand a potential ~
43971    eval path="$path"
43972    if test ! -f "$path" && test ! -d "$path"; then
43973      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43974    fi
43975
43976    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43977  fi
43978
43979
43980    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43982$as_echo_n "checking for freetype includes... " >&6; }
43983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43984$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43985    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43987$as_echo_n "checking for freetype libraries... " >&6; }
43988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43989$as_echo "$FREETYPE_LIB_PATH" >&6; }
43990  fi
43991
43992        if test "x$FOUND_FREETYPE" != xyes; then
43993          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43994        fi
43995      else
43996        # User specified only one of lib or include. This is an error.
43997        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43998          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43999$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44000          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44001        else
44002          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44003$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44004          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44005        fi
44006      fi
44007    else
44008      # User did not specify settings, but we need freetype. Try to locate it.
44009
44010      if test "x$BUNDLE_FREETYPE" = x; then
44011        # If not specified, default is to bundle freetype only on windows
44012        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44013          BUNDLE_FREETYPE=yes
44014        else
44015          BUNDLE_FREETYPE=no
44016        fi
44017      fi
44018
44019      if test "x$FOUND_FREETYPE" != xyes; then
44020        # Check builddeps
44021
44022
44023  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44024    # Source the builddeps file again, to make sure it uses the latest variables!
44025    . $builddepsfile
44026    # Look for a target and build machine specific resource!
44027    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44028    if test "x$resource" = x; then
44029      # Ok, lets instead look for a target specific resource
44030      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44031    fi
44032    if test "x$resource" = x; then
44033      # Ok, lets instead look for a build specific resource
44034      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44035    fi
44036    if test "x$resource" = x; then
44037      # Ok, lets instead look for a generic resource
44038      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44039      resource=${builddep_freetype2}
44040    fi
44041    if test "x$resource" != x; then
44042      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44043$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44044      # If the resource in the builddeps.conf file is an existing directory,
44045      # for example /java/linux/cups
44046      if test -d ${resource}; then
44047        depdir=${resource}
44048      else
44049
44050  # freetype2 is for example mymodule
44051  # $resource is for example libs/general/libmymod_1_2_3.zip
44052  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44053  # $with_builddeps_dir is for example /localhome/builddeps
44054  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44055  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44056  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44057  filename=`basename $resource`
44058  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44059  filebase=${filename%%.*}
44060  extension=${filename#*.}
44061  installdir=$with_builddeps_dir/$filebase
44062  if test ! -f $installdir/$filename.unpacked; then
44063    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44064$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44065    if test ! -d $installdir; then
44066      mkdir -p $installdir
44067    fi
44068    if test ! -d $installdir; then
44069      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44070    fi
44071    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44072    touch $tmpfile
44073    if test ! -f $tmpfile; then
44074      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44075    fi
44076
44077  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44078  # $tmpfile is the local file name for the downloaded file.
44079  VALID_TOOL=no
44080  if test "x$BDEPS_FTP" = xwget; then
44081    VALID_TOOL=yes
44082    wget -O $tmpfile $with_builddeps_server/$resource
44083  fi
44084  if test "x$BDEPS_FTP" = xlftp; then
44085    VALID_TOOL=yes
44086    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44087  fi
44088  if test "x$BDEPS_FTP" = xftp; then
44089    VALID_TOOL=yes
44090    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44091    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44092    FTPUSERPWD=${FTPSERVER%%@*}
44093    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44094      FTPUSER=${userpwd%%:*}
44095      FTPPWD=${userpwd#*@}
44096      FTPSERVER=${FTPSERVER#*@}
44097    else
44098      FTPUSER=ftp
44099      FTPPWD=ftp
44100    fi
44101    # the "pass" command does not work on some
44102    # ftp clients (read ftp.exe) but if it works,
44103    # passive mode is better!
44104    ( \
44105        echo "user $FTPUSER $FTPPWD"        ; \
44106        echo "pass"                         ; \
44107        echo "bin"                          ; \
44108        echo "get $FTPPATH $tmpfile"              ; \
44109    ) | ftp -in $FTPSERVER
44110  fi
44111  if test "x$VALID_TOOL" != xyes; then
44112    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44113  fi
44114
44115    mv $tmpfile $installdir/$filename
44116    if test ! -s $installdir/$filename; then
44117      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44118    fi
44119    case "$extension" in
44120      zip)  echo "Unzipping $installdir/$filename..."
44121        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44122        ;;
44123      tar.gz) echo "Untaring $installdir/$filename..."
44124        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44125        ;;
44126      tgz) echo "Untaring $installdir/$filename..."
44127        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44128        ;;
44129      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44130        ;;
44131    esac
44132  fi
44133  if test -f $installdir/$filename.unpacked; then
44134    depdir=$installdir
44135  fi
44136
44137      fi
44138      # Source the builddeps file again, because in the previous command, the depdir
44139      # was updated to point at the current build dependency install directory.
44140      . $builddepsfile
44141      # Now extract variables from the builddeps.conf files.
44142      theroot=${builddep_freetype2_ROOT}
44143      thecflags=${builddep_freetype2_CFLAGS}
44144      thelibs=${builddep_freetype2_LIBS}
44145      if test "x$depdir" = x; then
44146        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44147      fi
44148      FREETYPE=$depdir
44149      if test "x$theroot" != x; then
44150        FREETYPE="$theroot"
44151      fi
44152      if test "x$thecflags" != x; then
44153        FREETYPE_CFLAGS="$thecflags"
44154      fi
44155      if test "x$thelibs" != x; then
44156        FREETYPE_LIBS="$thelibs"
44157      fi
44158      FOUND_FREETYPE=yes
44159      else FOUND_FREETYPE=no
44160
44161    fi
44162    else FOUND_FREETYPE=no
44163
44164  fi
44165
44166        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44167        if test "x$FOUND_FREETYPE" = xyes; then
44168          if test "x$BUNDLE_FREETYPE" = xyes; then
44169            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44170$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44171            FOUND_FREETYPE=no
44172          else
44173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44174$as_echo_n "checking for freetype... " >&6; }
44175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44176$as_echo "yes (using builddeps)" >&6; }
44177          fi
44178        fi
44179      fi
44180
44181      if test "x$FOUND_FREETYPE" != xyes; then
44182        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44183        if test "x$PKG_CONFIG" != x; then
44184
44185pkg_failed=no
44186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44187$as_echo_n "checking for FREETYPE... " >&6; }
44188
44189if test -n "$FREETYPE_CFLAGS"; then
44190    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44191 elif test -n "$PKG_CONFIG"; then
44192    if test -n "$PKG_CONFIG" && \
44193    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44194  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44195  ac_status=$?
44196  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44197  test $ac_status = 0; }; then
44198  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44199else
44200  pkg_failed=yes
44201fi
44202 else
44203    pkg_failed=untried
44204fi
44205if test -n "$FREETYPE_LIBS"; then
44206    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44207 elif test -n "$PKG_CONFIG"; then
44208    if test -n "$PKG_CONFIG" && \
44209    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44210  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44211  ac_status=$?
44212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44213  test $ac_status = 0; }; then
44214  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44215else
44216  pkg_failed=yes
44217fi
44218 else
44219    pkg_failed=untried
44220fi
44221
44222
44223
44224if test $pkg_failed = yes; then
44225
44226if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44227        _pkg_short_errors_supported=yes
44228else
44229        _pkg_short_errors_supported=no
44230fi
44231        if test $_pkg_short_errors_supported = yes; then
44232	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44233        else
44234	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44235        fi
44236	# Put the nasty error message in config.log where it belongs
44237	echo "$FREETYPE_PKG_ERRORS" >&5
44238
44239	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44240$as_echo "no" >&6; }
44241                FOUND_FREETYPE=no
44242elif test $pkg_failed = untried; then
44243	FOUND_FREETYPE=no
44244else
44245	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44246	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44248$as_echo "yes" >&6; }
44249	FOUND_FREETYPE=yes
44250fi
44251          if test "x$FOUND_FREETYPE" = xyes; then
44252            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44253            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44254            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44255            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44256              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44257            fi
44258            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44259            if test "x$BUNDLE_FREETYPE" = xyes; then
44260              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44261$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44262              FOUND_FREETYPE=no
44263            else
44264              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44265$as_echo_n "checking for freetype... " >&6; }
44266              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44267$as_echo "yes (using pkg-config)" >&6; }
44268            fi
44269          fi
44270        fi
44271      fi
44272
44273      if test "x$FOUND_FREETYPE" != xyes; then
44274        # Check in well-known locations
44275        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44276          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44277
44278  windows_path="$FREETYPE_BASE_DIR"
44279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44280    unix_path=`$CYGPATH -u "$windows_path"`
44281    FREETYPE_BASE_DIR="$unix_path"
44282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44284    FREETYPE_BASE_DIR="$unix_path"
44285  fi
44286
44287
44288  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44289  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44290  METHOD="well-known location"
44291
44292  # First check if the files exists.
44293  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44294    # We found an arbitrary include file. That's a good sign.
44295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44296$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44297    FOUND_FREETYPE=yes
44298
44299    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44300    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44301      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44303      FOUND_FREETYPE=no
44304    else
44305      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44306        # On Windows, we will need both .lib and .dll file.
44307        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44308          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44309$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44310          FOUND_FREETYPE=no
44311        fi
44312      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
44313        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44314        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44315      fi
44316    fi
44317  fi
44318
44319  if test "x$FOUND_FREETYPE" = xyes; then
44320
44321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44322
44323  # Input might be given as Windows format, start by converting to
44324  # unix format.
44325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44326  new_path=`$CYGPATH -u "$path"`
44327
44328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44331  # "foo.exe" is OK but "foo" is an error.
44332  #
44333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44334  # It is also a way to make sure we got the proper file name for the real test later on.
44335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44336  if test "x$test_shortpath" = x; then
44337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44338$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44339    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44340  fi
44341
44342  # Call helper function which possibly converts this using DOS-style short mode.
44343  # If so, the updated path is stored in $new_path.
44344
44345  input_path="$new_path"
44346  # Check if we need to convert this using DOS-style short mode. If the path
44347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44348  # take no chances and rewrite it.
44349  # Note: m4 eats our [], so we need to use [ and ] instead.
44350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44351  if test "x$has_forbidden_chars" != x; then
44352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44356      # Going to short mode and back again did indeed matter. Since short mode is
44357      # case insensitive, let's make it lowercase to improve readability.
44358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44359      # Now convert it back to Unix-stile (cygpath)
44360      input_path=`$CYGPATH -u "$shortmode_path"`
44361      new_path="$input_path"
44362    fi
44363  fi
44364
44365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44366  if test "x$test_cygdrive_prefix" = x; then
44367    # As a simple fix, exclude /usr/bin since it's not a real path.
44368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44370      # a path prefixed by /cygdrive for fixpath to work.
44371      new_path="$CYGWIN_ROOT_PATH$input_path"
44372    fi
44373  fi
44374
44375
44376  if test "x$path" != "x$new_path"; then
44377    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44380  fi
44381
44382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44383
44384  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44385  has_colon=`$ECHO $path | $GREP ^.:`
44386  new_path="$path"
44387  if test "x$has_colon" = x; then
44388    # Not in mixed or Windows style, start by that.
44389    new_path=`cmd //c echo $path`
44390  fi
44391
44392
44393  input_path="$new_path"
44394  # Check if we need to convert this using DOS-style short mode. If the path
44395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44396  # take no chances and rewrite it.
44397  # Note: m4 eats our [], so we need to use [ and ] instead.
44398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44399  if test "x$has_forbidden_chars" != x; then
44400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44402  fi
44403
44404
44405  windows_path="$new_path"
44406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44407    unix_path=`$CYGPATH -u "$windows_path"`
44408    new_path="$unix_path"
44409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44411    new_path="$unix_path"
44412  fi
44413
44414  if test "x$path" != "x$new_path"; then
44415    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44418  fi
44419
44420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44422
44423  else
44424    # We're on a posix platform. Hooray! :)
44425    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44426    has_space=`$ECHO "$path" | $GREP " "`
44427    if test "x$has_space" != x; then
44428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44429$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44431    fi
44432
44433    # Use eval to expand a potential ~
44434    eval path="$path"
44435    if test ! -f "$path" && test ! -d "$path"; then
44436      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44437    fi
44438
44439    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44440  fi
44441
44442
44443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44444
44445  # Input might be given as Windows format, start by converting to
44446  # unix format.
44447  path="$POTENTIAL_FREETYPE_LIB_PATH"
44448  new_path=`$CYGPATH -u "$path"`
44449
44450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44453  # "foo.exe" is OK but "foo" is an error.
44454  #
44455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44456  # It is also a way to make sure we got the proper file name for the real test later on.
44457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44458  if test "x$test_shortpath" = x; then
44459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44462  fi
44463
44464  # Call helper function which possibly converts this using DOS-style short mode.
44465  # If so, the updated path is stored in $new_path.
44466
44467  input_path="$new_path"
44468  # Check if we need to convert this using DOS-style short mode. If the path
44469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44470  # take no chances and rewrite it.
44471  # Note: m4 eats our [], so we need to use [ and ] instead.
44472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44473  if test "x$has_forbidden_chars" != x; then
44474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44478      # Going to short mode and back again did indeed matter. Since short mode is
44479      # case insensitive, let's make it lowercase to improve readability.
44480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44481      # Now convert it back to Unix-stile (cygpath)
44482      input_path=`$CYGPATH -u "$shortmode_path"`
44483      new_path="$input_path"
44484    fi
44485  fi
44486
44487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44488  if test "x$test_cygdrive_prefix" = x; then
44489    # As a simple fix, exclude /usr/bin since it's not a real path.
44490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44492      # a path prefixed by /cygdrive for fixpath to work.
44493      new_path="$CYGWIN_ROOT_PATH$input_path"
44494    fi
44495  fi
44496
44497
44498  if test "x$path" != "x$new_path"; then
44499    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44502  fi
44503
44504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44505
44506  path="$POTENTIAL_FREETYPE_LIB_PATH"
44507  has_colon=`$ECHO $path | $GREP ^.:`
44508  new_path="$path"
44509  if test "x$has_colon" = x; then
44510    # Not in mixed or Windows style, start by that.
44511    new_path=`cmd //c echo $path`
44512  fi
44513
44514
44515  input_path="$new_path"
44516  # Check if we need to convert this using DOS-style short mode. If the path
44517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44518  # take no chances and rewrite it.
44519  # Note: m4 eats our [], so we need to use [ and ] instead.
44520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44521  if test "x$has_forbidden_chars" != x; then
44522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44524  fi
44525
44526
44527  windows_path="$new_path"
44528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44529    unix_path=`$CYGPATH -u "$windows_path"`
44530    new_path="$unix_path"
44531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44533    new_path="$unix_path"
44534  fi
44535
44536  if test "x$path" != "x$new_path"; then
44537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44540  fi
44541
44542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44544
44545  else
44546    # We're on a posix platform. Hooray! :)
44547    path="$POTENTIAL_FREETYPE_LIB_PATH"
44548    has_space=`$ECHO "$path" | $GREP " "`
44549    if test "x$has_space" != x; then
44550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44552      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44553    fi
44554
44555    # Use eval to expand a potential ~
44556    eval path="$path"
44557    if test ! -f "$path" && test ! -d "$path"; then
44558      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44559    fi
44560
44561    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44562  fi
44563
44564
44565    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44567$as_echo_n "checking for freetype includes... " >&6; }
44568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44569$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44570    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44572$as_echo_n "checking for freetype libraries... " >&6; }
44573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44574$as_echo "$FREETYPE_LIB_PATH" >&6; }
44575  fi
44576
44577          if test "x$FOUND_FREETYPE" != xyes; then
44578            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44579
44580  windows_path="$FREETYPE_BASE_DIR"
44581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44582    unix_path=`$CYGPATH -u "$windows_path"`
44583    FREETYPE_BASE_DIR="$unix_path"
44584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44586    FREETYPE_BASE_DIR="$unix_path"
44587  fi
44588
44589
44590  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44591  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44592  METHOD="well-known location"
44593
44594  # First check if the files exists.
44595  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44596    # We found an arbitrary include file. That's a good sign.
44597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44598$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44599    FOUND_FREETYPE=yes
44600
44601    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44602    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44603      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44604$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44605      FOUND_FREETYPE=no
44606    else
44607      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44608        # On Windows, we will need both .lib and .dll file.
44609        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44610          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44612          FOUND_FREETYPE=no
44613        fi
44614      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
44615        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44616        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44617      fi
44618    fi
44619  fi
44620
44621  if test "x$FOUND_FREETYPE" = xyes; then
44622
44623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44624
44625  # Input might be given as Windows format, start by converting to
44626  # unix format.
44627  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44628  new_path=`$CYGPATH -u "$path"`
44629
44630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44633  # "foo.exe" is OK but "foo" is an error.
44634  #
44635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44636  # It is also a way to make sure we got the proper file name for the real test later on.
44637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44638  if test "x$test_shortpath" = x; then
44639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44642  fi
44643
44644  # Call helper function which possibly converts this using DOS-style short mode.
44645  # If so, the updated path is stored in $new_path.
44646
44647  input_path="$new_path"
44648  # Check if we need to convert this using DOS-style short mode. If the path
44649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44650  # take no chances and rewrite it.
44651  # Note: m4 eats our [], so we need to use [ and ] instead.
44652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44653  if test "x$has_forbidden_chars" != x; then
44654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44658      # Going to short mode and back again did indeed matter. Since short mode is
44659      # case insensitive, let's make it lowercase to improve readability.
44660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44661      # Now convert it back to Unix-stile (cygpath)
44662      input_path=`$CYGPATH -u "$shortmode_path"`
44663      new_path="$input_path"
44664    fi
44665  fi
44666
44667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44668  if test "x$test_cygdrive_prefix" = x; then
44669    # As a simple fix, exclude /usr/bin since it's not a real path.
44670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44672      # a path prefixed by /cygdrive for fixpath to work.
44673      new_path="$CYGWIN_ROOT_PATH$input_path"
44674    fi
44675  fi
44676
44677
44678  if test "x$path" != "x$new_path"; then
44679    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44682  fi
44683
44684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44685
44686  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44687  has_colon=`$ECHO $path | $GREP ^.:`
44688  new_path="$path"
44689  if test "x$has_colon" = x; then
44690    # Not in mixed or Windows style, start by that.
44691    new_path=`cmd //c echo $path`
44692  fi
44693
44694
44695  input_path="$new_path"
44696  # Check if we need to convert this using DOS-style short mode. If the path
44697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44698  # take no chances and rewrite it.
44699  # Note: m4 eats our [], so we need to use [ and ] instead.
44700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44701  if test "x$has_forbidden_chars" != x; then
44702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44704  fi
44705
44706
44707  windows_path="$new_path"
44708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44709    unix_path=`$CYGPATH -u "$windows_path"`
44710    new_path="$unix_path"
44711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44713    new_path="$unix_path"
44714  fi
44715
44716  if test "x$path" != "x$new_path"; then
44717    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44720  fi
44721
44722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44724
44725  else
44726    # We're on a posix platform. Hooray! :)
44727    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44728    has_space=`$ECHO "$path" | $GREP " "`
44729    if test "x$has_space" != x; then
44730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44733    fi
44734
44735    # Use eval to expand a potential ~
44736    eval path="$path"
44737    if test ! -f "$path" && test ! -d "$path"; then
44738      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44739    fi
44740
44741    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44742  fi
44743
44744
44745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746
44747  # Input might be given as Windows format, start by converting to
44748  # unix format.
44749  path="$POTENTIAL_FREETYPE_LIB_PATH"
44750  new_path=`$CYGPATH -u "$path"`
44751
44752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44755  # "foo.exe" is OK but "foo" is an error.
44756  #
44757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44758  # It is also a way to make sure we got the proper file name for the real test later on.
44759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44760  if test "x$test_shortpath" = x; then
44761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44763    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44764  fi
44765
44766  # Call helper function which possibly converts this using DOS-style short mode.
44767  # If so, the updated path is stored in $new_path.
44768
44769  input_path="$new_path"
44770  # Check if we need to convert this using DOS-style short mode. If the path
44771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44772  # take no chances and rewrite it.
44773  # Note: m4 eats our [], so we need to use [ and ] instead.
44774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44775  if test "x$has_forbidden_chars" != x; then
44776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44780      # Going to short mode and back again did indeed matter. Since short mode is
44781      # case insensitive, let's make it lowercase to improve readability.
44782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44783      # Now convert it back to Unix-stile (cygpath)
44784      input_path=`$CYGPATH -u "$shortmode_path"`
44785      new_path="$input_path"
44786    fi
44787  fi
44788
44789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44790  if test "x$test_cygdrive_prefix" = x; then
44791    # As a simple fix, exclude /usr/bin since it's not a real path.
44792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44794      # a path prefixed by /cygdrive for fixpath to work.
44795      new_path="$CYGWIN_ROOT_PATH$input_path"
44796    fi
44797  fi
44798
44799
44800  if test "x$path" != "x$new_path"; then
44801    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44804  fi
44805
44806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44807
44808  path="$POTENTIAL_FREETYPE_LIB_PATH"
44809  has_colon=`$ECHO $path | $GREP ^.:`
44810  new_path="$path"
44811  if test "x$has_colon" = x; then
44812    # Not in mixed or Windows style, start by that.
44813    new_path=`cmd //c echo $path`
44814  fi
44815
44816
44817  input_path="$new_path"
44818  # Check if we need to convert this using DOS-style short mode. If the path
44819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44820  # take no chances and rewrite it.
44821  # Note: m4 eats our [], so we need to use [ and ] instead.
44822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44823  if test "x$has_forbidden_chars" != x; then
44824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826  fi
44827
44828
44829  windows_path="$new_path"
44830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44831    unix_path=`$CYGPATH -u "$windows_path"`
44832    new_path="$unix_path"
44833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44835    new_path="$unix_path"
44836  fi
44837
44838  if test "x$path" != "x$new_path"; then
44839    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44841$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44842  fi
44843
44844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44846
44847  else
44848    # We're on a posix platform. Hooray! :)
44849    path="$POTENTIAL_FREETYPE_LIB_PATH"
44850    has_space=`$ECHO "$path" | $GREP " "`
44851    if test "x$has_space" != x; then
44852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44854      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44855    fi
44856
44857    # Use eval to expand a potential ~
44858    eval path="$path"
44859    if test ! -f "$path" && test ! -d "$path"; then
44860      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44861    fi
44862
44863    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44864  fi
44865
44866
44867    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44869$as_echo_n "checking for freetype includes... " >&6; }
44870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44871$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44872    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44874$as_echo_n "checking for freetype libraries... " >&6; }
44875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44876$as_echo "$FREETYPE_LIB_PATH" >&6; }
44877  fi
44878
44879          fi
44880        else
44881          if test "x$SYS_ROOT" = "x/"; then
44882            FREETYPE_ROOT=
44883          else
44884            FREETYPE_ROOT="$SYS_ROOT"
44885          fi
44886          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44887
44888  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44889  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44890  METHOD="well-known location"
44891
44892  # First check if the files exists.
44893  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44894    # We found an arbitrary include file. That's a good sign.
44895    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44896$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44897    FOUND_FREETYPE=yes
44898
44899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44901      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44903      FOUND_FREETYPE=no
44904    else
44905      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44906        # On Windows, we will need both .lib and .dll file.
44907        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44908          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44909$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44910          FOUND_FREETYPE=no
44911        fi
44912      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
44913        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44914        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44915      fi
44916    fi
44917  fi
44918
44919  if test "x$FOUND_FREETYPE" = xyes; then
44920
44921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44922
44923  # Input might be given as Windows format, start by converting to
44924  # unix format.
44925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44926  new_path=`$CYGPATH -u "$path"`
44927
44928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44931  # "foo.exe" is OK but "foo" is an error.
44932  #
44933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44934  # It is also a way to make sure we got the proper file name for the real test later on.
44935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44936  if test "x$test_shortpath" = x; then
44937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44939    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44940  fi
44941
44942  # Call helper function which possibly converts this using DOS-style short mode.
44943  # If so, the updated path is stored in $new_path.
44944
44945  input_path="$new_path"
44946  # Check if we need to convert this using DOS-style short mode. If the path
44947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44948  # take no chances and rewrite it.
44949  # Note: m4 eats our [], so we need to use [ and ] instead.
44950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44951  if test "x$has_forbidden_chars" != x; then
44952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44956      # Going to short mode and back again did indeed matter. Since short mode is
44957      # case insensitive, let's make it lowercase to improve readability.
44958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44959      # Now convert it back to Unix-stile (cygpath)
44960      input_path=`$CYGPATH -u "$shortmode_path"`
44961      new_path="$input_path"
44962    fi
44963  fi
44964
44965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44966  if test "x$test_cygdrive_prefix" = x; then
44967    # As a simple fix, exclude /usr/bin since it's not a real path.
44968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44970      # a path prefixed by /cygdrive for fixpath to work.
44971      new_path="$CYGWIN_ROOT_PATH$input_path"
44972    fi
44973  fi
44974
44975
44976  if test "x$path" != "x$new_path"; then
44977    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44980  fi
44981
44982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44983
44984  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44985  has_colon=`$ECHO $path | $GREP ^.:`
44986  new_path="$path"
44987  if test "x$has_colon" = x; then
44988    # Not in mixed or Windows style, start by that.
44989    new_path=`cmd //c echo $path`
44990  fi
44991
44992
44993  input_path="$new_path"
44994  # Check if we need to convert this using DOS-style short mode. If the path
44995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44996  # take no chances and rewrite it.
44997  # Note: m4 eats our [], so we need to use [ and ] instead.
44998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44999  if test "x$has_forbidden_chars" != x; then
45000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45002  fi
45003
45004
45005  windows_path="$new_path"
45006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45007    unix_path=`$CYGPATH -u "$windows_path"`
45008    new_path="$unix_path"
45009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45011    new_path="$unix_path"
45012  fi
45013
45014  if test "x$path" != "x$new_path"; then
45015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45018  fi
45019
45020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45022
45023  else
45024    # We're on a posix platform. Hooray! :)
45025    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45026    has_space=`$ECHO "$path" | $GREP " "`
45027    if test "x$has_space" != x; then
45028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45030      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45031    fi
45032
45033    # Use eval to expand a potential ~
45034    eval path="$path"
45035    if test ! -f "$path" && test ! -d "$path"; then
45036      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45037    fi
45038
45039    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45040  fi
45041
45042
45043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45044
45045  # Input might be given as Windows format, start by converting to
45046  # unix format.
45047  path="$POTENTIAL_FREETYPE_LIB_PATH"
45048  new_path=`$CYGPATH -u "$path"`
45049
45050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45053  # "foo.exe" is OK but "foo" is an error.
45054  #
45055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45056  # It is also a way to make sure we got the proper file name for the real test later on.
45057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45058  if test "x$test_shortpath" = x; then
45059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45062  fi
45063
45064  # Call helper function which possibly converts this using DOS-style short mode.
45065  # If so, the updated path is stored in $new_path.
45066
45067  input_path="$new_path"
45068  # Check if we need to convert this using DOS-style short mode. If the path
45069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45070  # take no chances and rewrite it.
45071  # Note: m4 eats our [], so we need to use [ and ] instead.
45072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45073  if test "x$has_forbidden_chars" != x; then
45074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45078      # Going to short mode and back again did indeed matter. Since short mode is
45079      # case insensitive, let's make it lowercase to improve readability.
45080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45081      # Now convert it back to Unix-stile (cygpath)
45082      input_path=`$CYGPATH -u "$shortmode_path"`
45083      new_path="$input_path"
45084    fi
45085  fi
45086
45087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45088  if test "x$test_cygdrive_prefix" = x; then
45089    # As a simple fix, exclude /usr/bin since it's not a real path.
45090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45092      # a path prefixed by /cygdrive for fixpath to work.
45093      new_path="$CYGWIN_ROOT_PATH$input_path"
45094    fi
45095  fi
45096
45097
45098  if test "x$path" != "x$new_path"; then
45099    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45102  fi
45103
45104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45105
45106  path="$POTENTIAL_FREETYPE_LIB_PATH"
45107  has_colon=`$ECHO $path | $GREP ^.:`
45108  new_path="$path"
45109  if test "x$has_colon" = x; then
45110    # Not in mixed or Windows style, start by that.
45111    new_path=`cmd //c echo $path`
45112  fi
45113
45114
45115  input_path="$new_path"
45116  # Check if we need to convert this using DOS-style short mode. If the path
45117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45118  # take no chances and rewrite it.
45119  # Note: m4 eats our [], so we need to use [ and ] instead.
45120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45121  if test "x$has_forbidden_chars" != x; then
45122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45124  fi
45125
45126
45127  windows_path="$new_path"
45128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45129    unix_path=`$CYGPATH -u "$windows_path"`
45130    new_path="$unix_path"
45131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45133    new_path="$unix_path"
45134  fi
45135
45136  if test "x$path" != "x$new_path"; then
45137    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45140  fi
45141
45142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45144
45145  else
45146    # We're on a posix platform. Hooray! :)
45147    path="$POTENTIAL_FREETYPE_LIB_PATH"
45148    has_space=`$ECHO "$path" | $GREP " "`
45149    if test "x$has_space" != x; then
45150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45153    fi
45154
45155    # Use eval to expand a potential ~
45156    eval path="$path"
45157    if test ! -f "$path" && test ! -d "$path"; then
45158      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45159    fi
45160
45161    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45162  fi
45163
45164
45165    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45167$as_echo_n "checking for freetype includes... " >&6; }
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45169$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45170    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45172$as_echo_n "checking for freetype libraries... " >&6; }
45173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45174$as_echo "$FREETYPE_LIB_PATH" >&6; }
45175  fi
45176
45177
45178          if test "x$FOUND_FREETYPE" != xyes; then
45179            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
45180
45181  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45182  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45183  METHOD="well-known location"
45184
45185  # First check if the files exists.
45186  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45187    # We found an arbitrary include file. That's a good sign.
45188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45189$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45190    FOUND_FREETYPE=yes
45191
45192    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45193    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45194      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45196      FOUND_FREETYPE=no
45197    else
45198      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45199        # On Windows, we will need both .lib and .dll file.
45200        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45202$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45203          FOUND_FREETYPE=no
45204        fi
45205      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
45206        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45207        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45208      fi
45209    fi
45210  fi
45211
45212  if test "x$FOUND_FREETYPE" = xyes; then
45213
45214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45215
45216  # Input might be given as Windows format, start by converting to
45217  # unix format.
45218  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45219  new_path=`$CYGPATH -u "$path"`
45220
45221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45224  # "foo.exe" is OK but "foo" is an error.
45225  #
45226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45227  # It is also a way to make sure we got the proper file name for the real test later on.
45228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45229  if test "x$test_shortpath" = x; then
45230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45232    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45233  fi
45234
45235  # Call helper function which possibly converts this using DOS-style short mode.
45236  # If so, the updated path is stored in $new_path.
45237
45238  input_path="$new_path"
45239  # Check if we need to convert this using DOS-style short mode. If the path
45240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45241  # take no chances and rewrite it.
45242  # Note: m4 eats our [], so we need to use [ and ] instead.
45243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45244  if test "x$has_forbidden_chars" != x; then
45245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45249      # Going to short mode and back again did indeed matter. Since short mode is
45250      # case insensitive, let's make it lowercase to improve readability.
45251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45252      # Now convert it back to Unix-stile (cygpath)
45253      input_path=`$CYGPATH -u "$shortmode_path"`
45254      new_path="$input_path"
45255    fi
45256  fi
45257
45258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45259  if test "x$test_cygdrive_prefix" = x; then
45260    # As a simple fix, exclude /usr/bin since it's not a real path.
45261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45263      # a path prefixed by /cygdrive for fixpath to work.
45264      new_path="$CYGWIN_ROOT_PATH$input_path"
45265    fi
45266  fi
45267
45268
45269  if test "x$path" != "x$new_path"; then
45270    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45273  fi
45274
45275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45276
45277  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45278  has_colon=`$ECHO $path | $GREP ^.:`
45279  new_path="$path"
45280  if test "x$has_colon" = x; then
45281    # Not in mixed or Windows style, start by that.
45282    new_path=`cmd //c echo $path`
45283  fi
45284
45285
45286  input_path="$new_path"
45287  # Check if we need to convert this using DOS-style short mode. If the path
45288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45289  # take no chances and rewrite it.
45290  # Note: m4 eats our [], so we need to use [ and ] instead.
45291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45292  if test "x$has_forbidden_chars" != x; then
45293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45295  fi
45296
45297
45298  windows_path="$new_path"
45299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45300    unix_path=`$CYGPATH -u "$windows_path"`
45301    new_path="$unix_path"
45302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45304    new_path="$unix_path"
45305  fi
45306
45307  if test "x$path" != "x$new_path"; then
45308    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45311  fi
45312
45313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45315
45316  else
45317    # We're on a posix platform. Hooray! :)
45318    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45319    has_space=`$ECHO "$path" | $GREP " "`
45320    if test "x$has_space" != x; then
45321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45324    fi
45325
45326    # Use eval to expand a potential ~
45327    eval path="$path"
45328    if test ! -f "$path" && test ! -d "$path"; then
45329      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45330    fi
45331
45332    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45333  fi
45334
45335
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337
45338  # Input might be given as Windows format, start by converting to
45339  # unix format.
45340  path="$POTENTIAL_FREETYPE_LIB_PATH"
45341  new_path=`$CYGPATH -u "$path"`
45342
45343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45346  # "foo.exe" is OK but "foo" is an error.
45347  #
45348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45349  # It is also a way to make sure we got the proper file name for the real test later on.
45350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45351  if test "x$test_shortpath" = x; then
45352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45355  fi
45356
45357  # Call helper function which possibly converts this using DOS-style short mode.
45358  # If so, the updated path is stored in $new_path.
45359
45360  input_path="$new_path"
45361  # Check if we need to convert this using DOS-style short mode. If the path
45362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45363  # take no chances and rewrite it.
45364  # Note: m4 eats our [], so we need to use [ and ] instead.
45365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45366  if test "x$has_forbidden_chars" != x; then
45367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45371      # Going to short mode and back again did indeed matter. Since short mode is
45372      # case insensitive, let's make it lowercase to improve readability.
45373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45374      # Now convert it back to Unix-stile (cygpath)
45375      input_path=`$CYGPATH -u "$shortmode_path"`
45376      new_path="$input_path"
45377    fi
45378  fi
45379
45380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45381  if test "x$test_cygdrive_prefix" = x; then
45382    # As a simple fix, exclude /usr/bin since it's not a real path.
45383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45385      # a path prefixed by /cygdrive for fixpath to work.
45386      new_path="$CYGWIN_ROOT_PATH$input_path"
45387    fi
45388  fi
45389
45390
45391  if test "x$path" != "x$new_path"; then
45392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45395  fi
45396
45397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45398
45399  path="$POTENTIAL_FREETYPE_LIB_PATH"
45400  has_colon=`$ECHO $path | $GREP ^.:`
45401  new_path="$path"
45402  if test "x$has_colon" = x; then
45403    # Not in mixed or Windows style, start by that.
45404    new_path=`cmd //c echo $path`
45405  fi
45406
45407
45408  input_path="$new_path"
45409  # Check if we need to convert this using DOS-style short mode. If the path
45410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45411  # take no chances and rewrite it.
45412  # Note: m4 eats our [], so we need to use [ and ] instead.
45413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45414  if test "x$has_forbidden_chars" != x; then
45415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45417  fi
45418
45419
45420  windows_path="$new_path"
45421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45422    unix_path=`$CYGPATH -u "$windows_path"`
45423    new_path="$unix_path"
45424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45426    new_path="$unix_path"
45427  fi
45428
45429  if test "x$path" != "x$new_path"; then
45430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45433  fi
45434
45435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45437
45438  else
45439    # We're on a posix platform. Hooray! :)
45440    path="$POTENTIAL_FREETYPE_LIB_PATH"
45441    has_space=`$ECHO "$path" | $GREP " "`
45442    if test "x$has_space" != x; then
45443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45445      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45446    fi
45447
45448    # Use eval to expand a potential ~
45449    eval path="$path"
45450    if test ! -f "$path" && test ! -d "$path"; then
45451      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45452    fi
45453
45454    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45455  fi
45456
45457
45458    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45460$as_echo_n "checking for freetype includes... " >&6; }
45461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45462$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45463    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45465$as_echo_n "checking for freetype libraries... " >&6; }
45466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45467$as_echo "$FREETYPE_LIB_PATH" >&6; }
45468  fi
45469
45470          fi
45471
45472          if test "x$FOUND_FREETYPE" != xyes; then
45473            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45474            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45475
45476  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45477  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45478  METHOD="well-known location"
45479
45480  # First check if the files exists.
45481  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45482    # We found an arbitrary include file. That's a good sign.
45483    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45484$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45485    FOUND_FREETYPE=yes
45486
45487    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45488    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45489      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45491      FOUND_FREETYPE=no
45492    else
45493      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45494        # On Windows, we will need both .lib and .dll file.
45495        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45496          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45497$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45498          FOUND_FREETYPE=no
45499        fi
45500      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
45501        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45502        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45503      fi
45504    fi
45505  fi
45506
45507  if test "x$FOUND_FREETYPE" = xyes; then
45508
45509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45510
45511  # Input might be given as Windows format, start by converting to
45512  # unix format.
45513  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45514  new_path=`$CYGPATH -u "$path"`
45515
45516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45519  # "foo.exe" is OK but "foo" is an error.
45520  #
45521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45522  # It is also a way to make sure we got the proper file name for the real test later on.
45523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45524  if test "x$test_shortpath" = x; then
45525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45528  fi
45529
45530  # Call helper function which possibly converts this using DOS-style short mode.
45531  # If so, the updated path is stored in $new_path.
45532
45533  input_path="$new_path"
45534  # Check if we need to convert this using DOS-style short mode. If the path
45535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45536  # take no chances and rewrite it.
45537  # Note: m4 eats our [], so we need to use [ and ] instead.
45538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45539  if test "x$has_forbidden_chars" != x; then
45540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45544      # Going to short mode and back again did indeed matter. Since short mode is
45545      # case insensitive, let's make it lowercase to improve readability.
45546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45547      # Now convert it back to Unix-stile (cygpath)
45548      input_path=`$CYGPATH -u "$shortmode_path"`
45549      new_path="$input_path"
45550    fi
45551  fi
45552
45553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45554  if test "x$test_cygdrive_prefix" = x; then
45555    # As a simple fix, exclude /usr/bin since it's not a real path.
45556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45558      # a path prefixed by /cygdrive for fixpath to work.
45559      new_path="$CYGWIN_ROOT_PATH$input_path"
45560    fi
45561  fi
45562
45563
45564  if test "x$path" != "x$new_path"; then
45565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45568  fi
45569
45570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45571
45572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45573  has_colon=`$ECHO $path | $GREP ^.:`
45574  new_path="$path"
45575  if test "x$has_colon" = x; then
45576    # Not in mixed or Windows style, start by that.
45577    new_path=`cmd //c echo $path`
45578  fi
45579
45580
45581  input_path="$new_path"
45582  # Check if we need to convert this using DOS-style short mode. If the path
45583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45584  # take no chances and rewrite it.
45585  # Note: m4 eats our [], so we need to use [ and ] instead.
45586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45587  if test "x$has_forbidden_chars" != x; then
45588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45590  fi
45591
45592
45593  windows_path="$new_path"
45594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45595    unix_path=`$CYGPATH -u "$windows_path"`
45596    new_path="$unix_path"
45597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45599    new_path="$unix_path"
45600  fi
45601
45602  if test "x$path" != "x$new_path"; then
45603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45606  fi
45607
45608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45610
45611  else
45612    # We're on a posix platform. Hooray! :)
45613    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45614    has_space=`$ECHO "$path" | $GREP " "`
45615    if test "x$has_space" != x; then
45616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45618      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45619    fi
45620
45621    # Use eval to expand a potential ~
45622    eval path="$path"
45623    if test ! -f "$path" && test ! -d "$path"; then
45624      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45625    fi
45626
45627    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45628  fi
45629
45630
45631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45632
45633  # Input might be given as Windows format, start by converting to
45634  # unix format.
45635  path="$POTENTIAL_FREETYPE_LIB_PATH"
45636  new_path=`$CYGPATH -u "$path"`
45637
45638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45641  # "foo.exe" is OK but "foo" is an error.
45642  #
45643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45644  # It is also a way to make sure we got the proper file name for the real test later on.
45645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45646  if test "x$test_shortpath" = x; then
45647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45649    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45650  fi
45651
45652  # Call helper function which possibly converts this using DOS-style short mode.
45653  # If so, the updated path is stored in $new_path.
45654
45655  input_path="$new_path"
45656  # Check if we need to convert this using DOS-style short mode. If the path
45657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45658  # take no chances and rewrite it.
45659  # Note: m4 eats our [], so we need to use [ and ] instead.
45660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45661  if test "x$has_forbidden_chars" != x; then
45662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45666      # Going to short mode and back again did indeed matter. Since short mode is
45667      # case insensitive, let's make it lowercase to improve readability.
45668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45669      # Now convert it back to Unix-stile (cygpath)
45670      input_path=`$CYGPATH -u "$shortmode_path"`
45671      new_path="$input_path"
45672    fi
45673  fi
45674
45675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45676  if test "x$test_cygdrive_prefix" = x; then
45677    # As a simple fix, exclude /usr/bin since it's not a real path.
45678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45680      # a path prefixed by /cygdrive for fixpath to work.
45681      new_path="$CYGWIN_ROOT_PATH$input_path"
45682    fi
45683  fi
45684
45685
45686  if test "x$path" != "x$new_path"; then
45687    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45690  fi
45691
45692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45693
45694  path="$POTENTIAL_FREETYPE_LIB_PATH"
45695  has_colon=`$ECHO $path | $GREP ^.:`
45696  new_path="$path"
45697  if test "x$has_colon" = x; then
45698    # Not in mixed or Windows style, start by that.
45699    new_path=`cmd //c echo $path`
45700  fi
45701
45702
45703  input_path="$new_path"
45704  # Check if we need to convert this using DOS-style short mode. If the path
45705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45706  # take no chances and rewrite it.
45707  # Note: m4 eats our [], so we need to use [ and ] instead.
45708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45709  if test "x$has_forbidden_chars" != x; then
45710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45712  fi
45713
45714
45715  windows_path="$new_path"
45716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45717    unix_path=`$CYGPATH -u "$windows_path"`
45718    new_path="$unix_path"
45719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45721    new_path="$unix_path"
45722  fi
45723
45724  if test "x$path" != "x$new_path"; then
45725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45728  fi
45729
45730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45732
45733  else
45734    # We're on a posix platform. Hooray! :)
45735    path="$POTENTIAL_FREETYPE_LIB_PATH"
45736    has_space=`$ECHO "$path" | $GREP " "`
45737    if test "x$has_space" != x; then
45738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45740      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45741    fi
45742
45743    # Use eval to expand a potential ~
45744    eval path="$path"
45745    if test ! -f "$path" && test ! -d "$path"; then
45746      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45747    fi
45748
45749    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45750  fi
45751
45752
45753    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45755$as_echo_n "checking for freetype includes... " >&6; }
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45757$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45758    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45760$as_echo_n "checking for freetype libraries... " >&6; }
45761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45762$as_echo "$FREETYPE_LIB_PATH" >&6; }
45763  fi
45764
45765            else
45766
45767  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45768  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45769  METHOD="well-known location"
45770
45771  # First check if the files exists.
45772  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45773    # We found an arbitrary include file. That's a good sign.
45774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45775$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45776    FOUND_FREETYPE=yes
45777
45778    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45779    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45780      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45782      FOUND_FREETYPE=no
45783    else
45784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45785        # On Windows, we will need both .lib and .dll file.
45786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45789          FOUND_FREETYPE=no
45790        fi
45791      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
45792        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45793        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45794      fi
45795    fi
45796  fi
45797
45798  if test "x$FOUND_FREETYPE" = xyes; then
45799
45800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45801
45802  # Input might be given as Windows format, start by converting to
45803  # unix format.
45804  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45805  new_path=`$CYGPATH -u "$path"`
45806
45807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45810  # "foo.exe" is OK but "foo" is an error.
45811  #
45812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45813  # It is also a way to make sure we got the proper file name for the real test later on.
45814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45815  if test "x$test_shortpath" = x; then
45816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45817$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45818    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45819  fi
45820
45821  # Call helper function which possibly converts this using DOS-style short mode.
45822  # If so, the updated path is stored in $new_path.
45823
45824  input_path="$new_path"
45825  # Check if we need to convert this using DOS-style short mode. If the path
45826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45827  # take no chances and rewrite it.
45828  # Note: m4 eats our [], so we need to use [ and ] instead.
45829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45830  if test "x$has_forbidden_chars" != x; then
45831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45835      # Going to short mode and back again did indeed matter. Since short mode is
45836      # case insensitive, let's make it lowercase to improve readability.
45837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45838      # Now convert it back to Unix-stile (cygpath)
45839      input_path=`$CYGPATH -u "$shortmode_path"`
45840      new_path="$input_path"
45841    fi
45842  fi
45843
45844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45845  if test "x$test_cygdrive_prefix" = x; then
45846    # As a simple fix, exclude /usr/bin since it's not a real path.
45847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45849      # a path prefixed by /cygdrive for fixpath to work.
45850      new_path="$CYGWIN_ROOT_PATH$input_path"
45851    fi
45852  fi
45853
45854
45855  if test "x$path" != "x$new_path"; then
45856    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45858$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45859  fi
45860
45861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45862
45863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45864  has_colon=`$ECHO $path | $GREP ^.:`
45865  new_path="$path"
45866  if test "x$has_colon" = x; then
45867    # Not in mixed or Windows style, start by that.
45868    new_path=`cmd //c echo $path`
45869  fi
45870
45871
45872  input_path="$new_path"
45873  # Check if we need to convert this using DOS-style short mode. If the path
45874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45875  # take no chances and rewrite it.
45876  # Note: m4 eats our [], so we need to use [ and ] instead.
45877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45878  if test "x$has_forbidden_chars" != x; then
45879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45881  fi
45882
45883
45884  windows_path="$new_path"
45885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45886    unix_path=`$CYGPATH -u "$windows_path"`
45887    new_path="$unix_path"
45888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45890    new_path="$unix_path"
45891  fi
45892
45893  if test "x$path" != "x$new_path"; then
45894    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45897  fi
45898
45899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45901
45902  else
45903    # We're on a posix platform. Hooray! :)
45904    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45905    has_space=`$ECHO "$path" | $GREP " "`
45906    if test "x$has_space" != x; then
45907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45908$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45909      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45910    fi
45911
45912    # Use eval to expand a potential ~
45913    eval path="$path"
45914    if test ! -f "$path" && test ! -d "$path"; then
45915      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45916    fi
45917
45918    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45919  fi
45920
45921
45922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45923
45924  # Input might be given as Windows format, start by converting to
45925  # unix format.
45926  path="$POTENTIAL_FREETYPE_LIB_PATH"
45927  new_path=`$CYGPATH -u "$path"`
45928
45929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45932  # "foo.exe" is OK but "foo" is an error.
45933  #
45934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45935  # It is also a way to make sure we got the proper file name for the real test later on.
45936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45937  if test "x$test_shortpath" = x; then
45938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45940    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45941  fi
45942
45943  # Call helper function which possibly converts this using DOS-style short mode.
45944  # If so, the updated path is stored in $new_path.
45945
45946  input_path="$new_path"
45947  # Check if we need to convert this using DOS-style short mode. If the path
45948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45949  # take no chances and rewrite it.
45950  # Note: m4 eats our [], so we need to use [ and ] instead.
45951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45952  if test "x$has_forbidden_chars" != x; then
45953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45957      # Going to short mode and back again did indeed matter. Since short mode is
45958      # case insensitive, let's make it lowercase to improve readability.
45959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45960      # Now convert it back to Unix-stile (cygpath)
45961      input_path=`$CYGPATH -u "$shortmode_path"`
45962      new_path="$input_path"
45963    fi
45964  fi
45965
45966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45967  if test "x$test_cygdrive_prefix" = x; then
45968    # As a simple fix, exclude /usr/bin since it's not a real path.
45969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45971      # a path prefixed by /cygdrive for fixpath to work.
45972      new_path="$CYGWIN_ROOT_PATH$input_path"
45973    fi
45974  fi
45975
45976
45977  if test "x$path" != "x$new_path"; then
45978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45981  fi
45982
45983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45984
45985  path="$POTENTIAL_FREETYPE_LIB_PATH"
45986  has_colon=`$ECHO $path | $GREP ^.:`
45987  new_path="$path"
45988  if test "x$has_colon" = x; then
45989    # Not in mixed or Windows style, start by that.
45990    new_path=`cmd //c echo $path`
45991  fi
45992
45993
45994  input_path="$new_path"
45995  # Check if we need to convert this using DOS-style short mode. If the path
45996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45997  # take no chances and rewrite it.
45998  # Note: m4 eats our [], so we need to use [ and ] instead.
45999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46000  if test "x$has_forbidden_chars" != x; then
46001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46003  fi
46004
46005
46006  windows_path="$new_path"
46007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46008    unix_path=`$CYGPATH -u "$windows_path"`
46009    new_path="$unix_path"
46010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46012    new_path="$unix_path"
46013  fi
46014
46015  if test "x$path" != "x$new_path"; then
46016    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46019  fi
46020
46021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46023
46024  else
46025    # We're on a posix platform. Hooray! :)
46026    path="$POTENTIAL_FREETYPE_LIB_PATH"
46027    has_space=`$ECHO "$path" | $GREP " "`
46028    if test "x$has_space" != x; then
46029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46031      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46032    fi
46033
46034    # Use eval to expand a potential ~
46035    eval path="$path"
46036    if test ! -f "$path" && test ! -d "$path"; then
46037      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46038    fi
46039
46040    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46041  fi
46042
46043
46044    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46046$as_echo_n "checking for freetype includes... " >&6; }
46047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46048$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46049    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46051$as_echo_n "checking for freetype libraries... " >&6; }
46052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46053$as_echo "$FREETYPE_LIB_PATH" >&6; }
46054  fi
46055
46056              if test "x$FOUND_FREETYPE" != xyes; then
46057
46058  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46059  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46060  METHOD="well-known location"
46061
46062  # First check if the files exists.
46063  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46064    # We found an arbitrary include file. That's a good sign.
46065    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46066$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46067    FOUND_FREETYPE=yes
46068
46069    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46070    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46071      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46072$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46073      FOUND_FREETYPE=no
46074    else
46075      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46076        # On Windows, we will need both .lib and .dll file.
46077        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46078          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46080          FOUND_FREETYPE=no
46081        fi
46082      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
46083        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46084        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46085      fi
46086    fi
46087  fi
46088
46089  if test "x$FOUND_FREETYPE" = xyes; then
46090
46091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46092
46093  # Input might be given as Windows format, start by converting to
46094  # unix format.
46095  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46096  new_path=`$CYGPATH -u "$path"`
46097
46098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46101  # "foo.exe" is OK but "foo" is an error.
46102  #
46103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46104  # It is also a way to make sure we got the proper file name for the real test later on.
46105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46106  if test "x$test_shortpath" = x; then
46107    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46109    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46110  fi
46111
46112  # Call helper function which possibly converts this using DOS-style short mode.
46113  # If so, the updated path is stored in $new_path.
46114
46115  input_path="$new_path"
46116  # Check if we need to convert this using DOS-style short mode. If the path
46117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46118  # take no chances and rewrite it.
46119  # Note: m4 eats our [], so we need to use [ and ] instead.
46120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46121  if test "x$has_forbidden_chars" != x; then
46122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46126      # Going to short mode and back again did indeed matter. Since short mode is
46127      # case insensitive, let's make it lowercase to improve readability.
46128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46129      # Now convert it back to Unix-stile (cygpath)
46130      input_path=`$CYGPATH -u "$shortmode_path"`
46131      new_path="$input_path"
46132    fi
46133  fi
46134
46135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46136  if test "x$test_cygdrive_prefix" = x; then
46137    # As a simple fix, exclude /usr/bin since it's not a real path.
46138    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46140      # a path prefixed by /cygdrive for fixpath to work.
46141      new_path="$CYGWIN_ROOT_PATH$input_path"
46142    fi
46143  fi
46144
46145
46146  if test "x$path" != "x$new_path"; then
46147    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46150  fi
46151
46152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46153
46154  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46155  has_colon=`$ECHO $path | $GREP ^.:`
46156  new_path="$path"
46157  if test "x$has_colon" = x; then
46158    # Not in mixed or Windows style, start by that.
46159    new_path=`cmd //c echo $path`
46160  fi
46161
46162
46163  input_path="$new_path"
46164  # Check if we need to convert this using DOS-style short mode. If the path
46165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46166  # take no chances and rewrite it.
46167  # Note: m4 eats our [], so we need to use [ and ] instead.
46168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46169  if test "x$has_forbidden_chars" != x; then
46170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46172  fi
46173
46174
46175  windows_path="$new_path"
46176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46177    unix_path=`$CYGPATH -u "$windows_path"`
46178    new_path="$unix_path"
46179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46181    new_path="$unix_path"
46182  fi
46183
46184  if test "x$path" != "x$new_path"; then
46185    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46188  fi
46189
46190  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46191  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46192
46193  else
46194    # We're on a posix platform. Hooray! :)
46195    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46196    has_space=`$ECHO "$path" | $GREP " "`
46197    if test "x$has_space" != x; then
46198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46200      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46201    fi
46202
46203    # Use eval to expand a potential ~
46204    eval path="$path"
46205    if test ! -f "$path" && test ! -d "$path"; then
46206      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46207    fi
46208
46209    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46210  fi
46211
46212
46213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46214
46215  # Input might be given as Windows format, start by converting to
46216  # unix format.
46217  path="$POTENTIAL_FREETYPE_LIB_PATH"
46218  new_path=`$CYGPATH -u "$path"`
46219
46220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46223  # "foo.exe" is OK but "foo" is an error.
46224  #
46225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46226  # It is also a way to make sure we got the proper file name for the real test later on.
46227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46228  if test "x$test_shortpath" = x; then
46229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46231    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46232  fi
46233
46234  # Call helper function which possibly converts this using DOS-style short mode.
46235  # If so, the updated path is stored in $new_path.
46236
46237  input_path="$new_path"
46238  # Check if we need to convert this using DOS-style short mode. If the path
46239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46240  # take no chances and rewrite it.
46241  # Note: m4 eats our [], so we need to use [ and ] instead.
46242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46243  if test "x$has_forbidden_chars" != x; then
46244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46248      # Going to short mode and back again did indeed matter. Since short mode is
46249      # case insensitive, let's make it lowercase to improve readability.
46250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46251      # Now convert it back to Unix-stile (cygpath)
46252      input_path=`$CYGPATH -u "$shortmode_path"`
46253      new_path="$input_path"
46254    fi
46255  fi
46256
46257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46258  if test "x$test_cygdrive_prefix" = x; then
46259    # As a simple fix, exclude /usr/bin since it's not a real path.
46260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46262      # a path prefixed by /cygdrive for fixpath to work.
46263      new_path="$CYGWIN_ROOT_PATH$input_path"
46264    fi
46265  fi
46266
46267
46268  if test "x$path" != "x$new_path"; then
46269    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46272  fi
46273
46274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46275
46276  path="$POTENTIAL_FREETYPE_LIB_PATH"
46277  has_colon=`$ECHO $path | $GREP ^.:`
46278  new_path="$path"
46279  if test "x$has_colon" = x; then
46280    # Not in mixed or Windows style, start by that.
46281    new_path=`cmd //c echo $path`
46282  fi
46283
46284
46285  input_path="$new_path"
46286  # Check if we need to convert this using DOS-style short mode. If the path
46287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46288  # take no chances and rewrite it.
46289  # Note: m4 eats our [], so we need to use [ and ] instead.
46290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46291  if test "x$has_forbidden_chars" != x; then
46292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46294  fi
46295
46296
46297  windows_path="$new_path"
46298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46299    unix_path=`$CYGPATH -u "$windows_path"`
46300    new_path="$unix_path"
46301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46303    new_path="$unix_path"
46304  fi
46305
46306  if test "x$path" != "x$new_path"; then
46307    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46309$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46310  fi
46311
46312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46314
46315  else
46316    # We're on a posix platform. Hooray! :)
46317    path="$POTENTIAL_FREETYPE_LIB_PATH"
46318    has_space=`$ECHO "$path" | $GREP " "`
46319    if test "x$has_space" != x; then
46320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46321$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46322      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46323    fi
46324
46325    # Use eval to expand a potential ~
46326    eval path="$path"
46327    if test ! -f "$path" && test ! -d "$path"; then
46328      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46329    fi
46330
46331    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46332  fi
46333
46334
46335    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46337$as_echo_n "checking for freetype includes... " >&6; }
46338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46339$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46340    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46342$as_echo_n "checking for freetype libraries... " >&6; }
46343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46344$as_echo "$FREETYPE_LIB_PATH" >&6; }
46345  fi
46346
46347              fi
46348            fi
46349          fi
46350        fi
46351      fi # end check in well-known locations
46352
46353      if test "x$FOUND_FREETYPE" != xyes; then
46354
46355  # Print a helpful message on how to acquire the necessary build dependency.
46356  # freetype is the help tag: freetype, cups, pulse, alsa etc
46357  MISSING_DEPENDENCY=freetype
46358
46359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360    cygwin_help $MISSING_DEPENDENCY
46361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46362    msys_help $MISSING_DEPENDENCY
46363  else
46364    PKGHANDLER_COMMAND=
46365
46366    case $PKGHANDLER in
46367      apt-get)
46368        apt_help     $MISSING_DEPENDENCY ;;
46369      yum)
46370        yum_help     $MISSING_DEPENDENCY ;;
46371      port)
46372        port_help    $MISSING_DEPENDENCY ;;
46373      pkgutil)
46374        pkgutil_help $MISSING_DEPENDENCY ;;
46375      pkgadd)
46376        pkgadd_help  $MISSING_DEPENDENCY ;;
46377    esac
46378
46379    if test "x$PKGHANDLER_COMMAND" != x; then
46380      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46381    fi
46382  fi
46383
46384        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46385      fi
46386    fi # end user specified settings
46387
46388    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46389    if test "x$FREETYPE_CFLAGS" = x; then
46390
46391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46392
46393  # Input might be given as Windows format, start by converting to
46394  # unix format.
46395  path="$FREETYPE_INCLUDE_PATH"
46396  new_path=`$CYGPATH -u "$path"`
46397
46398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46401  # "foo.exe" is OK but "foo" is an error.
46402  #
46403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46404  # It is also a way to make sure we got the proper file name for the real test later on.
46405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46406  if test "x$test_shortpath" = x; then
46407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46408$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46409    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46410  fi
46411
46412  # Call helper function which possibly converts this using DOS-style short mode.
46413  # If so, the updated path is stored in $new_path.
46414
46415  input_path="$new_path"
46416  # Check if we need to convert this using DOS-style short mode. If the path
46417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46418  # take no chances and rewrite it.
46419  # Note: m4 eats our [], so we need to use [ and ] instead.
46420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46421  if test "x$has_forbidden_chars" != x; then
46422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46426      # Going to short mode and back again did indeed matter. Since short mode is
46427      # case insensitive, let's make it lowercase to improve readability.
46428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46429      # Now convert it back to Unix-stile (cygpath)
46430      input_path=`$CYGPATH -u "$shortmode_path"`
46431      new_path="$input_path"
46432    fi
46433  fi
46434
46435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46436  if test "x$test_cygdrive_prefix" = x; then
46437    # As a simple fix, exclude /usr/bin since it's not a real path.
46438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46440      # a path prefixed by /cygdrive for fixpath to work.
46441      new_path="$CYGWIN_ROOT_PATH$input_path"
46442    fi
46443  fi
46444
46445
46446  if test "x$path" != "x$new_path"; then
46447    FREETYPE_INCLUDE_PATH="$new_path"
46448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46449$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46450  fi
46451
46452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46453
46454  path="$FREETYPE_INCLUDE_PATH"
46455  has_colon=`$ECHO $path | $GREP ^.:`
46456  new_path="$path"
46457  if test "x$has_colon" = x; then
46458    # Not in mixed or Windows style, start by that.
46459    new_path=`cmd //c echo $path`
46460  fi
46461
46462
46463  input_path="$new_path"
46464  # Check if we need to convert this using DOS-style short mode. If the path
46465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46466  # take no chances and rewrite it.
46467  # Note: m4 eats our [], so we need to use [ and ] instead.
46468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46469  if test "x$has_forbidden_chars" != x; then
46470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46472  fi
46473
46474
46475  windows_path="$new_path"
46476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46477    unix_path=`$CYGPATH -u "$windows_path"`
46478    new_path="$unix_path"
46479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46481    new_path="$unix_path"
46482  fi
46483
46484  if test "x$path" != "x$new_path"; then
46485    FREETYPE_INCLUDE_PATH="$new_path"
46486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46487$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46488  fi
46489
46490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46492
46493  else
46494    # We're on a posix platform. Hooray! :)
46495    path="$FREETYPE_INCLUDE_PATH"
46496    has_space=`$ECHO "$path" | $GREP " "`
46497    if test "x$has_space" != x; then
46498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46499$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46500      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46501    fi
46502
46503    # Use eval to expand a potential ~
46504    eval path="$path"
46505    if test ! -f "$path" && test ! -d "$path"; then
46506      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46507    fi
46508
46509    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46510  fi
46511
46512      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46513        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46514      else
46515        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46516      fi
46517    fi
46518
46519    if test "x$FREETYPE_LIBS" = x; then
46520
46521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46522
46523  # Input might be given as Windows format, start by converting to
46524  # unix format.
46525  path="$FREETYPE_LIB_PATH"
46526  new_path=`$CYGPATH -u "$path"`
46527
46528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46531  # "foo.exe" is OK but "foo" is an error.
46532  #
46533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46534  # It is also a way to make sure we got the proper file name for the real test later on.
46535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46536  if test "x$test_shortpath" = x; then
46537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46538$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46539    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46540  fi
46541
46542  # Call helper function which possibly converts this using DOS-style short mode.
46543  # If so, the updated path is stored in $new_path.
46544
46545  input_path="$new_path"
46546  # Check if we need to convert this using DOS-style short mode. If the path
46547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46548  # take no chances and rewrite it.
46549  # Note: m4 eats our [], so we need to use [ and ] instead.
46550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46551  if test "x$has_forbidden_chars" != x; then
46552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46556      # Going to short mode and back again did indeed matter. Since short mode is
46557      # case insensitive, let's make it lowercase to improve readability.
46558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46559      # Now convert it back to Unix-stile (cygpath)
46560      input_path=`$CYGPATH -u "$shortmode_path"`
46561      new_path="$input_path"
46562    fi
46563  fi
46564
46565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46566  if test "x$test_cygdrive_prefix" = x; then
46567    # As a simple fix, exclude /usr/bin since it's not a real path.
46568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46570      # a path prefixed by /cygdrive for fixpath to work.
46571      new_path="$CYGWIN_ROOT_PATH$input_path"
46572    fi
46573  fi
46574
46575
46576  if test "x$path" != "x$new_path"; then
46577    FREETYPE_LIB_PATH="$new_path"
46578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46579$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46580  fi
46581
46582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46583
46584  path="$FREETYPE_LIB_PATH"
46585  has_colon=`$ECHO $path | $GREP ^.:`
46586  new_path="$path"
46587  if test "x$has_colon" = x; then
46588    # Not in mixed or Windows style, start by that.
46589    new_path=`cmd //c echo $path`
46590  fi
46591
46592
46593  input_path="$new_path"
46594  # Check if we need to convert this using DOS-style short mode. If the path
46595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46596  # take no chances and rewrite it.
46597  # Note: m4 eats our [], so we need to use [ and ] instead.
46598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46599  if test "x$has_forbidden_chars" != x; then
46600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46602  fi
46603
46604
46605  windows_path="$new_path"
46606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46607    unix_path=`$CYGPATH -u "$windows_path"`
46608    new_path="$unix_path"
46609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46611    new_path="$unix_path"
46612  fi
46613
46614  if test "x$path" != "x$new_path"; then
46615    FREETYPE_LIB_PATH="$new_path"
46616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46617$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46618  fi
46619
46620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46622
46623  else
46624    # We're on a posix platform. Hooray! :)
46625    path="$FREETYPE_LIB_PATH"
46626    has_space=`$ECHO "$path" | $GREP " "`
46627    if test "x$has_space" != x; then
46628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46629$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46630      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46631    fi
46632
46633    # Use eval to expand a potential ~
46634    eval path="$path"
46635    if test ! -f "$path" && test ! -d "$path"; then
46636      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46637    fi
46638
46639    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46640  fi
46641
46642      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46643        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46644      else
46645        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46646      fi
46647    fi
46648
46649    # Try to compile it
46650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46651$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46652    ac_ext=cpp
46653ac_cpp='$CXXCPP $CPPFLAGS'
46654ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46655ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46656ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46657
46658    PREV_CXXCFLAGS="$CXXFLAGS"
46659    PREV_LIBS="$LIBS"
46660    PREV_CXX="$CXX"
46661    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46662    LIBS="$LIBS $FREETYPE_LIBS"
46663    CXX="$FIXPATH $CXX"
46664    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46665/* end confdefs.h.  */
46666
46667          #include<ft2build.h>
46668          #include FT_FREETYPE_H
46669          int main () {
46670            FT_Init_FreeType(NULL);
46671            return 0;
46672          }
46673
46674_ACEOF
46675if ac_fn_cxx_try_link "$LINENO"; then :
46676
46677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46678$as_echo "yes" >&6; }
46679
46680else
46681
46682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46683$as_echo "no" >&6; }
46684          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46685$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46686          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46687$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46688
46689
46690  # Print a helpful message on how to acquire the necessary build dependency.
46691  # freetype is the help tag: freetype, cups, pulse, alsa etc
46692  MISSING_DEPENDENCY=freetype
46693
46694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46695    cygwin_help $MISSING_DEPENDENCY
46696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46697    msys_help $MISSING_DEPENDENCY
46698  else
46699    PKGHANDLER_COMMAND=
46700
46701    case $PKGHANDLER in
46702      apt-get)
46703        apt_help     $MISSING_DEPENDENCY ;;
46704      yum)
46705        yum_help     $MISSING_DEPENDENCY ;;
46706      port)
46707        port_help    $MISSING_DEPENDENCY ;;
46708      pkgutil)
46709        pkgutil_help $MISSING_DEPENDENCY ;;
46710      pkgadd)
46711        pkgadd_help  $MISSING_DEPENDENCY ;;
46712    esac
46713
46714    if test "x$PKGHANDLER_COMMAND" != x; then
46715      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46716    fi
46717  fi
46718
46719
46720          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46721
46722
46723fi
46724rm -f core conftest.err conftest.$ac_objext \
46725    conftest$ac_exeext conftest.$ac_ext
46726    CXXCFLAGS="$PREV_CXXFLAGS"
46727    LIBS="$PREV_LIBS"
46728    CXX="$PREV_CXX"
46729    ac_ext=cpp
46730ac_cpp='$CXXCPP $CPPFLAGS'
46731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46734
46735
46736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46737$as_echo_n "checking if we should bundle freetype... " >&6; }
46738    if test "x$BUNDLE_FREETYPE" = xyes; then
46739      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46740    fi
46741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46742$as_echo "$BUNDLE_FREETYPE" >&6; }
46743
46744  fi # end freetype needed
46745
46746
46747
46748
46749
46750
46751
46752  ###############################################################################
46753  #
46754  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46755  #
46756
46757# Check whether --with-alsa was given.
46758if test "${with_alsa+set}" = set; then :
46759  withval=$with_alsa;
46760fi
46761
46762
46763# Check whether --with-alsa-include was given.
46764if test "${with_alsa_include+set}" = set; then :
46765  withval=$with_alsa_include;
46766fi
46767
46768
46769# Check whether --with-alsa-lib was given.
46770if test "${with_alsa_lib+set}" = set; then :
46771  withval=$with_alsa_lib;
46772fi
46773
46774
46775  if test "x$ALSA_NOT_NEEDED" = xyes; then
46776    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46777      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46778$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46779    fi
46780    ALSA_CFLAGS=
46781    ALSA_LIBS=
46782  else
46783    ALSA_FOUND=no
46784
46785    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46786      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46787    fi
46788
46789    if test "x${with_alsa}" != x; then
46790      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46791      ALSA_CFLAGS="-I${with_alsa}/include"
46792      ALSA_FOUND=yes
46793    fi
46794    if test "x${with_alsa_include}" != x; then
46795      ALSA_CFLAGS="-I${with_alsa_include}"
46796      ALSA_FOUND=yes
46797    fi
46798    if test "x${with_alsa_lib}" != x; then
46799      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46800      ALSA_FOUND=yes
46801    fi
46802    if test "x$ALSA_FOUND" = xno; then
46803
46804
46805  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46806    # Source the builddeps file again, to make sure it uses the latest variables!
46807    . $builddepsfile
46808    # Look for a target and build machine specific resource!
46809    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46810    if test "x$resource" = x; then
46811      # Ok, lets instead look for a target specific resource
46812      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46813    fi
46814    if test "x$resource" = x; then
46815      # Ok, lets instead look for a build specific resource
46816      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46817    fi
46818    if test "x$resource" = x; then
46819      # Ok, lets instead look for a generic resource
46820      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46821      resource=${builddep_alsa}
46822    fi
46823    if test "x$resource" != x; then
46824      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46825$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46826      # If the resource in the builddeps.conf file is an existing directory,
46827      # for example /java/linux/cups
46828      if test -d ${resource}; then
46829        depdir=${resource}
46830      else
46831
46832  # alsa is for example mymodule
46833  # $resource is for example libs/general/libmymod_1_2_3.zip
46834  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46835  # $with_builddeps_dir is for example /localhome/builddeps
46836  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46837  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46838  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46839  filename=`basename $resource`
46840  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46841  filebase=${filename%%.*}
46842  extension=${filename#*.}
46843  installdir=$with_builddeps_dir/$filebase
46844  if test ! -f $installdir/$filename.unpacked; then
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46846$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46847    if test ! -d $installdir; then
46848      mkdir -p $installdir
46849    fi
46850    if test ! -d $installdir; then
46851      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46852    fi
46853    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46854    touch $tmpfile
46855    if test ! -f $tmpfile; then
46856      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46857    fi
46858
46859  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46860  # $tmpfile is the local file name for the downloaded file.
46861  VALID_TOOL=no
46862  if test "x$BDEPS_FTP" = xwget; then
46863    VALID_TOOL=yes
46864    wget -O $tmpfile $with_builddeps_server/$resource
46865  fi
46866  if test "x$BDEPS_FTP" = xlftp; then
46867    VALID_TOOL=yes
46868    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46869  fi
46870  if test "x$BDEPS_FTP" = xftp; then
46871    VALID_TOOL=yes
46872    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46873    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46874    FTPUSERPWD=${FTPSERVER%%@*}
46875    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46876      FTPUSER=${userpwd%%:*}
46877      FTPPWD=${userpwd#*@}
46878      FTPSERVER=${FTPSERVER#*@}
46879    else
46880      FTPUSER=ftp
46881      FTPPWD=ftp
46882    fi
46883    # the "pass" command does not work on some
46884    # ftp clients (read ftp.exe) but if it works,
46885    # passive mode is better!
46886    ( \
46887        echo "user $FTPUSER $FTPPWD"        ; \
46888        echo "pass"                         ; \
46889        echo "bin"                          ; \
46890        echo "get $FTPPATH $tmpfile"              ; \
46891    ) | ftp -in $FTPSERVER
46892  fi
46893  if test "x$VALID_TOOL" != xyes; then
46894    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46895  fi
46896
46897    mv $tmpfile $installdir/$filename
46898    if test ! -s $installdir/$filename; then
46899      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46900    fi
46901    case "$extension" in
46902      zip)  echo "Unzipping $installdir/$filename..."
46903        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46904        ;;
46905      tar.gz) echo "Untaring $installdir/$filename..."
46906        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46907        ;;
46908      tgz) echo "Untaring $installdir/$filename..."
46909        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46910        ;;
46911      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46912        ;;
46913    esac
46914  fi
46915  if test -f $installdir/$filename.unpacked; then
46916    depdir=$installdir
46917  fi
46918
46919      fi
46920      # Source the builddeps file again, because in the previous command, the depdir
46921      # was updated to point at the current build dependency install directory.
46922      . $builddepsfile
46923      # Now extract variables from the builddeps.conf files.
46924      theroot=${builddep_alsa_ROOT}
46925      thecflags=${builddep_alsa_CFLAGS}
46926      thelibs=${builddep_alsa_LIBS}
46927      if test "x$depdir" = x; then
46928        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46929      fi
46930      ALSA=$depdir
46931      if test "x$theroot" != x; then
46932        ALSA="$theroot"
46933      fi
46934      if test "x$thecflags" != x; then
46935        ALSA_CFLAGS="$thecflags"
46936      fi
46937      if test "x$thelibs" != x; then
46938        ALSA_LIBS="$thelibs"
46939      fi
46940      ALSA_FOUND=yes
46941      else ALSA_FOUND=no
46942
46943    fi
46944    else ALSA_FOUND=no
46945
46946  fi
46947
46948    fi
46949    if test "x$ALSA_FOUND" = xno; then
46950
46951pkg_failed=no
46952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46953$as_echo_n "checking for ALSA... " >&6; }
46954
46955if test -n "$ALSA_CFLAGS"; then
46956    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46957 elif test -n "$PKG_CONFIG"; then
46958    if test -n "$PKG_CONFIG" && \
46959    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46960  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46961  ac_status=$?
46962  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46963  test $ac_status = 0; }; then
46964  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46965else
46966  pkg_failed=yes
46967fi
46968 else
46969    pkg_failed=untried
46970fi
46971if test -n "$ALSA_LIBS"; then
46972    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46973 elif test -n "$PKG_CONFIG"; then
46974    if test -n "$PKG_CONFIG" && \
46975    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46976  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46977  ac_status=$?
46978  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46979  test $ac_status = 0; }; then
46980  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46981else
46982  pkg_failed=yes
46983fi
46984 else
46985    pkg_failed=untried
46986fi
46987
46988
46989
46990if test $pkg_failed = yes; then
46991
46992if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46993        _pkg_short_errors_supported=yes
46994else
46995        _pkg_short_errors_supported=no
46996fi
46997        if test $_pkg_short_errors_supported = yes; then
46998	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46999        else
47000	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47001        fi
47002	# Put the nasty error message in config.log where it belongs
47003	echo "$ALSA_PKG_ERRORS" >&5
47004
47005	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47006$as_echo "no" >&6; }
47007                ALSA_FOUND=no
47008elif test $pkg_failed = untried; then
47009	ALSA_FOUND=no
47010else
47011	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47012	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47014$as_echo "yes" >&6; }
47015	ALSA_FOUND=yes
47016fi
47017    fi
47018    if test "x$ALSA_FOUND" = xno; then
47019      for ac_header in alsa/asoundlib.h
47020do :
47021  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47022if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47023  cat >>confdefs.h <<_ACEOF
47024#define HAVE_ALSA_ASOUNDLIB_H 1
47025_ACEOF
47026
47027            ALSA_FOUND=yes
47028            ALSA_CFLAGS=-Iignoreme
47029            ALSA_LIBS=-lasound
47030            DEFAULT_ALSA=yes
47031
47032else
47033  ALSA_FOUND=no
47034fi
47035
47036done
47037
47038    fi
47039    if test "x$ALSA_FOUND" = xno; then
47040
47041  # Print a helpful message on how to acquire the necessary build dependency.
47042  # alsa is the help tag: freetype, cups, pulse, alsa etc
47043  MISSING_DEPENDENCY=alsa
47044
47045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47046    cygwin_help $MISSING_DEPENDENCY
47047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47048    msys_help $MISSING_DEPENDENCY
47049  else
47050    PKGHANDLER_COMMAND=
47051
47052    case $PKGHANDLER in
47053      apt-get)
47054        apt_help     $MISSING_DEPENDENCY ;;
47055      yum)
47056        yum_help     $MISSING_DEPENDENCY ;;
47057      port)
47058        port_help    $MISSING_DEPENDENCY ;;
47059      pkgutil)
47060        pkgutil_help $MISSING_DEPENDENCY ;;
47061      pkgadd)
47062        pkgadd_help  $MISSING_DEPENDENCY ;;
47063    esac
47064
47065    if test "x$PKGHANDLER_COMMAND" != x; then
47066      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47067    fi
47068  fi
47069
47070      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47071    fi
47072  fi
47073
47074
47075
47076
47077
47078
47079  ###############################################################################
47080  #
47081  # Check for the jpeg library
47082  #
47083
47084  USE_EXTERNAL_LIBJPEG=true
47085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47086$as_echo_n "checking for main in -ljpeg... " >&6; }
47087if ${ac_cv_lib_jpeg_main+:} false; then :
47088  $as_echo_n "(cached) " >&6
47089else
47090  ac_check_lib_save_LIBS=$LIBS
47091LIBS="-ljpeg  $LIBS"
47092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47093/* end confdefs.h.  */
47094
47095
47096int
47097main ()
47098{
47099return main ();
47100  ;
47101  return 0;
47102}
47103_ACEOF
47104if ac_fn_cxx_try_link "$LINENO"; then :
47105  ac_cv_lib_jpeg_main=yes
47106else
47107  ac_cv_lib_jpeg_main=no
47108fi
47109rm -f core conftest.err conftest.$ac_objext \
47110    conftest$ac_exeext conftest.$ac_ext
47111LIBS=$ac_check_lib_save_LIBS
47112fi
47113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47114$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47115if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47116  cat >>confdefs.h <<_ACEOF
47117#define HAVE_LIBJPEG 1
47118_ACEOF
47119
47120  LIBS="-ljpeg $LIBS"
47121
47122else
47123   USE_EXTERNAL_LIBJPEG=false
47124      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47125$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47126
47127fi
47128
47129
47130
47131  ###############################################################################
47132  #
47133  # Check for the gif library
47134  #
47135
47136
47137# Check whether --with-giflib was given.
47138if test "${with_giflib+set}" = set; then :
47139  withval=$with_giflib;
47140fi
47141
47142
47143
47144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47145$as_echo_n "checking for which giflib to use... " >&6; }
47146
47147  # default is bundled
47148  DEFAULT_GIFLIB=bundled
47149
47150  #
47151  # if user didn't specify, use DEFAULT_GIFLIB
47152  #
47153  if test "x${with_giflib}" = "x"; then
47154    with_giflib=${DEFAULT_GIFLIB}
47155  fi
47156
47157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47158$as_echo "${with_giflib}" >&6; }
47159
47160  if test "x${with_giflib}" = "xbundled"; then
47161    USE_EXTERNAL_LIBGIF=false
47162  elif test "x${with_giflib}" = "xsystem"; then
47163    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47164if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47165
47166else
47167   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47168fi
47169
47170
47171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47172$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47173if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47174  $as_echo_n "(cached) " >&6
47175else
47176  ac_check_lib_save_LIBS=$LIBS
47177LIBS="-lgif  $LIBS"
47178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47179/* end confdefs.h.  */
47180
47181/* Override any GCC internal prototype to avoid an error.
47182   Use char because int might match the return type of a GCC
47183   builtin and then its argument prototype would still apply.  */
47184#ifdef __cplusplus
47185extern "C"
47186#endif
47187char DGifGetCode ();
47188int
47189main ()
47190{
47191return DGifGetCode ();
47192  ;
47193  return 0;
47194}
47195_ACEOF
47196if ac_fn_cxx_try_link "$LINENO"; then :
47197  ac_cv_lib_gif_DGifGetCode=yes
47198else
47199  ac_cv_lib_gif_DGifGetCode=no
47200fi
47201rm -f core conftest.err conftest.$ac_objext \
47202    conftest$ac_exeext conftest.$ac_ext
47203LIBS=$ac_check_lib_save_LIBS
47204fi
47205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47206$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47207if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47208  cat >>confdefs.h <<_ACEOF
47209#define HAVE_LIBGIF 1
47210_ACEOF
47211
47212  LIBS="-lgif $LIBS"
47213
47214else
47215   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47216fi
47217
47218
47219    USE_EXTERNAL_LIBGIF=true
47220  else
47221    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47222  fi
47223
47224
47225  ###############################################################################
47226  #
47227  # Check for the png library
47228  #
47229
47230
47231# Check whether --with-libpng was given.
47232if test "${with_libpng+set}" = set; then :
47233  withval=$with_libpng;
47234fi
47235
47236
47237
47238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47239$as_echo_n "checking for which libpng to use... " >&6; }
47240
47241  # default is bundled
47242  DEFAULT_LIBPNG=bundled
47243
47244  #
47245  # if user didn't specify, use DEFAULT_LIBPNG
47246  #
47247  if test "x${with_libpng}" = "x"; then
47248      with_libpng=${DEFAULT_LIBPNG}
47249  fi
47250
47251  if test "x${with_libpng}" = "xbundled"; then
47252      USE_EXTERNAL_LIBPNG=false
47253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47254$as_echo "bundled" >&6; }
47255  elif test "x${with_libpng}" = "xsystem"; then
47256
47257pkg_failed=no
47258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47259$as_echo_n "checking for PNG... " >&6; }
47260
47261if test -n "$PNG_CFLAGS"; then
47262    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47263 elif test -n "$PKG_CONFIG"; then
47264    if test -n "$PKG_CONFIG" && \
47265    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47266  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47267  ac_status=$?
47268  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47269  test $ac_status = 0; }; then
47270  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47271else
47272  pkg_failed=yes
47273fi
47274 else
47275    pkg_failed=untried
47276fi
47277if test -n "$PNG_LIBS"; then
47278    pkg_cv_PNG_LIBS="$PNG_LIBS"
47279 elif test -n "$PKG_CONFIG"; then
47280    if test -n "$PKG_CONFIG" && \
47281    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47282  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47283  ac_status=$?
47284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47285  test $ac_status = 0; }; then
47286  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47287else
47288  pkg_failed=yes
47289fi
47290 else
47291    pkg_failed=untried
47292fi
47293
47294
47295
47296if test $pkg_failed = yes; then
47297
47298if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47299        _pkg_short_errors_supported=yes
47300else
47301        _pkg_short_errors_supported=no
47302fi
47303        if test $_pkg_short_errors_supported = yes; then
47304	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47305        else
47306	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47307        fi
47308	# Put the nasty error message in config.log where it belongs
47309	echo "$PNG_PKG_ERRORS" >&5
47310
47311	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47312$as_echo "no" >&6; }
47313                 LIBPNG_FOUND=no
47314elif test $pkg_failed = untried; then
47315	 LIBPNG_FOUND=no
47316else
47317	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47318	PNG_LIBS=$pkg_cv_PNG_LIBS
47319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47320$as_echo "yes" >&6; }
47321	 LIBPNG_FOUND=yes
47322fi
47323      if test "x${LIBPNG_FOUND}" = "xyes"; then
47324          USE_EXTERNAL_LIBPNG=true
47325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47326$as_echo "system" >&6; }
47327      else
47328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47329$as_echo "system not found" >&6; }
47330          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47331      fi
47332  else
47333      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47334  fi
47335
47336
47337  ###############################################################################
47338  #
47339  # Check for the zlib library
47340  #
47341
47342
47343# Check whether --with-zlib was given.
47344if test "${with_zlib+set}" = set; then :
47345  withval=$with_zlib;
47346fi
47347
47348
47349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47350$as_echo_n "checking for compress in -lz... " >&6; }
47351if ${ac_cv_lib_z_compress+:} false; then :
47352  $as_echo_n "(cached) " >&6
47353else
47354  ac_check_lib_save_LIBS=$LIBS
47355LIBS="-lz  $LIBS"
47356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47357/* end confdefs.h.  */
47358
47359/* Override any GCC internal prototype to avoid an error.
47360   Use char because int might match the return type of a GCC
47361   builtin and then its argument prototype would still apply.  */
47362#ifdef __cplusplus
47363extern "C"
47364#endif
47365char compress ();
47366int
47367main ()
47368{
47369return compress ();
47370  ;
47371  return 0;
47372}
47373_ACEOF
47374if ac_fn_cxx_try_link "$LINENO"; then :
47375  ac_cv_lib_z_compress=yes
47376else
47377  ac_cv_lib_z_compress=no
47378fi
47379rm -f core conftest.err conftest.$ac_objext \
47380    conftest$ac_exeext conftest.$ac_ext
47381LIBS=$ac_check_lib_save_LIBS
47382fi
47383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47384$as_echo "$ac_cv_lib_z_compress" >&6; }
47385if test "x$ac_cv_lib_z_compress" = xyes; then :
47386   ZLIB_FOUND=yes
47387else
47388   ZLIB_FOUND=no
47389fi
47390
47391
47392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47393$as_echo_n "checking for which zlib to use... " >&6; }
47394
47395  DEFAULT_ZLIB=bundled
47396  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47397    #
47398    # On macosx default is system...on others default is
47399    #
47400    DEFAULT_ZLIB=system
47401  fi
47402
47403  if test "x${ZLIB_FOUND}" != "xyes"; then
47404    #
47405    # If we don't find any system...set default to bundled
47406    #
47407    DEFAULT_ZLIB=bundled
47408  fi
47409
47410  #
47411  # If user didn't specify, use DEFAULT_ZLIB
47412  #
47413  if test "x${with_zlib}" = "x"; then
47414    with_zlib=${DEFAULT_ZLIB}
47415  fi
47416
47417  if test "x${with_zlib}" = "xbundled"; then
47418    USE_EXTERNAL_LIBZ=false
47419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47420$as_echo "bundled" >&6; }
47421  elif test "x${with_zlib}" = "xsystem"; then
47422    if test "x${ZLIB_FOUND}" = "xyes"; then
47423      USE_EXTERNAL_LIBZ=true
47424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47425$as_echo "system" >&6; }
47426    else
47427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47428$as_echo "system not found" >&6; }
47429      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47430    fi
47431  else
47432    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47433  fi
47434
47435
47436
47437  ###############################################################################
47438  LIBZIP_CAN_USE_MMAP=true
47439
47440
47441
47442  ###############################################################################
47443  #
47444  # Check if altzone exists in time.h
47445  #
47446
47447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47448/* end confdefs.h.  */
47449#include <time.h>
47450int
47451main ()
47452{
47453return (int)altzone;
47454  ;
47455  return 0;
47456}
47457_ACEOF
47458if ac_fn_cxx_try_link "$LINENO"; then :
47459  has_altzone=yes
47460else
47461  has_altzone=no
47462fi
47463rm -f core conftest.err conftest.$ac_objext \
47464    conftest$ac_exeext conftest.$ac_ext
47465  if test "x$has_altzone" = xyes; then
47466
47467$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47468
47469  fi
47470
47471  ###############################################################################
47472  #
47473  # Check the maths library
47474  #
47475
47476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47477$as_echo_n "checking for cos in -lm... " >&6; }
47478if ${ac_cv_lib_m_cos+:} false; then :
47479  $as_echo_n "(cached) " >&6
47480else
47481  ac_check_lib_save_LIBS=$LIBS
47482LIBS="-lm  $LIBS"
47483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47484/* end confdefs.h.  */
47485
47486/* Override any GCC internal prototype to avoid an error.
47487   Use char because int might match the return type of a GCC
47488   builtin and then its argument prototype would still apply.  */
47489#ifdef __cplusplus
47490extern "C"
47491#endif
47492char cos ();
47493int
47494main ()
47495{
47496return cos ();
47497  ;
47498  return 0;
47499}
47500_ACEOF
47501if ac_fn_cxx_try_link "$LINENO"; then :
47502  ac_cv_lib_m_cos=yes
47503else
47504  ac_cv_lib_m_cos=no
47505fi
47506rm -f core conftest.err conftest.$ac_objext \
47507    conftest$ac_exeext conftest.$ac_ext
47508LIBS=$ac_check_lib_save_LIBS
47509fi
47510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47511$as_echo "$ac_cv_lib_m_cos" >&6; }
47512if test "x$ac_cv_lib_m_cos" = xyes; then :
47513  cat >>confdefs.h <<_ACEOF
47514#define HAVE_LIBM 1
47515_ACEOF
47516
47517  LIBS="-lm $LIBS"
47518
47519else
47520
47521        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47522$as_echo "$as_me: Maths library was not found" >&6;}
47523
47524
47525fi
47526
47527
47528
47529  ###############################################################################
47530  #
47531  # Check for libdl.so
47532
47533  save_LIBS="$LIBS"
47534  LIBS=""
47535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47536$as_echo_n "checking for dlopen in -ldl... " >&6; }
47537if ${ac_cv_lib_dl_dlopen+:} false; then :
47538  $as_echo_n "(cached) " >&6
47539else
47540  ac_check_lib_save_LIBS=$LIBS
47541LIBS="-ldl  $LIBS"
47542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47543/* end confdefs.h.  */
47544
47545/* Override any GCC internal prototype to avoid an error.
47546   Use char because int might match the return type of a GCC
47547   builtin and then its argument prototype would still apply.  */
47548#ifdef __cplusplus
47549extern "C"
47550#endif
47551char dlopen ();
47552int
47553main ()
47554{
47555return dlopen ();
47556  ;
47557  return 0;
47558}
47559_ACEOF
47560if ac_fn_cxx_try_link "$LINENO"; then :
47561  ac_cv_lib_dl_dlopen=yes
47562else
47563  ac_cv_lib_dl_dlopen=no
47564fi
47565rm -f core conftest.err conftest.$ac_objext \
47566    conftest$ac_exeext conftest.$ac_ext
47567LIBS=$ac_check_lib_save_LIBS
47568fi
47569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47570$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47571if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47572  cat >>confdefs.h <<_ACEOF
47573#define HAVE_LIBDL 1
47574_ACEOF
47575
47576  LIBS="-ldl $LIBS"
47577
47578fi
47579
47580  LIBDL="$LIBS"
47581
47582  LIBS="$save_LIBS"
47583
47584
47585  ###############################################################################
47586  #
47587  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47588  # dynamic build is configured on command line.
47589  #
47590
47591# Check whether --with-stdc++lib was given.
47592if test "${with_stdc__lib+set}" = set; then :
47593  withval=$with_stdc__lib;
47594        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47595                && test "x$with_stdc__lib" != xdefault; then
47596          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47597        fi
47598
47599else
47600  with_stdc__lib=default
47601
47602fi
47603
47604
47605  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47606    # Test if -lstdc++ works.
47607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47608$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47609    ac_ext=cpp
47610ac_cpp='$CXXCPP $CPPFLAGS'
47611ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47612ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47613ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47614
47615    OLD_CXXFLAGS="$CXXFLAGS"
47616    CXXFLAGS="$CXXFLAGS -lstdc++"
47617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47618/* end confdefs.h.  */
47619
47620int
47621main ()
47622{
47623return 0;
47624  ;
47625  return 0;
47626}
47627_ACEOF
47628if ac_fn_cxx_try_link "$LINENO"; then :
47629  has_dynamic_libstdcxx=yes
47630else
47631  has_dynamic_libstdcxx=no
47632fi
47633rm -f core conftest.err conftest.$ac_objext \
47634    conftest$ac_exeext conftest.$ac_ext
47635    CXXFLAGS="$OLD_CXXFLAGS"
47636    ac_ext=cpp
47637ac_cpp='$CXXCPP $CPPFLAGS'
47638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47641
47642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47643$as_echo "$has_dynamic_libstdcxx" >&6; }
47644
47645    # Test if stdc++ can be linked statically.
47646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47647$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47648    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47649    ac_ext=cpp
47650ac_cpp='$CXXCPP $CPPFLAGS'
47651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47654
47655    OLD_LIBS="$LIBS"
47656    OLD_CXX="$CXX"
47657    LIBS="$STATIC_STDCXX_FLAGS"
47658    CXX="$CC"
47659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47660/* end confdefs.h.  */
47661
47662int
47663main ()
47664{
47665return 0;
47666  ;
47667  return 0;
47668}
47669_ACEOF
47670if ac_fn_cxx_try_link "$LINENO"; then :
47671  has_static_libstdcxx=yes
47672else
47673  has_static_libstdcxx=no
47674fi
47675rm -f core conftest.err conftest.$ac_objext \
47676    conftest$ac_exeext conftest.$ac_ext
47677    LIBS="$OLD_LIBS"
47678    CXX="$OLD_CXX"
47679    ac_ext=cpp
47680ac_cpp='$CXXCPP $CPPFLAGS'
47681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47684
47685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47686$as_echo "$has_static_libstdcxx" >&6; }
47687
47688    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47689      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47690    fi
47691
47692    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47693      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47694    fi
47695
47696    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47697      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47698    fi
47699
47700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47701$as_echo_n "checking how to link with libstdc++... " >&6; }
47702    # If dynamic was requested, it's available since it would fail above otherwise.
47703    # If dynamic wasn't requested, go with static unless it isn't available.
47704    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47705      LIBCXX="$LIBCXX -lstdc++"
47706      LDCXX="$CXX"
47707      STATIC_CXX_SETTING="STATIC_CXX=false"
47708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47709$as_echo "dynamic" >&6; }
47710    else
47711      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47712      LDCXX="$CC"
47713      STATIC_CXX_SETTING="STATIC_CXX=true"
47714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47715$as_echo "static" >&6; }
47716    fi
47717  fi
47718
47719
47720  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47721    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47722
47723pkg_failed=no
47724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47725$as_echo_n "checking for LIBFFI... " >&6; }
47726
47727if test -n "$LIBFFI_CFLAGS"; then
47728    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47729 elif test -n "$PKG_CONFIG"; then
47730    if test -n "$PKG_CONFIG" && \
47731    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47732  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47733  ac_status=$?
47734  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47735  test $ac_status = 0; }; then
47736  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47737else
47738  pkg_failed=yes
47739fi
47740 else
47741    pkg_failed=untried
47742fi
47743if test -n "$LIBFFI_LIBS"; then
47744    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47745 elif test -n "$PKG_CONFIG"; then
47746    if test -n "$PKG_CONFIG" && \
47747    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47748  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47749  ac_status=$?
47750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47751  test $ac_status = 0; }; then
47752  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47753else
47754  pkg_failed=yes
47755fi
47756 else
47757    pkg_failed=untried
47758fi
47759
47760
47761
47762if test $pkg_failed = yes; then
47763
47764if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47765        _pkg_short_errors_supported=yes
47766else
47767        _pkg_short_errors_supported=no
47768fi
47769        if test $_pkg_short_errors_supported = yes; then
47770	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47771        else
47772	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47773        fi
47774	# Put the nasty error message in config.log where it belongs
47775	echo "$LIBFFI_PKG_ERRORS" >&5
47776
47777	as_fn_error $? "Package requirements (libffi) were not met:
47778
47779$LIBFFI_PKG_ERRORS
47780
47781Consider adjusting the PKG_CONFIG_PATH environment variable if you
47782installed software in a non-standard prefix.
47783
47784Alternatively, you may set the environment variables LIBFFI_CFLAGS
47785and LIBFFI_LIBS to avoid the need to call pkg-config.
47786See the pkg-config man page for more details.
47787" "$LINENO" 5
47788elif test $pkg_failed = untried; then
47789	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47791as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47792is in your PATH or set the PKG_CONFIG environment variable to the full
47793path to pkg-config.
47794
47795Alternatively, you may set the environment variables LIBFFI_CFLAGS
47796and LIBFFI_LIBS to avoid the need to call pkg-config.
47797See the pkg-config man page for more details.
47798
47799To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47800See \`config.log' for more details" "$LINENO" 5; }
47801else
47802	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47803	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47805$as_echo "yes" >&6; }
47806	:
47807fi
47808
47809  fi
47810
47811  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47812    # Extract the first word of "llvm-config", so it can be a program name with args.
47813set dummy llvm-config; ac_word=$2
47814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47815$as_echo_n "checking for $ac_word... " >&6; }
47816if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47817  $as_echo_n "(cached) " >&6
47818else
47819  if test -n "$LLVM_CONFIG"; then
47820  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47821else
47822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47823for as_dir in $PATH
47824do
47825  IFS=$as_save_IFS
47826  test -z "$as_dir" && as_dir=.
47827    for ac_exec_ext in '' $ac_executable_extensions; do
47828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47829    ac_cv_prog_LLVM_CONFIG="llvm-config"
47830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47831    break 2
47832  fi
47833done
47834  done
47835IFS=$as_save_IFS
47836
47837fi
47838fi
47839LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47840if test -n "$LLVM_CONFIG"; then
47841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47842$as_echo "$LLVM_CONFIG" >&6; }
47843else
47844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47845$as_echo "no" >&6; }
47846fi
47847
47848
47849
47850    if test "x$LLVM_CONFIG" != xllvm-config; then
47851      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47852    fi
47853
47854    llvm_components="jit mcjit engine nativecodegen native"
47855    unset LLVM_CFLAGS
47856    for flag in $("$LLVM_CONFIG" --cxxflags); do
47857      if echo "${flag}" | grep -q '^-[ID]'; then
47858        if test "${flag}" != "-D_DEBUG" ; then
47859          if test "${LLVM_CFLAGS}" != "" ; then
47860            LLVM_CFLAGS="${LLVM_CFLAGS} "
47861          fi
47862          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47863        fi
47864      fi
47865    done
47866    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47867    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47868
47869    unset LLVM_LDFLAGS
47870    for flag in $("${LLVM_CONFIG}" --ldflags); do
47871      if echo "${flag}" | grep -q '^-L'; then
47872        if test "${LLVM_LDFLAGS}" != ""; then
47873          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47874        fi
47875        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47876      fi
47877    done
47878
47879    unset LLVM_LIBS
47880    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47881      if echo "${flag}" | grep -q '^-l'; then
47882        if test "${LLVM_LIBS}" != ""; then
47883          LLVM_LIBS="${LLVM_LIBS} "
47884        fi
47885        LLVM_LIBS="${LLVM_LIBS}${flag}"
47886      fi
47887    done
47888
47889
47890
47891
47892  fi
47893
47894  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47895  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
47896    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47897  fi
47898
47899  # TODO better (platform agnostic) test
47900  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
47901    LIBCXX="-lstdc++"
47902  fi
47903
47904
47905
47906
47907
47908###############################################################################
47909#
47910# We need to do some final tweaking, when everything else is done.
47911#
47912###############################################################################
47913
47914
47915  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47916
47917
47918  # The name of the Service Agent jar.
47919  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47920  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47921    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47922  fi
47923
47924
47925
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47927$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47928
47929    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47930      ENABLE_INTREE_EC=yes
47931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47932$as_echo "yes" >&6; }
47933    else
47934      ENABLE_INTREE_EC=no
47935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47936$as_echo "no" >&6; }
47937    fi
47938
47939
47940
47941
47942###############################################################################
47943#
47944# Configure parts of the build that only affect the build performance,
47945# not the result.
47946#
47947###############################################################################
47948
47949
47950  # How many cores do we have on this build system?
47951
47952# Check whether --with-num-cores was given.
47953if test "${with_num_cores+set}" = set; then :
47954  withval=$with_num_cores;
47955fi
47956
47957  if test "x$with_num_cores" = x; then
47958    # The number of cores were not specified, try to probe them.
47959
47960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47961$as_echo_n "checking for number of cores... " >&6; }
47962  NUM_CORES=1
47963  FOUND_CORES=no
47964
47965  if test -f /proc/cpuinfo; then
47966    # Looks like a Linux (or cygwin) system
47967    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47968    FOUND_CORES=yes
47969  elif test -x /usr/sbin/psrinfo; then
47970    # Looks like a Solaris system
47971    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47972    FOUND_CORES=yes
47973  elif test -x /usr/sbin/system_profiler; then
47974    # Looks like a MacOSX system
47975    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47976    FOUND_CORES=yes
47977  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47978    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47979    FOUND_CORES=yes
47980  elif test -n "$NUMBER_OF_PROCESSORS"; then
47981    # On windows, look in the env
47982    NUM_CORES=$NUMBER_OF_PROCESSORS
47983    FOUND_CORES=yes
47984  fi
47985
47986  if test "x$FOUND_CORES" = xyes; then
47987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47988$as_echo "$NUM_CORES" >&6; }
47989  else
47990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47991$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47992    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47993$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47994  fi
47995
47996  else
47997    NUM_CORES=$with_num_cores
47998  fi
47999
48000
48001
48002  # How much memory do we have on this build system?
48003
48004# Check whether --with-memory-size was given.
48005if test "${with_memory_size+set}" = set; then :
48006  withval=$with_memory_size;
48007fi
48008
48009  if test "x$with_memory_size" = x; then
48010    # The memory size was not specified, try to probe it.
48011
48012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48013$as_echo_n "checking for memory size... " >&6; }
48014  # Default to 1024 MB
48015  MEMORY_SIZE=1024
48016  FOUND_MEM=no
48017
48018  if test -f /proc/meminfo; then
48019    # Looks like a Linux (or cygwin) system
48020    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48021    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48022    FOUND_MEM=yes
48023  elif test -x /usr/sbin/prtconf; then
48024    # Looks like a Solaris or AIX system
48025    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48026    FOUND_MEM=yes
48027  elif test -x /usr/sbin/system_profiler; then
48028    # Looks like a MacOSX system
48029    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48030    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48031    FOUND_MEM=yes
48032  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48033    # Windows, but without cygwin
48034    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48035    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48036    FOUND_MEM=yes
48037  fi
48038
48039  if test "x$FOUND_MEM" = xyes; then
48040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48041$as_echo "$MEMORY_SIZE MB" >&6; }
48042  else
48043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48044$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48045    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48046$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48047  fi
48048
48049  else
48050    MEMORY_SIZE=$with_memory_size
48051  fi
48052
48053
48054
48055  # Provide a decent default number of parallel jobs for make depending on
48056  # number of cores, amount of memory and machine architecture.
48057
48058# Check whether --with-jobs was given.
48059if test "${with_jobs+set}" = set; then :
48060  withval=$with_jobs;
48061fi
48062
48063  if test "x$with_jobs" = x; then
48064    # Number of jobs was not specified, calculate.
48065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48066$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48067    # Approximate memory in GB, rounding up a bit.
48068    memory_gb=`expr $MEMORY_SIZE / 1100`
48069    # Pick the lowest of memory in gb and number of cores.
48070    if test "$memory_gb" -lt "$NUM_CORES"; then
48071      JOBS="$memory_gb"
48072    else
48073      JOBS="$NUM_CORES"
48074      # On bigger machines, leave some room for other processes to run
48075      if test "$JOBS" -gt "4"; then
48076        JOBS=`expr $JOBS '*' 90 / 100`
48077      fi
48078    fi
48079    # Cap number of jobs to 16
48080    if test "$JOBS" -gt "16"; then
48081      JOBS=16
48082    fi
48083    if test "$JOBS" -eq "0"; then
48084      JOBS=1
48085    fi
48086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48087$as_echo "$JOBS" >&6; }
48088  else
48089    JOBS=$with_jobs
48090  fi
48091
48092
48093
48094# Setup smart javac (after cores and memory have been setup)
48095
48096
48097# Check whether --with-sjavac-server-java was given.
48098if test "${with_sjavac_server_java+set}" = set; then :
48099  withval=$with_sjavac_server_java;
48100fi
48101
48102
48103  if test "x$with_sjavac_server_java" != x; then
48104    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48105    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48106    if test "x$FOUND_VERSION" = x; then
48107      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48108    fi
48109  else
48110    SJAVAC_SERVER_JAVA=""
48111    # Hotspot specific options.
48112
48113  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48114  $ECHO "Command: $JAVA -verbosegc -version" >&5
48115  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48116  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48117  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48118  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48119    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48120    JVM_ARG_OK=true
48121  else
48122    $ECHO "Arg failed:" >&5
48123    $ECHO "$OUTPUT" >&5
48124    JVM_ARG_OK=false
48125  fi
48126
48127    # JRockit specific options.
48128
48129  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48130  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48131  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48132  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48133  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48134  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48135    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48136    JVM_ARG_OK=true
48137  else
48138    $ECHO "Arg failed:" >&5
48139    $ECHO "$OUTPUT" >&5
48140    JVM_ARG_OK=false
48141  fi
48142
48143    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48144  fi
48145
48146
48147  if test "$MEMORY_SIZE" -gt "2500"; then
48148
48149  $ECHO "Check if jvm arg is ok: -d64" >&5
48150  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48151  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48152  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48153  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48155    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48156    JVM_ARG_OK=true
48157  else
48158    $ECHO "Arg failed:" >&5
48159    $ECHO "$OUTPUT" >&5
48160    JVM_ARG_OK=false
48161  fi
48162
48163    if test "$JVM_ARG_OK" = true; then
48164      JVM_64BIT=true
48165      JVM_ARG_OK=false
48166    fi
48167  fi
48168
48169  if test "$JVM_64BIT" = true; then
48170    if test "$MEMORY_SIZE" -gt "17000"; then
48171
48172  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48173  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48174  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48175  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48176  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48177  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48178    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48179    JVM_ARG_OK=true
48180  else
48181    $ECHO "Arg failed:" >&5
48182    $ECHO "$OUTPUT" >&5
48183    JVM_ARG_OK=false
48184  fi
48185
48186    fi
48187    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48188
48189  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48190  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48191  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48192  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48193  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48195    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48196    JVM_ARG_OK=true
48197  else
48198    $ECHO "Arg failed:" >&5
48199    $ECHO "$OUTPUT" >&5
48200    JVM_ARG_OK=false
48201  fi
48202
48203    fi
48204    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48205
48206  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48207  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48208  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48209  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48210  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48211  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48212    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48213    JVM_ARG_OK=true
48214  else
48215    $ECHO "Arg failed:" >&5
48216    $ECHO "$OUTPUT" >&5
48217    JVM_ARG_OK=false
48218  fi
48219
48220    fi
48221    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48222
48223  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48224  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48225  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48226  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48227  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48228  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48229    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48230    JVM_ARG_OK=true
48231  else
48232    $ECHO "Arg failed:" >&5
48233    $ECHO "$OUTPUT" >&5
48234    JVM_ARG_OK=false
48235  fi
48236
48237    fi
48238  fi
48239  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48240
48241  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48242  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48243  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48244  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48245  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48246  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48247    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48248    JVM_ARG_OK=true
48249  else
48250    $ECHO "Arg failed:" >&5
48251    $ECHO "$OUTPUT" >&5
48252    JVM_ARG_OK=false
48253  fi
48254
48255  fi
48256  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48257
48258  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48259  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48260  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48261  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48262  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48263  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48264    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48265    JVM_ARG_OK=true
48266  else
48267    $ECHO "Arg failed:" >&5
48268    $ECHO "$OUTPUT" >&5
48269    JVM_ARG_OK=false
48270  fi
48271
48272  fi
48273  if test "$JVM_ARG_OK" = false; then
48274
48275  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48276  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48277  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48278  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48279  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48280  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48281    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48282    JVM_ARG_OK=true
48283  else
48284    $ECHO "Arg failed:" >&5
48285    $ECHO "$OUTPUT" >&5
48286    JVM_ARG_OK=false
48287  fi
48288
48289  fi
48290
48291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48292$as_echo_n "checking whether to use sjavac... " >&6; }
48293  # Check whether --enable-sjavac was given.
48294if test "${enable_sjavac+set}" = set; then :
48295  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48296else
48297  ENABLE_SJAVAC='no'
48298fi
48299
48300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48301$as_echo "$ENABLE_SJAVAC" >&6; }
48302
48303
48304  if test "x$ENABLE_SJAVAC" = xyes; then
48305    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48306  else
48307    SJAVAC_SERVER_DIR=
48308  fi
48309
48310
48311
48312# Can the C/C++ compiler use precompiled headers?
48313
48314
48315  ###############################################################################
48316  #
48317  # Can the C/C++ compiler use precompiled headers?
48318  #
48319  # Check whether --enable-precompiled-headers was given.
48320if test "${enable_precompiled_headers+set}" = set; then :
48321  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48322else
48323  ENABLE_PRECOMPH=yes
48324fi
48325
48326
48327  USE_PRECOMPILED_HEADER=1
48328  if test "x$ENABLE_PRECOMPH" = xno; then
48329    USE_PRECOMPILED_HEADER=0
48330  fi
48331
48332  if test "x$ENABLE_PRECOMPH" = xyes; then
48333    # Check that the compiler actually supports precomp headers.
48334    if test "x$GCC" = xyes; then
48335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48336$as_echo_n "checking that precompiled headers work... " >&6; }
48337      echo "int alfa();" > conftest.h
48338      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48339      if test ! -f conftest.hpp.gch; then
48340        USE_PRECOMPILED_HEADER=0
48341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48342$as_echo "no" >&6; }
48343      else
48344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48345$as_echo "yes" >&6; }
48346      fi
48347      rm -f conftest.h conftest.hpp.gch
48348    fi
48349  fi
48350
48351
48352
48353
48354# Setup use of ccache, if available
48355
48356  # Check whether --enable-ccache was given.
48357if test "${enable_ccache+set}" = set; then :
48358  enableval=$enable_ccache;
48359fi
48360
48361
48362  CCACHE=
48363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48364$as_echo_n "checking is ccache enabled... " >&6; }
48365  ENABLE_CCACHE=$enable_ccache
48366  if test "x$enable_ccache" = xyes; then
48367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48368$as_echo "yes" >&6; }
48369    OLD_PATH="$PATH"
48370    if test "x$TOOLS_DIR" != x; then
48371      PATH=$TOOLS_DIR:$PATH
48372    fi
48373
48374
48375
48376  # Publish this variable in the help.
48377
48378
48379  if test "x$CCACHE" = x; then
48380    # The variable is not set by user, try to locate tool using the code snippet
48381    for ac_prog in ccache
48382do
48383  # Extract the first word of "$ac_prog", so it can be a program name with args.
48384set dummy $ac_prog; ac_word=$2
48385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48386$as_echo_n "checking for $ac_word... " >&6; }
48387if ${ac_cv_path_CCACHE+:} false; then :
48388  $as_echo_n "(cached) " >&6
48389else
48390  case $CCACHE in
48391  [\\/]* | ?:[\\/]*)
48392  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48393  ;;
48394  *)
48395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48396for as_dir in $PATH
48397do
48398  IFS=$as_save_IFS
48399  test -z "$as_dir" && as_dir=.
48400    for ac_exec_ext in '' $ac_executable_extensions; do
48401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48402    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48404    break 2
48405  fi
48406done
48407  done
48408IFS=$as_save_IFS
48409
48410  ;;
48411esac
48412fi
48413CCACHE=$ac_cv_path_CCACHE
48414if test -n "$CCACHE"; then
48415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48416$as_echo "$CCACHE" >&6; }
48417else
48418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48419$as_echo "no" >&6; }
48420fi
48421
48422
48423  test -n "$CCACHE" && break
48424done
48425
48426  else
48427    # The variable is set, but is it from the command line or the environment?
48428
48429    # Try to remove the string !CCACHE! from our list.
48430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48432      # If it failed, the variable was not from the command line. Ignore it,
48433      # but warn the user (except for BASH, which is always set by the calling BASH).
48434      if test "xCCACHE" != xBASH; then
48435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48436$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48437      fi
48438      # Try to locate tool using the code snippet
48439      for ac_prog in ccache
48440do
48441  # Extract the first word of "$ac_prog", so it can be a program name with args.
48442set dummy $ac_prog; ac_word=$2
48443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48444$as_echo_n "checking for $ac_word... " >&6; }
48445if ${ac_cv_path_CCACHE+:} false; then :
48446  $as_echo_n "(cached) " >&6
48447else
48448  case $CCACHE in
48449  [\\/]* | ?:[\\/]*)
48450  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48451  ;;
48452  *)
48453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48454for as_dir in $PATH
48455do
48456  IFS=$as_save_IFS
48457  test -z "$as_dir" && as_dir=.
48458    for ac_exec_ext in '' $ac_executable_extensions; do
48459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48460    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48462    break 2
48463  fi
48464done
48465  done
48466IFS=$as_save_IFS
48467
48468  ;;
48469esac
48470fi
48471CCACHE=$ac_cv_path_CCACHE
48472if test -n "$CCACHE"; then
48473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48474$as_echo "$CCACHE" >&6; }
48475else
48476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48477$as_echo "no" >&6; }
48478fi
48479
48480
48481  test -n "$CCACHE" && break
48482done
48483
48484    else
48485      # If it succeeded, then it was overridden by the user. We will use it
48486      # for the tool.
48487
48488      # First remove it from the list of overridden variables, so we can test
48489      # for unknown variables in the end.
48490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48491
48492      # Check if the provided tool contains a complete path.
48493      tool_specified="$CCACHE"
48494      tool_basename="${tool_specified##*/}"
48495      if test "x$tool_basename" = "x$tool_specified"; then
48496        # A command without a complete path is provided, search $PATH.
48497        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48498$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48499        # Extract the first word of "$tool_basename", so it can be a program name with args.
48500set dummy $tool_basename; ac_word=$2
48501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48502$as_echo_n "checking for $ac_word... " >&6; }
48503if ${ac_cv_path_CCACHE+:} false; then :
48504  $as_echo_n "(cached) " >&6
48505else
48506  case $CCACHE in
48507  [\\/]* | ?:[\\/]*)
48508  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48509  ;;
48510  *)
48511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48512for as_dir in $PATH
48513do
48514  IFS=$as_save_IFS
48515  test -z "$as_dir" && as_dir=.
48516    for ac_exec_ext in '' $ac_executable_extensions; do
48517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48518    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48520    break 2
48521  fi
48522done
48523  done
48524IFS=$as_save_IFS
48525
48526  ;;
48527esac
48528fi
48529CCACHE=$ac_cv_path_CCACHE
48530if test -n "$CCACHE"; then
48531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48532$as_echo "$CCACHE" >&6; }
48533else
48534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48535$as_echo "no" >&6; }
48536fi
48537
48538
48539        if test "x$CCACHE" = x; then
48540          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48541        fi
48542      else
48543        # Otherwise we believe it is a complete path. Use it as it is.
48544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48545$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48547$as_echo_n "checking for CCACHE... " >&6; }
48548        if test ! -x "$tool_specified"; then
48549          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48550$as_echo "not found" >&6; }
48551          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48552        fi
48553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48554$as_echo "$tool_specified" >&6; }
48555      fi
48556    fi
48557  fi
48558
48559
48560
48561  if test "x$CCACHE" = x; then
48562    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48563  fi
48564
48565
48566    CCACHE_STATUS="enabled"
48567    PATH="$OLD_PATH"
48568  elif test "x$enable_ccache" = xno; then
48569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48570$as_echo "no, explicitly disabled" >&6; }
48571  elif test "x$enable_ccache" = x; then
48572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48573$as_echo "no" >&6; }
48574  else
48575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48576$as_echo "unknown" >&6; }
48577    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48578  fi
48579
48580
48581
48582# Check whether --with-ccache-dir was given.
48583if test "${with_ccache_dir+set}" = set; then :
48584  withval=$with_ccache_dir;
48585fi
48586
48587
48588  if test "x$with_ccache_dir" != x; then
48589    # When using a non home ccache directory, assume the use is to share ccache files
48590    # with other users. Thus change the umask.
48591    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48592    if test "x$CCACHE" = x; then
48593      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48594$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48595    fi
48596  fi
48597
48598  if test "x$CCACHE" != x; then
48599
48600  if test "x$CCACHE" != x; then
48601    # Only use ccache if it is 3.1.4 or later, which supports
48602    # precompiled headers.
48603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48604$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48605    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48606    if test "x$HAS_GOOD_CCACHE" = x; then
48607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48608$as_echo "no, disabling ccache" >&6; }
48609      CCACHE=
48610      CCACHE_STATUS="disabled"
48611    else
48612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48613$as_echo "yes" >&6; }
48614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48615$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48616      PUSHED_FLAGS="$CXXFLAGS"
48617      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48618      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48619/* end confdefs.h.  */
48620
48621int
48622main ()
48623{
48624
48625  ;
48626  return 0;
48627}
48628_ACEOF
48629if ac_fn_cxx_try_compile "$LINENO"; then :
48630  CC_KNOWS_CCACHE_TRICK=yes
48631else
48632  CC_KNOWS_CCACHE_TRICK=no
48633fi
48634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48635      CXXFLAGS="$PUSHED_FLAGS"
48636      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48638$as_echo "yes" >&6; }
48639      else
48640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48641$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48642        CCACHE=
48643        CCACHE_STATUS="disabled"
48644      fi
48645    fi
48646  fi
48647
48648  if test "x$CCACHE" != x; then
48649    CCACHE_SLOPPINESS=time_macros
48650    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48651    CCACHE_FLAGS=-fpch-preprocess
48652
48653    if test "x$SET_CCACHE_DIR" != x; then
48654      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48655      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48656    fi
48657  fi
48658
48659  fi
48660
48661
48662###############################################################################
48663#
48664# And now the finish...
48665#
48666###############################################################################
48667
48668# Check for some common pitfalls
48669
48670  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48671    file_to_test="$SRC_ROOT/LICENSE"
48672    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48673      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
48674    fi
48675  fi
48676
48677
48678  # Did user specify any unknown variables?
48679
48680  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48681    # Replace the separating ! with spaces before presenting for end user.
48682    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48683    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48684$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48685  fi
48686
48687
48688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48689$as_echo_n "checking if build directory is on local disk... " >&6; }
48690
48691  # df -l lists only local disks; if the given directory is not found then
48692  # a non-zero exit code is given
48693  if test "x$DF" = x; then
48694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48695      # msys does not have df; use Windows "net use" instead.
48696      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48697      if test "x$IS_NETWORK_DISK" = x; then
48698        OUTPUT_DIR_IS_LOCAL="yes"
48699      else
48700        OUTPUT_DIR_IS_LOCAL="no"
48701      fi
48702    else
48703      # No df here, say it's local
48704      OUTPUT_DIR_IS_LOCAL="yes"
48705    fi
48706  else
48707    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48708      OUTPUT_DIR_IS_LOCAL="yes"
48709    else
48710      OUTPUT_DIR_IS_LOCAL="no"
48711    fi
48712  fi
48713
48714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48715$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48716
48717
48718
48719  # Check if the user has any old-style ALT_ variables set.
48720  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48721
48722  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48723  # Since we can't properly handle the dependencies for this, warn the user about the situation
48724  if test -e $OUTPUT_ROOT/spec.gmk; then
48725    IS_RECONFIGURE=yes
48726  else
48727    IS_RECONFIGURE=no
48728  fi
48729
48730
48731# At the end, call the custom hook. (Dummy macro if no custom sources available)
48732
48733
48734# We're messing a bit with internal autoconf variables to put the config.status
48735# in the output directory instead of the current directory.
48736CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48737
48738# Create the actual output files. Now the main work of configure is done.
48739cat >confcache <<\_ACEOF
48740# This file is a shell script that caches the results of configure
48741# tests run on this system so they can be shared between configure
48742# scripts and configure runs, see configure's option --config-cache.
48743# It is not useful on other systems.  If it contains results you don't
48744# want to keep, you may remove or edit it.
48745#
48746# config.status only pays attention to the cache file if you give it
48747# the --recheck option to rerun configure.
48748#
48749# `ac_cv_env_foo' variables (set or unset) will be overridden when
48750# loading this file, other *unset* `ac_cv_foo' will be assigned the
48751# following values.
48752
48753_ACEOF
48754
48755# The following way of writing the cache mishandles newlines in values,
48756# but we know of no workaround that is simple, portable, and efficient.
48757# So, we kill variables containing newlines.
48758# Ultrix sh set writes to stderr and can't be redirected directly,
48759# and sets the high bit in the cache file unless we assign to the vars.
48760(
48761  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48762    eval ac_val=\$$ac_var
48763    case $ac_val in #(
48764    *${as_nl}*)
48765      case $ac_var in #(
48766      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48767$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48768      esac
48769      case $ac_var in #(
48770      _ | IFS | as_nl) ;; #(
48771      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48772      *) { eval $ac_var=; unset $ac_var;} ;;
48773      esac ;;
48774    esac
48775  done
48776
48777  (set) 2>&1 |
48778    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48779    *${as_nl}ac_space=\ *)
48780      # `set' does not quote correctly, so add quotes: double-quote
48781      # substitution turns \\\\ into \\, and sed turns \\ into \.
48782      sed -n \
48783	"s/'/'\\\\''/g;
48784	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48785      ;; #(
48786    *)
48787      # `set' quotes correctly as required by POSIX, so do not add quotes.
48788      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48789      ;;
48790    esac |
48791    sort
48792) |
48793  sed '
48794     /^ac_cv_env_/b end
48795     t clear
48796     :clear
48797     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48798     t end
48799     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48800     :end' >>confcache
48801if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48802  if test -w "$cache_file"; then
48803    if test "x$cache_file" != "x/dev/null"; then
48804      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48805$as_echo "$as_me: updating cache $cache_file" >&6;}
48806      if test ! -f "$cache_file" || test -h "$cache_file"; then
48807	cat confcache >"$cache_file"
48808      else
48809        case $cache_file in #(
48810        */* | ?:*)
48811	  mv -f confcache "$cache_file"$$ &&
48812	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48813        *)
48814	  mv -f confcache "$cache_file" ;;
48815	esac
48816      fi
48817    fi
48818  else
48819    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48820$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48821  fi
48822fi
48823rm -f confcache
48824
48825test "x$prefix" = xNONE && prefix=$ac_default_prefix
48826# Let make expand exec_prefix.
48827test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48828
48829DEFS=-DHAVE_CONFIG_H
48830
48831ac_libobjs=
48832ac_ltlibobjs=
48833U=
48834for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48835  # 1. Remove the extension, and $U if already installed.
48836  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48837  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48838  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48839  #    will be set to the directory where LIBOBJS objects are built.
48840  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48841  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48842done
48843LIBOBJS=$ac_libobjs
48844
48845LTLIBOBJS=$ac_ltlibobjs
48846
48847
48848
48849: "${CONFIG_STATUS=./config.status}"
48850ac_write_fail=0
48851ac_clean_files_save=$ac_clean_files
48852ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48853{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48854$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48855as_write_fail=0
48856cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48857#! $SHELL
48858# Generated by $as_me.
48859# Run this file to recreate the current configuration.
48860# Compiler output produced by configure, useful for debugging
48861# configure, is in config.log if it exists.
48862
48863debug=false
48864ac_cs_recheck=false
48865ac_cs_silent=false
48866
48867SHELL=\${CONFIG_SHELL-$SHELL}
48868export SHELL
48869_ASEOF
48870cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48871## -------------------- ##
48872## M4sh Initialization. ##
48873## -------------------- ##
48874
48875# Be more Bourne compatible
48876DUALCASE=1; export DUALCASE # for MKS sh
48877if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48878  emulate sh
48879  NULLCMD=:
48880  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48881  # is contrary to our usage.  Disable this feature.
48882  alias -g '${1+"$@"}'='"$@"'
48883  setopt NO_GLOB_SUBST
48884else
48885  case `(set -o) 2>/dev/null` in #(
48886  *posix*) :
48887    set -o posix ;; #(
48888  *) :
48889     ;;
48890esac
48891fi
48892
48893
48894as_nl='
48895'
48896export as_nl
48897# Printing a long string crashes Solaris 7 /usr/bin/printf.
48898as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48899as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48900as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48901# Prefer a ksh shell builtin over an external printf program on Solaris,
48902# but without wasting forks for bash or zsh.
48903if test -z "$BASH_VERSION$ZSH_VERSION" \
48904    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48905  as_echo='print -r --'
48906  as_echo_n='print -rn --'
48907elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48908  as_echo='printf %s\n'
48909  as_echo_n='printf %s'
48910else
48911  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48912    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48913    as_echo_n='/usr/ucb/echo -n'
48914  else
48915    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48916    as_echo_n_body='eval
48917      arg=$1;
48918      case $arg in #(
48919      *"$as_nl"*)
48920	expr "X$arg" : "X\\(.*\\)$as_nl";
48921	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48922      esac;
48923      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48924    '
48925    export as_echo_n_body
48926    as_echo_n='sh -c $as_echo_n_body as_echo'
48927  fi
48928  export as_echo_body
48929  as_echo='sh -c $as_echo_body as_echo'
48930fi
48931
48932# The user is always right.
48933if test "${PATH_SEPARATOR+set}" != set; then
48934  PATH_SEPARATOR=:
48935  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48936    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48937      PATH_SEPARATOR=';'
48938  }
48939fi
48940
48941
48942# IFS
48943# We need space, tab and new line, in precisely that order.  Quoting is
48944# there to prevent editors from complaining about space-tab.
48945# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48946# splitting by setting IFS to empty value.)
48947IFS=" ""	$as_nl"
48948
48949# Find who we are.  Look in the path if we contain no directory separator.
48950as_myself=
48951case $0 in #((
48952  *[\\/]* ) as_myself=$0 ;;
48953  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48954for as_dir in $PATH
48955do
48956  IFS=$as_save_IFS
48957  test -z "$as_dir" && as_dir=.
48958    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48959  done
48960IFS=$as_save_IFS
48961
48962     ;;
48963esac
48964# We did not find ourselves, most probably we were run as `sh COMMAND'
48965# in which case we are not to be found in the path.
48966if test "x$as_myself" = x; then
48967  as_myself=$0
48968fi
48969if test ! -f "$as_myself"; then
48970  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48971  exit 1
48972fi
48973
48974# Unset variables that we do not need and which cause bugs (e.g. in
48975# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48976# suppresses any "Segmentation fault" message there.  '((' could
48977# trigger a bug in pdksh 5.2.14.
48978for as_var in BASH_ENV ENV MAIL MAILPATH
48979do eval test x\${$as_var+set} = xset \
48980  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48981done
48982PS1='$ '
48983PS2='> '
48984PS4='+ '
48985
48986# NLS nuisances.
48987LC_ALL=C
48988export LC_ALL
48989LANGUAGE=C
48990export LANGUAGE
48991
48992# CDPATH.
48993(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48994
48995
48996# as_fn_error STATUS ERROR [LINENO LOG_FD]
48997# ----------------------------------------
48998# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48999# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49000# script with STATUS, using 1 if that was 0.
49001as_fn_error ()
49002{
49003  as_status=$1; test $as_status -eq 0 && as_status=1
49004  if test "$4"; then
49005    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49006    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49007  fi
49008  $as_echo "$as_me: error: $2" >&2
49009  as_fn_exit $as_status
49010} # as_fn_error
49011
49012
49013# as_fn_set_status STATUS
49014# -----------------------
49015# Set $? to STATUS, without forking.
49016as_fn_set_status ()
49017{
49018  return $1
49019} # as_fn_set_status
49020
49021# as_fn_exit STATUS
49022# -----------------
49023# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49024as_fn_exit ()
49025{
49026  set +e
49027  as_fn_set_status $1
49028  exit $1
49029} # as_fn_exit
49030
49031# as_fn_unset VAR
49032# ---------------
49033# Portably unset VAR.
49034as_fn_unset ()
49035{
49036  { eval $1=; unset $1;}
49037}
49038as_unset=as_fn_unset
49039# as_fn_append VAR VALUE
49040# ----------------------
49041# Append the text in VALUE to the end of the definition contained in VAR. Take
49042# advantage of any shell optimizations that allow amortized linear growth over
49043# repeated appends, instead of the typical quadratic growth present in naive
49044# implementations.
49045if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49046  eval 'as_fn_append ()
49047  {
49048    eval $1+=\$2
49049  }'
49050else
49051  as_fn_append ()
49052  {
49053    eval $1=\$$1\$2
49054  }
49055fi # as_fn_append
49056
49057# as_fn_arith ARG...
49058# ------------------
49059# Perform arithmetic evaluation on the ARGs, and store the result in the
49060# global $as_val. Take advantage of shells that can avoid forks. The arguments
49061# must be portable across $(()) and expr.
49062if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49063  eval 'as_fn_arith ()
49064  {
49065    as_val=$(( $* ))
49066  }'
49067else
49068  as_fn_arith ()
49069  {
49070    as_val=`expr "$@" || test $? -eq 1`
49071  }
49072fi # as_fn_arith
49073
49074
49075if expr a : '\(a\)' >/dev/null 2>&1 &&
49076   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49077  as_expr=expr
49078else
49079  as_expr=false
49080fi
49081
49082if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49083  as_basename=basename
49084else
49085  as_basename=false
49086fi
49087
49088if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49089  as_dirname=dirname
49090else
49091  as_dirname=false
49092fi
49093
49094as_me=`$as_basename -- "$0" ||
49095$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49096	 X"$0" : 'X\(//\)$' \| \
49097	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49098$as_echo X/"$0" |
49099    sed '/^.*\/\([^/][^/]*\)\/*$/{
49100	    s//\1/
49101	    q
49102	  }
49103	  /^X\/\(\/\/\)$/{
49104	    s//\1/
49105	    q
49106	  }
49107	  /^X\/\(\/\).*/{
49108	    s//\1/
49109	    q
49110	  }
49111	  s/.*/./; q'`
49112
49113# Avoid depending upon Character Ranges.
49114as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49115as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49116as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49117as_cr_digits='0123456789'
49118as_cr_alnum=$as_cr_Letters$as_cr_digits
49119
49120ECHO_C= ECHO_N= ECHO_T=
49121case `echo -n x` in #(((((
49122-n*)
49123  case `echo 'xy\c'` in
49124  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49125  xy)  ECHO_C='\c';;
49126  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49127       ECHO_T='	';;
49128  esac;;
49129*)
49130  ECHO_N='-n';;
49131esac
49132
49133rm -f conf$$ conf$$.exe conf$$.file
49134if test -d conf$$.dir; then
49135  rm -f conf$$.dir/conf$$.file
49136else
49137  rm -f conf$$.dir
49138  mkdir conf$$.dir 2>/dev/null
49139fi
49140if (echo >conf$$.file) 2>/dev/null; then
49141  if ln -s conf$$.file conf$$ 2>/dev/null; then
49142    as_ln_s='ln -s'
49143    # ... but there are two gotchas:
49144    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49145    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49146    # In both cases, we have to default to `cp -pR'.
49147    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49148      as_ln_s='cp -pR'
49149  elif ln conf$$.file conf$$ 2>/dev/null; then
49150    as_ln_s=ln
49151  else
49152    as_ln_s='cp -pR'
49153  fi
49154else
49155  as_ln_s='cp -pR'
49156fi
49157rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49158rmdir conf$$.dir 2>/dev/null
49159
49160
49161# as_fn_mkdir_p
49162# -------------
49163# Create "$as_dir" as a directory, including parents if necessary.
49164as_fn_mkdir_p ()
49165{
49166
49167  case $as_dir in #(
49168  -*) as_dir=./$as_dir;;
49169  esac
49170  test -d "$as_dir" || eval $as_mkdir_p || {
49171    as_dirs=
49172    while :; do
49173      case $as_dir in #(
49174      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49175      *) as_qdir=$as_dir;;
49176      esac
49177      as_dirs="'$as_qdir' $as_dirs"
49178      as_dir=`$as_dirname -- "$as_dir" ||
49179$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49180	 X"$as_dir" : 'X\(//\)[^/]' \| \
49181	 X"$as_dir" : 'X\(//\)$' \| \
49182	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49183$as_echo X"$as_dir" |
49184    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49185	    s//\1/
49186	    q
49187	  }
49188	  /^X\(\/\/\)[^/].*/{
49189	    s//\1/
49190	    q
49191	  }
49192	  /^X\(\/\/\)$/{
49193	    s//\1/
49194	    q
49195	  }
49196	  /^X\(\/\).*/{
49197	    s//\1/
49198	    q
49199	  }
49200	  s/.*/./; q'`
49201      test -d "$as_dir" && break
49202    done
49203    test -z "$as_dirs" || eval "mkdir $as_dirs"
49204  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49205
49206
49207} # as_fn_mkdir_p
49208if mkdir -p . 2>/dev/null; then
49209  as_mkdir_p='mkdir -p "$as_dir"'
49210else
49211  test -d ./-p && rmdir ./-p
49212  as_mkdir_p=false
49213fi
49214
49215
49216# as_fn_executable_p FILE
49217# -----------------------
49218# Test if FILE is an executable regular file.
49219as_fn_executable_p ()
49220{
49221  test -f "$1" && test -x "$1"
49222} # as_fn_executable_p
49223as_test_x='test -x'
49224as_executable_p=as_fn_executable_p
49225
49226# Sed expression to map a string onto a valid CPP name.
49227as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49228
49229# Sed expression to map a string onto a valid variable name.
49230as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49231
49232
49233exec 6>&1
49234## ----------------------------------- ##
49235## Main body of $CONFIG_STATUS script. ##
49236## ----------------------------------- ##
49237_ASEOF
49238test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49239
49240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49241# Save the log message, to keep $0 and so on meaningful, and to
49242# report actual input values of CONFIG_FILES etc. instead of their
49243# values after options handling.
49244ac_log="
49245This file was extended by OpenJDK $as_me jdk8, which was
49246generated by GNU Autoconf 2.69.  Invocation command line was
49247
49248  CONFIG_FILES    = $CONFIG_FILES
49249  CONFIG_HEADERS  = $CONFIG_HEADERS
49250  CONFIG_LINKS    = $CONFIG_LINKS
49251  CONFIG_COMMANDS = $CONFIG_COMMANDS
49252  $ $0 $@
49253
49254on `(hostname || uname -n) 2>/dev/null | sed 1q`
49255"
49256
49257_ACEOF
49258
49259case $ac_config_files in *"
49260"*) set x $ac_config_files; shift; ac_config_files=$*;;
49261esac
49262
49263case $ac_config_headers in *"
49264"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49265esac
49266
49267
49268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49269# Files that config.status was made for.
49270config_files="$ac_config_files"
49271config_headers="$ac_config_headers"
49272
49273_ACEOF
49274
49275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49276ac_cs_usage="\
49277\`$as_me' instantiates files and other configuration actions
49278from templates according to the current configuration.  Unless the files
49279and actions are specified as TAGs, all are instantiated by default.
49280
49281Usage: $0 [OPTION]... [TAG]...
49282
49283  -h, --help       print this help, then exit
49284  -V, --version    print version number and configuration settings, then exit
49285      --config     print configuration, then exit
49286  -q, --quiet, --silent
49287                   do not print progress messages
49288  -d, --debug      don't remove temporary files
49289      --recheck    update $as_me by reconfiguring in the same conditions
49290      --file=FILE[:TEMPLATE]
49291                   instantiate the configuration file FILE
49292      --header=FILE[:TEMPLATE]
49293                   instantiate the configuration header FILE
49294
49295Configuration files:
49296$config_files
49297
49298Configuration headers:
49299$config_headers
49300
49301Report bugs to <build-dev@openjdk.java.net>.
49302OpenJDK home page: <http://openjdk.java.net>."
49303
49304_ACEOF
49305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49306ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49307ac_cs_version="\\
49308OpenJDK config.status jdk8
49309configured by $0, generated by GNU Autoconf 2.69,
49310  with options \\"\$ac_cs_config\\"
49311
49312Copyright (C) 2012 Free Software Foundation, Inc.
49313This config.status script is free software; the Free Software Foundation
49314gives unlimited permission to copy, distribute and modify it."
49315
49316ac_pwd='$ac_pwd'
49317srcdir='$srcdir'
49318AWK='$AWK'
49319test -n "\$AWK" || AWK=awk
49320_ACEOF
49321
49322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49323# The default lists apply if the user does not specify any file.
49324ac_need_defaults=:
49325while test $# != 0
49326do
49327  case $1 in
49328  --*=?*)
49329    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49330    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49331    ac_shift=:
49332    ;;
49333  --*=)
49334    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49335    ac_optarg=
49336    ac_shift=:
49337    ;;
49338  *)
49339    ac_option=$1
49340    ac_optarg=$2
49341    ac_shift=shift
49342    ;;
49343  esac
49344
49345  case $ac_option in
49346  # Handling of the options.
49347  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49348    ac_cs_recheck=: ;;
49349  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49350    $as_echo "$ac_cs_version"; exit ;;
49351  --config | --confi | --conf | --con | --co | --c )
49352    $as_echo "$ac_cs_config"; exit ;;
49353  --debug | --debu | --deb | --de | --d | -d )
49354    debug=: ;;
49355  --file | --fil | --fi | --f )
49356    $ac_shift
49357    case $ac_optarg in
49358    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49359    '') as_fn_error $? "missing file argument" ;;
49360    esac
49361    as_fn_append CONFIG_FILES " '$ac_optarg'"
49362    ac_need_defaults=false;;
49363  --header | --heade | --head | --hea )
49364    $ac_shift
49365    case $ac_optarg in
49366    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49367    esac
49368    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49369    ac_need_defaults=false;;
49370  --he | --h)
49371    # Conflict between --help and --header
49372    as_fn_error $? "ambiguous option: \`$1'
49373Try \`$0 --help' for more information.";;
49374  --help | --hel | -h )
49375    $as_echo "$ac_cs_usage"; exit ;;
49376  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49377  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49378    ac_cs_silent=: ;;
49379
49380  # This is an error.
49381  -*) as_fn_error $? "unrecognized option: \`$1'
49382Try \`$0 --help' for more information." ;;
49383
49384  *) as_fn_append ac_config_targets " $1"
49385     ac_need_defaults=false ;;
49386
49387  esac
49388  shift
49389done
49390
49391ac_configure_extra_args=
49392
49393if $ac_cs_silent; then
49394  exec 6>/dev/null
49395  ac_configure_extra_args="$ac_configure_extra_args --silent"
49396fi
49397
49398_ACEOF
49399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49400if \$ac_cs_recheck; then
49401  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49402  shift
49403  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49404  CONFIG_SHELL='$SHELL'
49405  export CONFIG_SHELL
49406  exec "\$@"
49407fi
49408
49409_ACEOF
49410cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49411exec 5>>config.log
49412{
49413  echo
49414  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49415## Running $as_me. ##
49416_ASBOX
49417  $as_echo "$ac_log"
49418} >&5
49419
49420_ACEOF
49421cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49422_ACEOF
49423
49424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49425
49426# Handling of arguments.
49427for ac_config_target in $ac_config_targets
49428do
49429  case $ac_config_target in
49430    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49431    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49432    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49433    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49434    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49435    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49436    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49437
49438  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49439  esac
49440done
49441
49442
49443# If the user did not use the arguments to specify the items to instantiate,
49444# then the envvar interface is used.  Set only those that are not.
49445# We use the long form for the default assignment because of an extremely
49446# bizarre bug on SunOS 4.1.3.
49447if $ac_need_defaults; then
49448  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49449  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49450fi
49451
49452# Have a temporary directory for convenience.  Make it in the build tree
49453# simply because there is no reason against having it here, and in addition,
49454# creating and moving files from /tmp can sometimes cause problems.
49455# Hook for its removal unless debugging.
49456# Note that there is a small window in which the directory will not be cleaned:
49457# after its creation but before its name has been assigned to `$tmp'.
49458$debug ||
49459{
49460  tmp= ac_tmp=
49461  trap 'exit_status=$?
49462  : "${ac_tmp:=$tmp}"
49463  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49464' 0
49465  trap 'as_fn_exit 1' 1 2 13 15
49466}
49467# Create a (secure) tmp directory for tmp files.
49468
49469{
49470  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49471  test -d "$tmp"
49472}  ||
49473{
49474  tmp=./conf$$-$RANDOM
49475  (umask 077 && mkdir "$tmp")
49476} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49477ac_tmp=$tmp
49478
49479# Set up the scripts for CONFIG_FILES section.
49480# No need to generate them if there are no CONFIG_FILES.
49481# This happens for instance with `./config.status config.h'.
49482if test -n "$CONFIG_FILES"; then
49483
49484
49485ac_cr=`echo X | tr X '\015'`
49486# On cygwin, bash can eat \r inside `` if the user requested igncr.
49487# But we know of no other shell where ac_cr would be empty at this
49488# point, so we can use a bashism as a fallback.
49489if test "x$ac_cr" = x; then
49490  eval ac_cr=\$\'\\r\'
49491fi
49492ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49493if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49494  ac_cs_awk_cr='\\r'
49495else
49496  ac_cs_awk_cr=$ac_cr
49497fi
49498
49499echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49500_ACEOF
49501
49502
49503{
49504  echo "cat >conf$$subs.awk <<_ACEOF" &&
49505  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49506  echo "_ACEOF"
49507} >conf$$subs.sh ||
49508  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49509ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49510ac_delim='%!_!# '
49511for ac_last_try in false false false false false :; do
49512  . ./conf$$subs.sh ||
49513    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49514
49515  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49516  if test $ac_delim_n = $ac_delim_num; then
49517    break
49518  elif $ac_last_try; then
49519    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49520  else
49521    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49522  fi
49523done
49524rm -f conf$$subs.sh
49525
49526cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49527cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49528_ACEOF
49529sed -n '
49530h
49531s/^/S["/; s/!.*/"]=/
49532p
49533g
49534s/^[^!]*!//
49535:repl
49536t repl
49537s/'"$ac_delim"'$//
49538t delim
49539:nl
49540h
49541s/\(.\{148\}\)..*/\1/
49542t more1
49543s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49544p
49545n
49546b repl
49547:more1
49548s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49549p
49550g
49551s/.\{148\}//
49552t nl
49553:delim
49554h
49555s/\(.\{148\}\)..*/\1/
49556t more2
49557s/["\\]/\\&/g; s/^/"/; s/$/"/
49558p
49559b
49560:more2
49561s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49562p
49563g
49564s/.\{148\}//
49565t delim
49566' <conf$$subs.awk | sed '
49567/^[^""]/{
49568  N
49569  s/\n//
49570}
49571' >>$CONFIG_STATUS || ac_write_fail=1
49572rm -f conf$$subs.awk
49573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49574_ACAWK
49575cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49576  for (key in S) S_is_set[key] = 1
49577  FS = ""
49578
49579}
49580{
49581  line = $ 0
49582  nfields = split(line, field, "@")
49583  substed = 0
49584  len = length(field[1])
49585  for (i = 2; i < nfields; i++) {
49586    key = field[i]
49587    keylen = length(key)
49588    if (S_is_set[key]) {
49589      value = S[key]
49590      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49591      len += length(value) + length(field[++i])
49592      substed = 1
49593    } else
49594      len += 1 + keylen
49595  }
49596
49597  print line
49598}
49599
49600_ACAWK
49601_ACEOF
49602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49603if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49604  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49605else
49606  cat
49607fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49608  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49609_ACEOF
49610
49611# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49612# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49613# trailing colons and then remove the whole line if VPATH becomes empty
49614# (actually we leave an empty line to preserve line numbers).
49615if test "x$srcdir" = x.; then
49616  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49617h
49618s///
49619s/^/:/
49620s/[	 ]*$/:/
49621s/:\$(srcdir):/:/g
49622s/:\${srcdir}:/:/g
49623s/:@srcdir@:/:/g
49624s/^:*//
49625s/:*$//
49626x
49627s/\(=[	 ]*\).*/\1/
49628G
49629s/\n//
49630s/^[^=]*=[	 ]*$//
49631}'
49632fi
49633
49634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49635fi # test -n "$CONFIG_FILES"
49636
49637# Set up the scripts for CONFIG_HEADERS section.
49638# No need to generate them if there are no CONFIG_HEADERS.
49639# This happens for instance with `./config.status Makefile'.
49640if test -n "$CONFIG_HEADERS"; then
49641cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49642BEGIN {
49643_ACEOF
49644
49645# Transform confdefs.h into an awk script `defines.awk', embedded as
49646# here-document in config.status, that substitutes the proper values into
49647# config.h.in to produce config.h.
49648
49649# Create a delimiter string that does not exist in confdefs.h, to ease
49650# handling of long lines.
49651ac_delim='%!_!# '
49652for ac_last_try in false false :; do
49653  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49654  if test -z "$ac_tt"; then
49655    break
49656  elif $ac_last_try; then
49657    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49658  else
49659    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49660  fi
49661done
49662
49663# For the awk script, D is an array of macro values keyed by name,
49664# likewise P contains macro parameters if any.  Preserve backslash
49665# newline sequences.
49666
49667ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49668sed -n '
49669s/.\{148\}/&'"$ac_delim"'/g
49670t rset
49671:rset
49672s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49673t def
49674d
49675:def
49676s/\\$//
49677t bsnl
49678s/["\\]/\\&/g
49679s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49680D["\1"]=" \3"/p
49681s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49682d
49683:bsnl
49684s/["\\]/\\&/g
49685s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49686D["\1"]=" \3\\\\\\n"\\/p
49687t cont
49688s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49689t cont
49690d
49691:cont
49692n
49693s/.\{148\}/&'"$ac_delim"'/g
49694t clear
49695:clear
49696s/\\$//
49697t bsnlc
49698s/["\\]/\\&/g; s/^/"/; s/$/"/p
49699d
49700:bsnlc
49701s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49702b cont
49703' <confdefs.h | sed '
49704s/'"$ac_delim"'/"\\\
49705"/g' >>$CONFIG_STATUS || ac_write_fail=1
49706
49707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49708  for (key in D) D_is_set[key] = 1
49709  FS = ""
49710}
49711/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49712  line = \$ 0
49713  split(line, arg, " ")
49714  if (arg[1] == "#") {
49715    defundef = arg[2]
49716    mac1 = arg[3]
49717  } else {
49718    defundef = substr(arg[1], 2)
49719    mac1 = arg[2]
49720  }
49721  split(mac1, mac2, "(") #)
49722  macro = mac2[1]
49723  prefix = substr(line, 1, index(line, defundef) - 1)
49724  if (D_is_set[macro]) {
49725    # Preserve the white space surrounding the "#".
49726    print prefix "define", macro P[macro] D[macro]
49727    next
49728  } else {
49729    # Replace #undef with comments.  This is necessary, for example,
49730    # in the case of _POSIX_SOURCE, which is predefined and required
49731    # on some systems where configure will not decide to define it.
49732    if (defundef == "undef") {
49733      print "/*", prefix defundef, macro, "*/"
49734      next
49735    }
49736  }
49737}
49738{ print }
49739_ACAWK
49740_ACEOF
49741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49742  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49743fi # test -n "$CONFIG_HEADERS"
49744
49745
49746eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49747shift
49748for ac_tag
49749do
49750  case $ac_tag in
49751  :[FHLC]) ac_mode=$ac_tag; continue;;
49752  esac
49753  case $ac_mode$ac_tag in
49754  :[FHL]*:*);;
49755  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49756  :[FH]-) ac_tag=-:-;;
49757  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49758  esac
49759  ac_save_IFS=$IFS
49760  IFS=:
49761  set x $ac_tag
49762  IFS=$ac_save_IFS
49763  shift
49764  ac_file=$1
49765  shift
49766
49767  case $ac_mode in
49768  :L) ac_source=$1;;
49769  :[FH])
49770    ac_file_inputs=
49771    for ac_f
49772    do
49773      case $ac_f in
49774      -) ac_f="$ac_tmp/stdin";;
49775      *) # Look for the file first in the build tree, then in the source tree
49776	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49777	 # because $ac_f cannot contain `:'.
49778	 test -f "$ac_f" ||
49779	   case $ac_f in
49780	   [\\/$]*) false;;
49781	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49782	   esac ||
49783	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49784      esac
49785      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49786      as_fn_append ac_file_inputs " '$ac_f'"
49787    done
49788
49789    # Let's still pretend it is `configure' which instantiates (i.e., don't
49790    # use $as_me), people would be surprised to read:
49791    #    /* config.h.  Generated by config.status.  */
49792    configure_input='Generated from '`
49793	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49794	`' by configure.'
49795    if test x"$ac_file" != x-; then
49796      configure_input="$ac_file.  $configure_input"
49797      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49798$as_echo "$as_me: creating $ac_file" >&6;}
49799    fi
49800    # Neutralize special characters interpreted by sed in replacement strings.
49801    case $configure_input in #(
49802    *\&* | *\|* | *\\* )
49803       ac_sed_conf_input=`$as_echo "$configure_input" |
49804       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49805    *) ac_sed_conf_input=$configure_input;;
49806    esac
49807
49808    case $ac_tag in
49809    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49810      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49811    esac
49812    ;;
49813  esac
49814
49815  ac_dir=`$as_dirname -- "$ac_file" ||
49816$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49817	 X"$ac_file" : 'X\(//\)[^/]' \| \
49818	 X"$ac_file" : 'X\(//\)$' \| \
49819	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49820$as_echo X"$ac_file" |
49821    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49822	    s//\1/
49823	    q
49824	  }
49825	  /^X\(\/\/\)[^/].*/{
49826	    s//\1/
49827	    q
49828	  }
49829	  /^X\(\/\/\)$/{
49830	    s//\1/
49831	    q
49832	  }
49833	  /^X\(\/\).*/{
49834	    s//\1/
49835	    q
49836	  }
49837	  s/.*/./; q'`
49838  as_dir="$ac_dir"; as_fn_mkdir_p
49839  ac_builddir=.
49840
49841case "$ac_dir" in
49842.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49843*)
49844  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49845  # A ".." for each directory in $ac_dir_suffix.
49846  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49847  case $ac_top_builddir_sub in
49848  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49849  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49850  esac ;;
49851esac
49852ac_abs_top_builddir=$ac_pwd
49853ac_abs_builddir=$ac_pwd$ac_dir_suffix
49854# for backward compatibility:
49855ac_top_builddir=$ac_top_build_prefix
49856
49857case $srcdir in
49858  .)  # We are building in place.
49859    ac_srcdir=.
49860    ac_top_srcdir=$ac_top_builddir_sub
49861    ac_abs_top_srcdir=$ac_pwd ;;
49862  [\\/]* | ?:[\\/]* )  # Absolute name.
49863    ac_srcdir=$srcdir$ac_dir_suffix;
49864    ac_top_srcdir=$srcdir
49865    ac_abs_top_srcdir=$srcdir ;;
49866  *) # Relative name.
49867    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49868    ac_top_srcdir=$ac_top_build_prefix$srcdir
49869    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49870esac
49871ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49872
49873
49874  case $ac_mode in
49875  :F)
49876  #
49877  # CONFIG_FILE
49878  #
49879
49880_ACEOF
49881
49882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49883# If the template does not know about datarootdir, expand it.
49884# FIXME: This hack should be removed a few years after 2.60.
49885ac_datarootdir_hack=; ac_datarootdir_seen=
49886ac_sed_dataroot='
49887/datarootdir/ {
49888  p
49889  q
49890}
49891/@datadir@/p
49892/@docdir@/p
49893/@infodir@/p
49894/@localedir@/p
49895/@mandir@/p'
49896case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49897*datarootdir*) ac_datarootdir_seen=yes;;
49898*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49899  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49900$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49901_ACEOF
49902cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49903  ac_datarootdir_hack='
49904  s&@datadir@&$datadir&g
49905  s&@docdir@&$docdir&g
49906  s&@infodir@&$infodir&g
49907  s&@localedir@&$localedir&g
49908  s&@mandir@&$mandir&g
49909  s&\\\${datarootdir}&$datarootdir&g' ;;
49910esac
49911_ACEOF
49912
49913# Neutralize VPATH when `$srcdir' = `.'.
49914# Shell code in configure.ac might set extrasub.
49915# FIXME: do we really want to maintain this feature?
49916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49917ac_sed_extra="$ac_vpsub
49918$extrasub
49919_ACEOF
49920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49921:t
49922/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49923s|@configure_input@|$ac_sed_conf_input|;t t
49924s&@top_builddir@&$ac_top_builddir_sub&;t t
49925s&@top_build_prefix@&$ac_top_build_prefix&;t t
49926s&@srcdir@&$ac_srcdir&;t t
49927s&@abs_srcdir@&$ac_abs_srcdir&;t t
49928s&@top_srcdir@&$ac_top_srcdir&;t t
49929s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49930s&@builddir@&$ac_builddir&;t t
49931s&@abs_builddir@&$ac_abs_builddir&;t t
49932s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49933$ac_datarootdir_hack
49934"
49935eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49936  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49937
49938test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49939  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49940  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49941      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49942  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49943which seems to be undefined.  Please make sure it is defined" >&5
49944$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49945which seems to be undefined.  Please make sure it is defined" >&2;}
49946
49947  rm -f "$ac_tmp/stdin"
49948  case $ac_file in
49949  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49950  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49951  esac \
49952  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49953 ;;
49954  :H)
49955  #
49956  # CONFIG_HEADER
49957  #
49958  if test x"$ac_file" != x-; then
49959    {
49960      $as_echo "/* $configure_input  */" \
49961      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49962    } >"$ac_tmp/config.h" \
49963      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49964    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49965      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49966$as_echo "$as_me: $ac_file is unchanged" >&6;}
49967    else
49968      rm -f "$ac_file"
49969      mv "$ac_tmp/config.h" "$ac_file" \
49970	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49971    fi
49972  else
49973    $as_echo "/* $configure_input  */" \
49974      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49975      || as_fn_error $? "could not create -" "$LINENO" 5
49976  fi
49977 ;;
49978
49979
49980  esac
49981
49982done # for ac_tag
49983
49984
49985as_fn_exit 0
49986_ACEOF
49987ac_clean_files=$ac_clean_files_save
49988
49989test $ac_write_fail = 0 ||
49990  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49991
49992
49993# configure is writing to config.log, and then calls config.status.
49994# config.status does its own redirection, appending to config.log.
49995# Unfortunately, on DOS this fails, as config.log is still kept open
49996# by configure, so config.status won't be able to write to it; its
49997# output is simply discarded.  So we exec the FD to /dev/null,
49998# effectively closing config.log, so it can be properly (re)opened and
49999# appended to by config.status.  When coming back to configure, we
50000# need to make the FD available again.
50001if test "$no_create" != yes; then
50002  ac_cs_success=:
50003  ac_config_status_args=
50004  test "$silent" = yes &&
50005    ac_config_status_args="$ac_config_status_args --quiet"
50006  exec 5>/dev/null
50007  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50008  exec 5>>config.log
50009  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50010  # would make configure fail if this is the last instruction.
50011  $ac_cs_success || as_fn_exit 1
50012fi
50013if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50014  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50015$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50016fi
50017
50018
50019# Try to move the config.log file to the output directory.
50020if test -e ./config.log; then
50021  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50022fi
50023
50024# Make the compare script executable
50025$CHMOD +x $OUTPUT_ROOT/compare.sh
50026
50027# Finally output some useful information to the user
50028
50029  # Finally output some useful information to the user
50030
50031  printf "\n"
50032  printf "====================================================\n"
50033  if test "x$no_create" != "xyes"; then
50034    if test "x$IS_RECONFIGURE" != "xyes"; then
50035      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50036    else
50037      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50038    fi
50039  else
50040    if test "x$IS_RECONFIGURE" != "xyes"; then
50041      printf "A configuration has been successfully checked but not created\n"
50042    else
50043      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50044    fi
50045  fi
50046  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50047    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50048  else
50049    printf "using default settings.\n"
50050  fi
50051
50052  printf "\n"
50053  printf "Configuration summary:\n"
50054  printf "* Debug level:    $DEBUG_LEVEL\n"
50055  printf "* JDK variant:    $JDK_VARIANT\n"
50056  printf "* JVM variants:   $with_jvm_variants\n"
50057  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50058
50059  printf "\n"
50060  printf "Tools summary:\n"
50061  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50062    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50063  fi
50064  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50065  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
50066  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
50067
50068  printf "\n"
50069  printf "Build performance summary:\n"
50070  printf "* Cores to use:   $JOBS\n"
50071  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50072  if test "x$CCACHE_STATUS" != "x"; then
50073    printf "* ccache status:  $CCACHE_STATUS\n"
50074  fi
50075  printf "\n"
50076
50077  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50078    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50079    printf "will result in longer build times.\n"
50080    printf "\n"
50081  fi
50082
50083  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50084    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50085    printf "These are not respected, and will be ignored. It is recommended\n"
50086    printf "that you clean your environment. The following variables are set:\n"
50087    printf "$FOUND_ALT_VARIABLES\n"
50088    printf "\n"
50089  fi
50090
50091  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50092    printf "WARNING: Your build output directory is not on a local disk.\n"
50093    printf "This will severely degrade build performance!\n"
50094    printf "It is recommended that you create an output directory on a local disk,\n"
50095    printf "and run the configure script again from that directory.\n"
50096    printf "\n"
50097  fi
50098
50099  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50100    printf "WARNING: The result of this configuration has overridden an older\n"
50101    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50102    printf "proper build. Failure to do so might result in strange build problems.\n"
50103    printf "\n"
50104  fi
50105
50106  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50107    printf "WARNING: The result of this configuration was not saved.\n"
50108    printf "You should run without '--no-create | -n' to create the configuration.\n"
50109    printf "\n"
50110  fi
50111
50112