generated-configure.sh revision 968:16d312a2fcac
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202  if (eval "$as_required") 2>/dev/null; then :
203  as_have_required=yes
204else
205  as_have_required=no
206fi
207  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214  IFS=$as_save_IFS
215  test -z "$as_dir" && as_dir=.
216  as_found=:
217  case $as_dir in #(
218	 /*)
219	   for as_base in sh bash ksh sh5; do
220	     # Try only shells that exist, to save several forks.
221	     as_shell=$as_dir/$as_base
222	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226  break 2
227fi
228fi
229	   done;;
230       esac
231  as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235  CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240      if test "x$CONFIG_SHELL" != x; then :
241  export CONFIG_SHELL
242             # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250  *v*x* | *x*v* ) as_opts=-vx ;;
251  *v* ) as_opts=-v ;;
252  *x* ) as_opts=-x ;;
253  * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
260fi
261
262    if test x$as_have_required = xno; then :
263  $as_echo "$0: This script requires a shell more modern than all"
264  $as_echo "$0: the shells that I found on your system."
265  if test x${ZSH_VERSION+set} = xset ; then
266    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268  else
269    $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: build-dev@openjdk.java.net about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274  fi
275  exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293  { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302  return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310  set +e
311  as_fn_set_status $1
312  exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321  case $as_dir in #(
322  -*) as_dir=./$as_dir;;
323  esac
324  test -d "$as_dir" || eval $as_mkdir_p || {
325    as_dirs=
326    while :; do
327      case $as_dir in #(
328      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329      *) as_qdir=$as_dir;;
330      esac
331      as_dirs="'$as_qdir' $as_dirs"
332      as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334	 X"$as_dir" : 'X\(//\)[^/]' \| \
335	 X"$as_dir" : 'X\(//\)$' \| \
336	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339	    s//\1/
340	    q
341	  }
342	  /^X\(\/\/\)[^/].*/{
343	    s//\1/
344	    q
345	  }
346	  /^X\(\/\/\)$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\).*/{
351	    s//\1/
352	    q
353	  }
354	  s/.*/./; q'`
355      test -d "$as_dir" && break
356    done
357    test -z "$as_dirs" || eval "mkdir $as_dirs"
358  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
359
360
361} # as_fn_mkdir_p
362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368  test -f "$1" && test -x "$1"
369} # as_fn_executable_p
370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377  eval 'as_fn_append ()
378  {
379    eval $1+=\$2
380  }'
381else
382  as_fn_append ()
383  {
384    eval $1=\$$1\$2
385  }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394  eval 'as_fn_arith ()
395  {
396    as_val=$(( $* ))
397  }'
398else
399  as_fn_arith ()
400  {
401    as_val=`expr "$@" || test $? -eq 1`
402  }
403fi # as_fn_arith
404
405
406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410# script with STATUS, using 1 if that was 0.
411as_fn_error ()
412{
413  as_status=$1; test $as_status -eq 0 && as_status=1
414  if test "$4"; then
415    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
417  fi
418  $as_echo "$as_me: error: $2" >&2
419  as_fn_exit $as_status
420} # as_fn_error
421
422if expr a : '\(a\)' >/dev/null 2>&1 &&
423   test "X`expr 00001 : '.*\(...\)'`" = X001; then
424  as_expr=expr
425else
426  as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430  as_basename=basename
431else
432  as_basename=false
433fi
434
435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436  as_dirname=dirname
437else
438  as_dirname=false
439fi
440
441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443	 X"$0" : 'X\(//\)$' \| \
444	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
445$as_echo X/"$0" |
446    sed '/^.*\/\([^/][^/]*\)\/*$/{
447	    s//\1/
448	    q
449	  }
450	  /^X\/\(\/\/\)$/{
451	    s//\1/
452	    q
453	  }
454	  /^X\/\(\/\).*/{
455	    s//\1/
456	    q
457	  }
458	  s/.*/./; q'`
459
460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
466
467
468  as_lineno_1=$LINENO as_lineno_1a=$LINENO
469  as_lineno_2=$LINENO as_lineno_2a=$LINENO
470  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
473  sed -n '
474    p
475    /[$]LINENO/=
476  ' <$as_myself |
477    sed '
478      s/[$]LINENO.*/&-/
479      t lineno
480      b
481      :lineno
482      N
483      :loop
484      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485      t loop
486      s/-\n.*//
487    ' >$as_me.lineno &&
488  chmod +x "$as_me.lineno" ||
489    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
490
491  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492  # already done that, so ensure we don't try to do so again and fall
493  # in an infinite loop.  This has already happened in practice.
494  _as_can_reexec=no; export _as_can_reexec
495  # Don't try to exec as it changes $[0], causing all sort of problems
496  # (the dirname of $[0] is not the place where we might find the
497  # original and so on.  Autoconf is especially sensitive to this).
498  . "./$as_me.lineno"
499  # Exit status is that of the last command.
500  exit
501}
502
503ECHO_C= ECHO_N= ECHO_T=
504case `echo -n x` in #(((((
505-n*)
506  case `echo 'xy\c'` in
507  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
508  xy)  ECHO_C='\c';;
509  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
510       ECHO_T='	';;
511  esac;;
512*)
513  ECHO_N='-n';;
514esac
515
516rm -f conf$$ conf$$.exe conf$$.file
517if test -d conf$$.dir; then
518  rm -f conf$$.dir/conf$$.file
519else
520  rm -f conf$$.dir
521  mkdir conf$$.dir 2>/dev/null
522fi
523if (echo >conf$$.file) 2>/dev/null; then
524  if ln -s conf$$.file conf$$ 2>/dev/null; then
525    as_ln_s='ln -s'
526    # ... but there are two gotchas:
527    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529    # In both cases, we have to default to `cp -pR'.
530    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
531      as_ln_s='cp -pR'
532  elif ln conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s=ln
534  else
535    as_ln_s='cp -pR'
536  fi
537else
538  as_ln_s='cp -pR'
539fi
540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
542
543if mkdir -p . 2>/dev/null; then
544  as_mkdir_p='mkdir -p "$as_dir"'
545else
546  test -d ./-p && rmdir ./-p
547  as_mkdir_p=false
548fi
549
550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
552
553# Sed expression to map a string onto a valid CPP name.
554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
555
556# Sed expression to map a string onto a valid variable name.
557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
558
559
560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
562
563# Name of the host.
564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
568#
569# Initializations.
570#
571ac_default_prefix=/usr/local
572ac_clean_files=
573ac_config_libobj_dir=.
574LIBOBJS=
575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
579
580# Identity of this package.
581PACKAGE_NAME='OpenJDK'
582PACKAGE_TARNAME='openjdk'
583PACKAGE_VERSION='jdk8'
584PACKAGE_STRING='OpenJDK jdk8'
585PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
586PACKAGE_URL='http://openjdk.java.net'
587
588# Factoring default headers for most tests.
589ac_includes_default="\
590#include <stdio.h>
591#ifdef HAVE_SYS_TYPES_H
592# include <sys/types.h>
593#endif
594#ifdef HAVE_SYS_STAT_H
595# include <sys/stat.h>
596#endif
597#ifdef STDC_HEADERS
598# include <stdlib.h>
599# include <stddef.h>
600#else
601# ifdef HAVE_STDLIB_H
602#  include <stdlib.h>
603# endif
604#endif
605#ifdef HAVE_STRING_H
606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
607#  include <memory.h>
608# endif
609# include <string.h>
610#endif
611#ifdef HAVE_STRINGS_H
612# include <strings.h>
613#endif
614#ifdef HAVE_INTTYPES_H
615# include <inttypes.h>
616#endif
617#ifdef HAVE_STDINT_H
618# include <stdint.h>
619#endif
620#ifdef HAVE_UNISTD_H
621# include <unistd.h>
622#endif"
623
624ac_subst_vars='LTLIBOBJS
625LIBOBJS
626CCACHE
627USE_PRECOMPILED_HEADER
628SJAVAC_SERVER_DIR
629ENABLE_SJAVAC
630SJAVAC_SERVER_JAVA
631JOBS
632MEMORY_SIZE
633NUM_CORES
634ENABLE_INTREE_EC
635SALIB_NAME
636HOTSPOT_MAKE_ARGS
637LIBCXX
638LLVM_LIBS
639LLVM_LDFLAGS
640LLVM_CFLAGS
641LLVM_CONFIG
642LIBFFI_LIBS
643LIBFFI_CFLAGS
644STATIC_CXX_SETTING
645LIBDL
646LIBM
647LIBZIP_CAN_USE_MMAP
648USE_EXTERNAL_LIBZ
649USE_EXTERNAL_LIBGIF
650USE_EXTERNAL_LIBJPEG
651ALSA_LIBS
652ALSA_CFLAGS
653FREETYPE_BUNDLE_LIB_PATH
654FREETYPE_LIBS
655FREETYPE_CFLAGS
656CUPS_CFLAGS
657OPENWIN_HOME
658X_EXTRA_LIBS
659X_LIBS
660X_PRE_LIBS
661X_CFLAGS
662XMKMF
663FIXPATH
664CXXFLAGS_DEBUG_SYMBOLS
665CFLAGS_DEBUG_SYMBOLS
666ZIP_DEBUGINFO_FILES
667ENABLE_DEBUG_SYMBOLS
668USING_BROKEN_SUSE_LD
669COMPILER_SUPPORTS_TARGET_BITS_FLAG
670ZERO_ARCHFLAG
671LDFLAGS_CXX_JDK
672LDFLAGS_JDKEXE_SUFFIX
673LDFLAGS_JDKLIB_SUFFIX
674LDFLAGS_JDKEXE
675LDFLAGS_JDKLIB
676CXXFLAGS_JDKEXE
677CXXFLAGS_JDKLIB
678CFLAGS_JDKEXE
679CFLAGS_JDKLIB
680MACOSX_VERSION_MIN
681PACKAGE_PATH
682LEGACY_EXTRA_LDFLAGS
683LEGACY_EXTRA_CXXFLAGS
684LEGACY_EXTRA_CFLAGS
685CXX_FLAG_DEPS
686C_FLAG_DEPS
687CXX_O_FLAG_NONE
688CXX_O_FLAG_NORM
689CXX_O_FLAG_HI
690CXX_O_FLAG_HIGHEST
691C_O_FLAG_NONE
692C_O_FLAG_NORM
693C_O_FLAG_HI
694C_O_FLAG_HIGHEST
695POST_MCS_CMD
696POST_STRIP_CMD
697SET_EXECUTABLE_ORIGIN
698SET_SHARED_LIBRARY_ORIGIN
699CXX_FLAG_REORDER
700C_FLAG_REORDER
701SET_SHARED_LIBRARY_MAPFILE
702SET_SHARED_LIBRARY_NAME
703SHARED_LIBRARY_FLAGS
704EXE_SUFFIX
705STATIC_LIBRARY_SUFFIX
706SHARED_LIBRARY_SUFFIX
707LIBRARY_PREFIX
708STATIC_LIBRARY
709SHARED_LIBRARY
710OBJ_SUFFIX
711COMPILER_NAME
712JT_HOME
713JTREGEXE
714LIPO
715ac_ct_OBJDUMP
716OBJDUMP
717ac_ct_OBJCOPY
718OBJCOPY
719ac_ct_STRIP
720ac_ct_NM
721MCS
722STRIP
723GNM
724NM
725AS
726CXXCPP
727CPP
728COMPILER_TYPE
729RC_FLAGS
730DUMPBIN
731WINAR
732HOTSPOT_RC
733HOTSPOT_MT
734RC
735MT
736WINLD
737HOTSPOT_LD
738HOTSPOT_CXX
739ARFLAGS
740ac_ct_AR
741AR
742LDEXECXX
743LDCXX
744LDEXE
745LD
746ac_ct_OBJC
747OBJCFLAGS
748OBJC
749ac_ct_CXX
750CXXFLAGS
751CXX
752ac_ct_PROPER_COMPILER_CXX
753PROPER_COMPILER_CXX
754TOOLS_DIR_CXX
755POTENTIAL_CXX
756COMPILER_TARGET_BITS_FLAG
757OBJEXT
758EXEEXT
759ac_ct_CC
760CPPFLAGS
761LDFLAGS
762CFLAGS
763CC
764ac_ct_PROPER_COMPILER_CC
765PROPER_COMPILER_CC
766TOOLS_DIR_CC
767POTENTIAL_CC
768BUILD_LD
769BUILD_CXX
770BUILD_CC
771MSVCR_DLL
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776AR_OUT_OPTION
777LD_OUT_OPTION
778EXE_OUT_OPTION
779CC_OUT_OPTION
780BUILD_HOTSPOT
781HOTSPOT_DIST
782BUILD_OUTPUT
783OVERRIDE_SRC_ROOT
784ADD_SRC_ROOT
785JDK_TOPDIR
786NASHORN_TOPDIR
787HOTSPOT_TOPDIR
788JAXWS_TOPDIR
789JAXP_TOPDIR
790CORBA_TOPDIR
791LANGTOOLS_TOPDIR
792BOOT_JDK_JVMARGS
793JAVAC_FLAGS
794BOOT_JDK_SOURCETARGET
795JARSIGNER
796NATIVE2ASCII
797JAR
798JAVAH
799JAVAC
800JAVA
801BOOT_JDK
802BOOT_TOOLSJAR
803BOOT_RTJAR
804JAVA_CHECK
805JAVAC_CHECK
806COOKED_BUILD_NUMBER
807JDK_VERSION
808COPYRIGHT_YEAR
809MACOSX_BUNDLE_ID_BASE
810MACOSX_BUNDLE_NAME_BASE
811COMPANY_NAME
812JDK_RC_PLATFORM_NAME
813PRODUCT_SUFFIX
814PRODUCT_NAME
815LAUNCHER_NAME
816MILESTONE
817JDK_BUILD_NUMBER
818JDK_UPDATE_VERSION
819JDK_MICRO_VERSION
820JDK_MINOR_VERSION
821JDK_MAJOR_VERSION
822USER_RELEASE_SUFFIX
823COMPRESS_JARS
824RMICONNECTOR_IIOP
825UNLIMITED_CRYPTO
826CACERTS_FILE
827TEST_IN_BUILD
828BUILD_HEADLESS
829SUPPORT_HEADFUL
830SUPPORT_HEADLESS
831BDEPS_FTP
832BDEPS_UNZIP
833OS_VERSION_MICRO
834OS_VERSION_MINOR
835OS_VERSION_MAJOR
836PKG_CONFIG
837CODESIGN
838XATTR
839DSYMUTIL
840IS_GNU_TIME
841TIME
842STAT
843HG
844READELF
845OTOOL
846LDD
847ZIP
848UNZIP
849FIND_DELETE
850MAKE
851CHECK_TOOLSDIR_MAKE
852CHECK_TOOLSDIR_GMAKE
853CHECK_MAKE
854CHECK_GMAKE
855PKGHANDLER
856OUTPUT_ROOT
857CONF_NAME
858SPEC
859BUILD_VARIANT_RELEASE
860DEBUG_CLASSFILES
861FASTDEBUG
862VARIANT
863DEBUG_LEVEL
864MACOSX_UNIVERSAL
865INCLUDE_SA
866JVM_VARIANT_CORE
867JVM_VARIANT_ZEROSHARK
868JVM_VARIANT_ZERO
869JVM_VARIANT_KERNEL
870JVM_VARIANT_MINIMAL1
871JVM_VARIANT_CLIENT
872JVM_VARIANT_SERVER
873JVM_VARIANTS
874JVM_INTERPRETER
875JDK_VARIANT
876SET_OPENJDK
877BUILD_LOG_WRAPPER
878BUILD_LOG_PREVIOUS
879BUILD_LOG
880SYS_ROOT
881PATH_SEP
882SRC_ROOT
883ZERO_ARCHDEF
884DEFINE_CROSS_COMPILE_ARCH
885LP64
886OPENJDK_TARGET_OS_EXPORT_DIR
887OPENJDK_TARGET_OS_API_DIR
888OPENJDK_TARGET_CPU_JLI_CFLAGS
889OPENJDK_TARGET_CPU_OSARCH
890OPENJDK_TARGET_CPU_ISADIR
891OPENJDK_TARGET_CPU_LIBDIR
892OPENJDK_TARGET_CPU_LEGACY_LIB
893OPENJDK_TARGET_CPU_LEGACY
894REQUIRED_OS_VERSION
895REQUIRED_OS_NAME
896COMPILE_TYPE
897OPENJDK_TARGET_CPU_ENDIAN
898OPENJDK_TARGET_CPU_BITS
899OPENJDK_TARGET_CPU_ARCH
900OPENJDK_TARGET_CPU
901OPENJDK_TARGET_OS_API
902OPENJDK_TARGET_OS
903OPENJDK_BUILD_CPU_ENDIAN
904OPENJDK_BUILD_CPU_BITS
905OPENJDK_BUILD_CPU_ARCH
906OPENJDK_BUILD_CPU
907OPENJDK_BUILD_OS_API
908OPENJDK_BUILD_OS
909OPENJDK_BUILD_AUTOCONF_NAME
910OPENJDK_TARGET_AUTOCONF_NAME
911target_os
912target_vendor
913target_cpu
914target
915host_os
916host_vendor
917host_cpu
918host
919build_os
920build_vendor
921build_cpu
922build
923SETFILE
924DF
925READLINK
926CYGPATH
927SED
928FGREP
929EGREP
930GREP
931AWK
932XARGS
933WHICH
934WC
935UNIQ
936UNAME
937TR
938TOUCH
939TEE
940TAR
941TAIL
942SORT
943SH
944RM
945PRINTF
946NAWK
947MV
948MKTEMP
949MKDIR
950LS
951LN
952HEAD
953FIND
954FILE
955EXPR
956ECHO
957DIRNAME
958DIFF
959DATE
960CUT
961CPIO
962CP
963COMM
964CMP
965CHMOD
966CAT
967BASH
968BASENAME
969DATE_WHEN_CONFIGURED
970CONFIGURE_COMMAND_LINE
971target_alias
972host_alias
973build_alias
974LIBS
975ECHO_T
976ECHO_N
977ECHO_C
978DEFS
979mandir
980localedir
981libdir
982psdir
983pdfdir
984dvidir
985htmldir
986infodir
987docdir
988oldincludedir
989includedir
990localstatedir
991sharedstatedir
992sysconfdir
993datadir
994datarootdir
995libexecdir
996sbindir
997bindir
998program_transform_name
999prefix
1000exec_prefix
1001PACKAGE_URL
1002PACKAGE_BUGREPORT
1003PACKAGE_STRING
1004PACKAGE_VERSION
1005PACKAGE_TARNAME
1006PACKAGE_NAME
1007PATH_SEPARATOR
1008SHELL'
1009ac_subst_files=''
1010ac_user_opts='
1011enable_option_checking
1012with_target_bits
1013with_sys_root
1014with_tools_dir
1015with_devkit
1016enable_openjdk_only
1017with_custom_make_dir
1018with_jdk_variant
1019with_jvm_interpreter
1020with_jvm_variants
1021enable_debug
1022with_debug_level
1023with_conf_name
1024with_builddeps_conf
1025with_builddeps_server
1026with_builddeps_dir
1027with_builddeps_group
1028enable_headful
1029enable_hotspot_test_in_build
1030with_cacerts_file
1031enable_unlimited_crypto
1032enable_rmiconnector_iiop
1033with_milestone
1034with_update_version
1035with_user_release_suffix
1036with_build_number
1037with_boot_jdk
1038with_boot_jdk_jvmargs
1039with_add_source_root
1040with_override_source_root
1041with_adds_and_overrides
1042with_override_langtools
1043with_override_corba
1044with_override_jaxp
1045with_override_jaxws
1046with_override_hotspot
1047with_override_nashorn
1048with_override_jdk
1049with_import_hotspot
1050with_msvcr_dll
1051with_dxsdk
1052with_dxsdk_lib
1053with_dxsdk_include
1054with_jtreg
1055with_extra_cflags
1056with_extra_cxxflags
1057with_extra_ldflags
1058enable_debug_symbols
1059enable_zip_debug_info
1060enable_macosx_runtime_support
1061with_x
1062with_cups
1063with_cups_include
1064with_freetype
1065with_freetype_include
1066with_freetype_lib
1067enable_freetype_bundling
1068with_alsa
1069with_alsa_include
1070with_alsa_lib
1071with_giflib
1072with_zlib
1073with_stdc__lib
1074with_num_cores
1075with_memory_size
1076with_jobs
1077with_sjavac_server_java
1078enable_sjavac
1079enable_precompiled_headers
1080enable_ccache
1081with_ccache_dir
1082'
1083      ac_precious_vars='build_alias
1084host_alias
1085target_alias
1086BASENAME
1087BASH
1088CAT
1089CHMOD
1090CMP
1091COMM
1092CP
1093CPIO
1094CUT
1095DATE
1096DIFF
1097DIRNAME
1098ECHO
1099EXPR
1100FILE
1101FIND
1102HEAD
1103LN
1104LS
1105MKDIR
1106MKTEMP
1107MV
1108NAWK
1109PRINTF
1110RM
1111SH
1112SORT
1113TAIL
1114TAR
1115TEE
1116TOUCH
1117TR
1118UNAME
1119UNIQ
1120WC
1121WHICH
1122XARGS
1123AWK
1124GREP
1125EGREP
1126FGREP
1127SED
1128CYGPATH
1129READLINK
1130DF
1131SETFILE
1132UNZIP
1133ZIP
1134LDD
1135OTOOL
1136READELF
1137HG
1138STAT
1139TIME
1140DSYMUTIL
1141XATTR
1142CODESIGN
1143PKG_CONFIG
1144JAVA
1145JAVAC
1146JAVAH
1147JAR
1148NATIVE2ASCII
1149JARSIGNER
1150BUILD_CC
1151BUILD_CXX
1152BUILD_LD
1153CC
1154CFLAGS
1155LDFLAGS
1156LIBS
1157CPPFLAGS
1158CXX
1159CXXFLAGS
1160CCC
1161OBJC
1162OBJCFLAGS
1163AR
1164CPP
1165CXXCPP
1166AS
1167NM
1168GNM
1169STRIP
1170MCS
1171OBJCOPY
1172OBJDUMP
1173LIPO
1174JTREGEXE
1175XMKMF
1176FREETYPE_CFLAGS
1177FREETYPE_LIBS
1178ALSA_CFLAGS
1179ALSA_LIBS
1180LIBFFI_CFLAGS
1181LIBFFI_LIBS
1182CCACHE'
1183
1184
1185# Initialize some variables set by options.
1186ac_init_help=
1187ac_init_version=false
1188ac_unrecognized_opts=
1189ac_unrecognized_sep=
1190# The variables have the same names as the options, with
1191# dashes changed to underlines.
1192cache_file=/dev/null
1193exec_prefix=NONE
1194no_create=
1195no_recursion=
1196prefix=NONE
1197program_prefix=NONE
1198program_suffix=NONE
1199program_transform_name=s,x,x,
1200silent=
1201site=
1202srcdir=
1203verbose=
1204x_includes=NONE
1205x_libraries=NONE
1206
1207# Installation directory options.
1208# These are left unexpanded so users can "make install exec_prefix=/foo"
1209# and all the variables that are supposed to be based on exec_prefix
1210# by default will actually change.
1211# Use braces instead of parens because sh, perl, etc. also accept them.
1212# (The list follows the same order as the GNU Coding Standards.)
1213bindir='${exec_prefix}/bin'
1214sbindir='${exec_prefix}/sbin'
1215libexecdir='${exec_prefix}/libexec'
1216datarootdir='${prefix}/share'
1217datadir='${datarootdir}'
1218sysconfdir='${prefix}/etc'
1219sharedstatedir='${prefix}/com'
1220localstatedir='${prefix}/var'
1221includedir='${prefix}/include'
1222oldincludedir='/usr/include'
1223docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1224infodir='${datarootdir}/info'
1225htmldir='${docdir}'
1226dvidir='${docdir}'
1227pdfdir='${docdir}'
1228psdir='${docdir}'
1229libdir='${exec_prefix}/lib'
1230localedir='${datarootdir}/locale'
1231mandir='${datarootdir}/man'
1232
1233ac_prev=
1234ac_dashdash=
1235for ac_option
1236do
1237  # If the previous option needs an argument, assign it.
1238  if test -n "$ac_prev"; then
1239    eval $ac_prev=\$ac_option
1240    ac_prev=
1241    continue
1242  fi
1243
1244  case $ac_option in
1245  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1246  *=)   ac_optarg= ;;
1247  *)    ac_optarg=yes ;;
1248  esac
1249
1250  # Accept the important Cygnus configure options, so we can diagnose typos.
1251
1252  case $ac_dashdash$ac_option in
1253  --)
1254    ac_dashdash=yes ;;
1255
1256  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1257    ac_prev=bindir ;;
1258  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1259    bindir=$ac_optarg ;;
1260
1261  -build | --build | --buil | --bui | --bu)
1262    ac_prev=build_alias ;;
1263  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1264    build_alias=$ac_optarg ;;
1265
1266  -cache-file | --cache-file | --cache-fil | --cache-fi \
1267  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1268    ac_prev=cache_file ;;
1269  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1270  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1271    cache_file=$ac_optarg ;;
1272
1273  --config-cache | -C)
1274    cache_file=config.cache ;;
1275
1276  -datadir | --datadir | --datadi | --datad)
1277    ac_prev=datadir ;;
1278  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1279    datadir=$ac_optarg ;;
1280
1281  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1282  | --dataroo | --dataro | --datar)
1283    ac_prev=datarootdir ;;
1284  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1285  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1286    datarootdir=$ac_optarg ;;
1287
1288  -disable-* | --disable-*)
1289    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1290    # Reject names that are not valid shell variable names.
1291    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1292      as_fn_error $? "invalid feature name: $ac_useropt"
1293    ac_useropt_orig=$ac_useropt
1294    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1295    case $ac_user_opts in
1296      *"
1297"enable_$ac_useropt"
1298"*) ;;
1299      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1300	 ac_unrecognized_sep=', ';;
1301    esac
1302    eval enable_$ac_useropt=no ;;
1303
1304  -docdir | --docdir | --docdi | --doc | --do)
1305    ac_prev=docdir ;;
1306  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1307    docdir=$ac_optarg ;;
1308
1309  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1310    ac_prev=dvidir ;;
1311  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1312    dvidir=$ac_optarg ;;
1313
1314  -enable-* | --enable-*)
1315    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1316    # Reject names that are not valid shell variable names.
1317    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1318      as_fn_error $? "invalid feature name: $ac_useropt"
1319    ac_useropt_orig=$ac_useropt
1320    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1321    case $ac_user_opts in
1322      *"
1323"enable_$ac_useropt"
1324"*) ;;
1325      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1326	 ac_unrecognized_sep=', ';;
1327    esac
1328    eval enable_$ac_useropt=\$ac_optarg ;;
1329
1330  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1331  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1332  | --exec | --exe | --ex)
1333    ac_prev=exec_prefix ;;
1334  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1335  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1336  | --exec=* | --exe=* | --ex=*)
1337    exec_prefix=$ac_optarg ;;
1338
1339  -gas | --gas | --ga | --g)
1340    # Obsolete; use --with-gas.
1341    with_gas=yes ;;
1342
1343  -help | --help | --hel | --he | -h)
1344    ac_init_help=long ;;
1345  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1346    ac_init_help=recursive ;;
1347  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1348    ac_init_help=short ;;
1349
1350  -host | --host | --hos | --ho)
1351    ac_prev=host_alias ;;
1352  -host=* | --host=* | --hos=* | --ho=*)
1353    host_alias=$ac_optarg ;;
1354
1355  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1356    ac_prev=htmldir ;;
1357  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1358  | --ht=*)
1359    htmldir=$ac_optarg ;;
1360
1361  -includedir | --includedir | --includedi | --included | --include \
1362  | --includ | --inclu | --incl | --inc)
1363    ac_prev=includedir ;;
1364  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1365  | --includ=* | --inclu=* | --incl=* | --inc=*)
1366    includedir=$ac_optarg ;;
1367
1368  -infodir | --infodir | --infodi | --infod | --info | --inf)
1369    ac_prev=infodir ;;
1370  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1371    infodir=$ac_optarg ;;
1372
1373  -libdir | --libdir | --libdi | --libd)
1374    ac_prev=libdir ;;
1375  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1376    libdir=$ac_optarg ;;
1377
1378  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1379  | --libexe | --libex | --libe)
1380    ac_prev=libexecdir ;;
1381  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1382  | --libexe=* | --libex=* | --libe=*)
1383    libexecdir=$ac_optarg ;;
1384
1385  -localedir | --localedir | --localedi | --localed | --locale)
1386    ac_prev=localedir ;;
1387  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1388    localedir=$ac_optarg ;;
1389
1390  -localstatedir | --localstatedir | --localstatedi | --localstated \
1391  | --localstate | --localstat | --localsta | --localst | --locals)
1392    ac_prev=localstatedir ;;
1393  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1394  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1395    localstatedir=$ac_optarg ;;
1396
1397  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1398    ac_prev=mandir ;;
1399  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1400    mandir=$ac_optarg ;;
1401
1402  -nfp | --nfp | --nf)
1403    # Obsolete; use --without-fp.
1404    with_fp=no ;;
1405
1406  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1407  | --no-cr | --no-c | -n)
1408    no_create=yes ;;
1409
1410  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1411  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1412    no_recursion=yes ;;
1413
1414  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1415  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1416  | --oldin | --oldi | --old | --ol | --o)
1417    ac_prev=oldincludedir ;;
1418  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1419  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1420  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1421    oldincludedir=$ac_optarg ;;
1422
1423  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1424    ac_prev=prefix ;;
1425  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1426    prefix=$ac_optarg ;;
1427
1428  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1429  | --program-pre | --program-pr | --program-p)
1430    ac_prev=program_prefix ;;
1431  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1432  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1433    program_prefix=$ac_optarg ;;
1434
1435  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1436  | --program-suf | --program-su | --program-s)
1437    ac_prev=program_suffix ;;
1438  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1439  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1440    program_suffix=$ac_optarg ;;
1441
1442  -program-transform-name | --program-transform-name \
1443  | --program-transform-nam | --program-transform-na \
1444  | --program-transform-n | --program-transform- \
1445  | --program-transform | --program-transfor \
1446  | --program-transfo | --program-transf \
1447  | --program-trans | --program-tran \
1448  | --progr-tra | --program-tr | --program-t)
1449    ac_prev=program_transform_name ;;
1450  -program-transform-name=* | --program-transform-name=* \
1451  | --program-transform-nam=* | --program-transform-na=* \
1452  | --program-transform-n=* | --program-transform-=* \
1453  | --program-transform=* | --program-transfor=* \
1454  | --program-transfo=* | --program-transf=* \
1455  | --program-trans=* | --program-tran=* \
1456  | --progr-tra=* | --program-tr=* | --program-t=*)
1457    program_transform_name=$ac_optarg ;;
1458
1459  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1460    ac_prev=pdfdir ;;
1461  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1462    pdfdir=$ac_optarg ;;
1463
1464  -psdir | --psdir | --psdi | --psd | --ps)
1465    ac_prev=psdir ;;
1466  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1467    psdir=$ac_optarg ;;
1468
1469  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1470  | -silent | --silent | --silen | --sile | --sil)
1471    silent=yes ;;
1472
1473  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1474    ac_prev=sbindir ;;
1475  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1476  | --sbi=* | --sb=*)
1477    sbindir=$ac_optarg ;;
1478
1479  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1480  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1481  | --sharedst | --shareds | --shared | --share | --shar \
1482  | --sha | --sh)
1483    ac_prev=sharedstatedir ;;
1484  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1485  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1486  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1487  | --sha=* | --sh=*)
1488    sharedstatedir=$ac_optarg ;;
1489
1490  -site | --site | --sit)
1491    ac_prev=site ;;
1492  -site=* | --site=* | --sit=*)
1493    site=$ac_optarg ;;
1494
1495  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1496    ac_prev=srcdir ;;
1497  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1498    srcdir=$ac_optarg ;;
1499
1500  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1501  | --syscon | --sysco | --sysc | --sys | --sy)
1502    ac_prev=sysconfdir ;;
1503  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1504  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1505    sysconfdir=$ac_optarg ;;
1506
1507  -target | --target | --targe | --targ | --tar | --ta | --t)
1508    ac_prev=target_alias ;;
1509  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1510    target_alias=$ac_optarg ;;
1511
1512  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1513    verbose=yes ;;
1514
1515  -version | --version | --versio | --versi | --vers | -V)
1516    ac_init_version=: ;;
1517
1518  -with-* | --with-*)
1519    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1520    # Reject names that are not valid shell variable names.
1521    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1522      as_fn_error $? "invalid package name: $ac_useropt"
1523    ac_useropt_orig=$ac_useropt
1524    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1525    case $ac_user_opts in
1526      *"
1527"with_$ac_useropt"
1528"*) ;;
1529      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1530	 ac_unrecognized_sep=', ';;
1531    esac
1532    eval with_$ac_useropt=\$ac_optarg ;;
1533
1534  -without-* | --without-*)
1535    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1536    # Reject names that are not valid shell variable names.
1537    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1538      as_fn_error $? "invalid package name: $ac_useropt"
1539    ac_useropt_orig=$ac_useropt
1540    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1541    case $ac_user_opts in
1542      *"
1543"with_$ac_useropt"
1544"*) ;;
1545      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1546	 ac_unrecognized_sep=', ';;
1547    esac
1548    eval with_$ac_useropt=no ;;
1549
1550  --x)
1551    # Obsolete; use --with-x.
1552    with_x=yes ;;
1553
1554  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1555  | --x-incl | --x-inc | --x-in | --x-i)
1556    ac_prev=x_includes ;;
1557  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1558  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1559    x_includes=$ac_optarg ;;
1560
1561  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1562  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1563    ac_prev=x_libraries ;;
1564  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1565  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1566    x_libraries=$ac_optarg ;;
1567
1568  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1569Try \`$0 --help' for more information"
1570    ;;
1571
1572  *=*)
1573    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1574    # Reject names that are not valid shell variable names.
1575    case $ac_envvar in #(
1576      '' | [0-9]* | *[!_$as_cr_alnum]* )
1577      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1578    esac
1579    eval $ac_envvar=\$ac_optarg
1580    export $ac_envvar ;;
1581
1582  *)
1583    # FIXME: should be removed in autoconf 3.0.
1584    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1585    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1586      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1587    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1588    ;;
1589
1590  esac
1591done
1592
1593if test -n "$ac_prev"; then
1594  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1595  as_fn_error $? "missing argument to $ac_option"
1596fi
1597
1598if test -n "$ac_unrecognized_opts"; then
1599  case $enable_option_checking in
1600    no) ;;
1601    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1602    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1603  esac
1604fi
1605
1606# Check all directory arguments for consistency.
1607for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1608		datadir sysconfdir sharedstatedir localstatedir includedir \
1609		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1610		libdir localedir mandir
1611do
1612  eval ac_val=\$$ac_var
1613  # Remove trailing slashes.
1614  case $ac_val in
1615    */ )
1616      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1617      eval $ac_var=\$ac_val;;
1618  esac
1619  # Be sure to have absolute directory names.
1620  case $ac_val in
1621    [\\/$]* | ?:[\\/]* )  continue;;
1622    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1623  esac
1624  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1625done
1626
1627# There might be people who depend on the old broken behavior: `$host'
1628# used to hold the argument of --host etc.
1629# FIXME: To remove some day.
1630build=$build_alias
1631host=$host_alias
1632target=$target_alias
1633
1634# FIXME: To remove some day.
1635if test "x$host_alias" != x; then
1636  if test "x$build_alias" = x; then
1637    cross_compiling=maybe
1638  elif test "x$build_alias" != "x$host_alias"; then
1639    cross_compiling=yes
1640  fi
1641fi
1642
1643ac_tool_prefix=
1644test -n "$host_alias" && ac_tool_prefix=$host_alias-
1645
1646test "$silent" = yes && exec 6>/dev/null
1647
1648
1649ac_pwd=`pwd` && test -n "$ac_pwd" &&
1650ac_ls_di=`ls -di .` &&
1651ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1652  as_fn_error $? "working directory cannot be determined"
1653test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1654  as_fn_error $? "pwd does not report name of working directory"
1655
1656
1657# Find the source files, if location was not specified.
1658if test -z "$srcdir"; then
1659  ac_srcdir_defaulted=yes
1660  # Try the directory containing this script, then the parent directory.
1661  ac_confdir=`$as_dirname -- "$as_myself" ||
1662$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1663	 X"$as_myself" : 'X\(//\)[^/]' \| \
1664	 X"$as_myself" : 'X\(//\)$' \| \
1665	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1666$as_echo X"$as_myself" |
1667    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1668	    s//\1/
1669	    q
1670	  }
1671	  /^X\(\/\/\)[^/].*/{
1672	    s//\1/
1673	    q
1674	  }
1675	  /^X\(\/\/\)$/{
1676	    s//\1/
1677	    q
1678	  }
1679	  /^X\(\/\).*/{
1680	    s//\1/
1681	    q
1682	  }
1683	  s/.*/./; q'`
1684  srcdir=$ac_confdir
1685  if test ! -r "$srcdir/$ac_unique_file"; then
1686    srcdir=..
1687  fi
1688else
1689  ac_srcdir_defaulted=no
1690fi
1691if test ! -r "$srcdir/$ac_unique_file"; then
1692  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1693  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1694fi
1695ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1696ac_abs_confdir=`(
1697	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1698	pwd)`
1699# When building in place, set srcdir=.
1700if test "$ac_abs_confdir" = "$ac_pwd"; then
1701  srcdir=.
1702fi
1703# Remove unnecessary trailing slashes from srcdir.
1704# Double slashes in file names in object file debugging info
1705# mess up M-x gdb in Emacs.
1706case $srcdir in
1707*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1708esac
1709for ac_var in $ac_precious_vars; do
1710  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1711  eval ac_env_${ac_var}_value=\$${ac_var}
1712  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1713  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1714done
1715
1716#
1717# Report the --help message.
1718#
1719if test "$ac_init_help" = "long"; then
1720  # Omit some internal or obsolete options to make the list less imposing.
1721  # This message is too long to be a string in the A/UX 3.1 sh.
1722  cat <<_ACEOF
1723\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1724
1725Usage: $0 [OPTION]... [VAR=VALUE]...
1726
1727To assign environment variables (e.g., CC, CFLAGS...), specify them as
1728VAR=VALUE.  See below for descriptions of some of the useful variables.
1729
1730Defaults for the options are specified in brackets.
1731
1732Configuration:
1733  -h, --help              display this help and exit
1734      --help=short        display options specific to this package
1735      --help=recursive    display the short help of all the included packages
1736  -V, --version           display version information and exit
1737  -q, --quiet, --silent   do not print \`checking ...' messages
1738      --cache-file=FILE   cache test results in FILE [disabled]
1739  -C, --config-cache      alias for \`--cache-file=config.cache'
1740  -n, --no-create         do not create output files
1741      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1742
1743Installation directories:
1744  --prefix=PREFIX         install architecture-independent files in PREFIX
1745                          [$ac_default_prefix]
1746  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1747                          [PREFIX]
1748
1749By default, \`make install' will install all the files in
1750\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1751an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1752for instance \`--prefix=\$HOME'.
1753
1754For better control, use the options below.
1755
1756Fine tuning of the installation directories:
1757  --bindir=DIR            user executables [EPREFIX/bin]
1758  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1759  --libexecdir=DIR        program executables [EPREFIX/libexec]
1760  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1761  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1762  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1763  --libdir=DIR            object code libraries [EPREFIX/lib]
1764  --includedir=DIR        C header files [PREFIX/include]
1765  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1766  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1767  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1768  --infodir=DIR           info documentation [DATAROOTDIR/info]
1769  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1770  --mandir=DIR            man documentation [DATAROOTDIR/man]
1771  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1772  --htmldir=DIR           html documentation [DOCDIR]
1773  --dvidir=DIR            dvi documentation [DOCDIR]
1774  --pdfdir=DIR            pdf documentation [DOCDIR]
1775  --psdir=DIR             ps documentation [DOCDIR]
1776_ACEOF
1777
1778  cat <<\_ACEOF
1779
1780X features:
1781  --x-includes=DIR    X include files are in DIR
1782  --x-libraries=DIR   X library files are in DIR
1783
1784System types:
1785  --build=BUILD     configure for building on BUILD [guessed]
1786  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1787  --target=TARGET   configure for building compilers for TARGET [HOST]
1788_ACEOF
1789fi
1790
1791if test -n "$ac_init_help"; then
1792  case $ac_init_help in
1793     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1794   esac
1795  cat <<\_ACEOF
1796
1797Optional Features:
1798  --disable-option-checking  ignore unrecognized --enable/--with options
1799  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1800  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1801  --enable-openjdk-only   suppress building custom source even if present
1802                          [disabled]
1803  --enable-debug          set the debug level to fastdebug (shorthand for
1804                          --with-debug-level=fastdebug) [disabled]
1805  --disable-headful       disable building headful support (graphical UI
1806                          support) [enabled]
1807  --enable-hotspot-test-in-build
1808                          run the Queens test after Hotspot build [disabled]
1809  --enable-unlimited-crypto
1810                          Enable unlimited crypto policy [disabled]
1811  --enable-rmiconnector-iiop
1812                          enable the JMX RMIConnector iiop transport
1813                          [disabled]
1814  --disable-debug-symbols disable generation of debug symbols [enabled]
1815  --disable-zip-debug-info
1816                          disable zipping of debug-info files [enabled]
1817  --enable-macosx-runtime-support
1818                          Deprecated. Option is kept for backwards
1819                          compatibility and is ignored
1820  --disable-freetype-bundling
1821                          disable bundling of the freetype library with the
1822                          build result [enabled on Windows or when using
1823                          --with-freetype, disabled otherwise]
1824  --enable-sjavac         use sjavac to do fast incremental compiles
1825                          [disabled]
1826  --disable-precompiled-headers
1827                          disable using precompiled headers when compiling C++
1828                          [enabled]
1829  --enable-ccache         enable using ccache to speed up recompilations
1830                          [disabled]
1831
1832Optional Packages:
1833  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1834  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1835  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1836                          support it), e.g. --with-target-bits=32 [guessed]
1837  --with-sys-root         pass this sys-root to the compilers and tools (for
1838                          cross-compiling)
1839  --with-tools-dir        search this directory for compilers and tools (for
1840                          cross-compiling)
1841  --with-devkit           use this directory as base for tools-dir and
1842                          sys-root (for cross-compiling)
1843  --with-custom-make-dir  Deprecated. Option is kept for backwards
1844                          compatibility and is ignored
1845  --with-jdk-variant      JDK variant to build (normal) [normal]
1846  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1847  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1848                          client, minimal1, kernel, zero, zeroshark, core)
1849                          [server]
1850  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1851                          [release]
1852  --with-conf-name        use this as the name of the configuration [generated
1853                          from important configuration options]
1854  --with-builddeps-conf   use this configuration file for the builddeps
1855  --with-builddeps-server download and use build dependencies from this server
1856                          url
1857  --with-builddeps-dir    store downloaded build dependencies here
1858                          [/localhome/builddeps]
1859  --with-builddeps-group  chgrp the downloaded build dependencies to this
1860                          group
1861  --with-cacerts-file     specify alternative cacerts file
1862  --with-milestone        Set milestone value for build [internal]
1863  --with-update-version   Set update version value for build [b00]
1864  --with-user-release-suffix
1865                          Add a custom string to the version string if build
1866                          number is not set.[username_builddateb00]
1867  --with-build-number     Set build number value for build [b00]
1868  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1869  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1870                          invocations of the Boot JDK, overriding the default
1871                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1872                          -enableassertions"
1873  --with-add-source-root  for each and every source directory, look in this
1874                          additional source root for the same directory; if it
1875                          exists and have files in it, include it in the build
1876  --with-override-source-root
1877                          for each and every source directory, look in this
1878                          override source root for the same directory; if it
1879                          exists, use that directory instead and ignore the
1880                          directory in the original source root
1881  --with-adds-and-overrides
1882                          use the subdirs 'adds' and 'overrides' in the
1883                          specified directory as add-source-root and
1884                          override-source-root
1885  --with-override-langtools
1886                          use this langtools dir for the build
1887  --with-override-corba   use this corba dir for the build
1888  --with-override-jaxp    use this jaxp dir for the build
1889  --with-override-jaxws   use this jaxws dir for the build
1890  --with-override-hotspot use this hotspot dir for the build
1891  --with-override-nashorn use this nashorn dir for the build
1892  --with-override-jdk     use this jdk dir for the build
1893  --with-import-hotspot   import hotspot binaries from this jdk image or
1894                          hotspot build dist dir instead of building from
1895                          source
1896  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1897                          only) [probed]
1898  --with-dxsdk            Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --with-dxsdk-include    Deprecated. Option is kept for backwards
1903                          compatibility and is ignored
1904  --with-jtreg            Regression Test Harness [probed]
1905  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1906  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1907  --with-extra-ldflags    extra flags to be used when linking jdk
1908  --with-x                use the X Window System
1909  --with-cups             specify prefix directory for the cups package
1910                          (expecting the headers under PATH/include)
1911  --with-cups-include     specify directory for the cups include files
1912  --with-freetype         specify prefix directory for the freetype package
1913                          (expecting the libraries under PATH/lib and the
1914                          headers under PATH/include)
1915  --with-freetype-include specify directory for the freetype include files
1916  --with-freetype-lib     specify directory for the freetype library
1917  --with-alsa             specify prefix directory for the alsa package
1918                          (expecting the libraries under PATH/lib and the
1919                          headers under PATH/include)
1920  --with-alsa-include     specify directory for the alsa include files
1921  --with-alsa-lib         specify directory for the alsa library
1922  --with-giflib           use giflib from build system or OpenJDK source
1923                          (system, bundled) [bundled]
1924  --with-zlib             use zlib from build system or OpenJDK source
1925                          (system, bundled) [bundled]
1926  --with-stdc++lib=<static>,<dynamic>,<default>
1927                          force linking of the C++ runtime on Linux to either
1928                          static or dynamic, default is static with dynamic as
1929                          fallback
1930  --with-num-cores        number of cores in the build system, e.g.
1931                          --with-num-cores=8 [probed]
1932  --with-memory-size      memory (in MB) available in the build system, e.g.
1933                          --with-memory-size=1024 [probed]
1934  --with-jobs             number of parallel jobs to let make run [calculated
1935                          based on cores and memory]
1936  --with-sjavac-server-java
1937                          use this java binary for running the sjavac
1938                          background server [Boot JDK java]
1939  --with-ccache-dir       where to store ccache files [~/.ccache]
1940
1941Some influential environment variables:
1942  BASENAME    Override default value for BASENAME
1943  BASH        Override default value for BASH
1944  CAT         Override default value for CAT
1945  CHMOD       Override default value for CHMOD
1946  CMP         Override default value for CMP
1947  COMM        Override default value for COMM
1948  CP          Override default value for CP
1949  CPIO        Override default value for CPIO
1950  CUT         Override default value for CUT
1951  DATE        Override default value for DATE
1952  DIFF        Override default value for DIFF
1953  DIRNAME     Override default value for DIRNAME
1954  ECHO        Override default value for ECHO
1955  EXPR        Override default value for EXPR
1956  FILE        Override default value for FILE
1957  FIND        Override default value for FIND
1958  HEAD        Override default value for HEAD
1959  LN          Override default value for LN
1960  LS          Override default value for LS
1961  MKDIR       Override default value for MKDIR
1962  MKTEMP      Override default value for MKTEMP
1963  MV          Override default value for MV
1964  NAWK        Override default value for NAWK
1965  PRINTF      Override default value for PRINTF
1966  RM          Override default value for RM
1967  SH          Override default value for SH
1968  SORT        Override default value for SORT
1969  TAIL        Override default value for TAIL
1970  TAR         Override default value for TAR
1971  TEE         Override default value for TEE
1972  TOUCH       Override default value for TOUCH
1973  TR          Override default value for TR
1974  UNAME       Override default value for UNAME
1975  UNIQ        Override default value for UNIQ
1976  WC          Override default value for WC
1977  WHICH       Override default value for WHICH
1978  XARGS       Override default value for XARGS
1979  AWK         Override default value for AWK
1980  GREP        Override default value for GREP
1981  EGREP       Override default value for EGREP
1982  FGREP       Override default value for FGREP
1983  SED         Override default value for SED
1984  CYGPATH     Override default value for CYGPATH
1985  READLINK    Override default value for READLINK
1986  DF          Override default value for DF
1987  SETFILE     Override default value for SETFILE
1988  UNZIP       Override default value for UNZIP
1989  ZIP         Override default value for ZIP
1990  LDD         Override default value for LDD
1991  OTOOL       Override default value for OTOOL
1992  READELF     Override default value for READELF
1993  HG          Override default value for HG
1994  STAT        Override default value for STAT
1995  TIME        Override default value for TIME
1996  DSYMUTIL    Override default value for DSYMUTIL
1997  XATTR       Override default value for XATTR
1998  CODESIGN    Override default value for CODESIGN
1999  PKG_CONFIG  path to pkg-config utility
2000  JAVA        Override default value for JAVA
2001  JAVAC       Override default value for JAVAC
2002  JAVAH       Override default value for JAVAH
2003  JAR         Override default value for JAR
2004  NATIVE2ASCII
2005              Override default value for NATIVE2ASCII
2006  JARSIGNER   Override default value for JARSIGNER
2007  BUILD_CC    Override default value for BUILD_CC
2008  BUILD_CXX   Override default value for BUILD_CXX
2009  BUILD_LD    Override default value for BUILD_LD
2010  CC          C compiler command
2011  CFLAGS      C compiler flags
2012  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2013              nonstandard directory <lib dir>
2014  LIBS        libraries to pass to the linker, e.g. -l<library>
2015  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2016              you have headers in a nonstandard directory <include dir>
2017  CXX         C++ compiler command
2018  CXXFLAGS    C++ compiler flags
2019  OBJC        Objective C compiler command
2020  OBJCFLAGS   Objective C compiler flags
2021  AR          Override default value for AR
2022  CPP         C preprocessor
2023  CXXCPP      C++ preprocessor
2024  AS          Override default value for AS
2025  NM          Override default value for NM
2026  GNM         Override default value for GNM
2027  STRIP       Override default value for STRIP
2028  MCS         Override default value for MCS
2029  OBJCOPY     Override default value for OBJCOPY
2030  OBJDUMP     Override default value for OBJDUMP
2031  LIPO        Override default value for LIPO
2032  JTREGEXE    Override default value for JTREGEXE
2033  XMKMF       Path to xmkmf, Makefile generator for X Window System
2034  FREETYPE_CFLAGS
2035              C compiler flags for FREETYPE, overriding pkg-config
2036  FREETYPE_LIBS
2037              linker flags for FREETYPE, overriding pkg-config
2038  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2039  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2040  LIBFFI_CFLAGS
2041              C compiler flags for LIBFFI, overriding pkg-config
2042  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2043  CCACHE      Override default value for CCACHE
2044
2045Use these variables to override the choices made by `configure' or to help
2046it to find libraries and programs with nonstandard names/locations.
2047
2048Report bugs to <build-dev@openjdk.java.net>.
2049OpenJDK home page: <http://openjdk.java.net>.
2050_ACEOF
2051ac_status=$?
2052fi
2053
2054if test "$ac_init_help" = "recursive"; then
2055  # If there are subdirs, report their specific --help.
2056  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2057    test -d "$ac_dir" ||
2058      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2059      continue
2060    ac_builddir=.
2061
2062case "$ac_dir" in
2063.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2064*)
2065  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2066  # A ".." for each directory in $ac_dir_suffix.
2067  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2068  case $ac_top_builddir_sub in
2069  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2070  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2071  esac ;;
2072esac
2073ac_abs_top_builddir=$ac_pwd
2074ac_abs_builddir=$ac_pwd$ac_dir_suffix
2075# for backward compatibility:
2076ac_top_builddir=$ac_top_build_prefix
2077
2078case $srcdir in
2079  .)  # We are building in place.
2080    ac_srcdir=.
2081    ac_top_srcdir=$ac_top_builddir_sub
2082    ac_abs_top_srcdir=$ac_pwd ;;
2083  [\\/]* | ?:[\\/]* )  # Absolute name.
2084    ac_srcdir=$srcdir$ac_dir_suffix;
2085    ac_top_srcdir=$srcdir
2086    ac_abs_top_srcdir=$srcdir ;;
2087  *) # Relative name.
2088    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2089    ac_top_srcdir=$ac_top_build_prefix$srcdir
2090    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2091esac
2092ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2093
2094    cd "$ac_dir" || { ac_status=$?; continue; }
2095    # Check for guested configure.
2096    if test -f "$ac_srcdir/configure.gnu"; then
2097      echo &&
2098      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2099    elif test -f "$ac_srcdir/configure"; then
2100      echo &&
2101      $SHELL "$ac_srcdir/configure" --help=recursive
2102    else
2103      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2104    fi || ac_status=$?
2105    cd "$ac_pwd" || { ac_status=$?; break; }
2106  done
2107fi
2108
2109test -n "$ac_init_help" && exit $ac_status
2110if $ac_init_version; then
2111  cat <<\_ACEOF
2112OpenJDK configure jdk8
2113generated by GNU Autoconf 2.69
2114
2115Copyright (C) 2012 Free Software Foundation, Inc.
2116This configure script is free software; the Free Software Foundation
2117gives unlimited permission to copy, distribute and modify it.
2118_ACEOF
2119  exit
2120fi
2121
2122## ------------------------ ##
2123## Autoconf initialization. ##
2124## ------------------------ ##
2125
2126# ac_fn_c_try_compile LINENO
2127# --------------------------
2128# Try to compile conftest.$ac_ext, and return whether this succeeded.
2129ac_fn_c_try_compile ()
2130{
2131  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2132  rm -f conftest.$ac_objext
2133  if { { ac_try="$ac_compile"
2134case "(($ac_try" in
2135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2136  *) ac_try_echo=$ac_try;;
2137esac
2138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2139$as_echo "$ac_try_echo"; } >&5
2140  (eval "$ac_compile") 2>conftest.err
2141  ac_status=$?
2142  if test -s conftest.err; then
2143    grep -v '^ *+' conftest.err >conftest.er1
2144    cat conftest.er1 >&5
2145    mv -f conftest.er1 conftest.err
2146  fi
2147  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2148  test $ac_status = 0; } && {
2149	 test -z "$ac_c_werror_flag" ||
2150	 test ! -s conftest.err
2151       } && test -s conftest.$ac_objext; then :
2152  ac_retval=0
2153else
2154  $as_echo "$as_me: failed program was:" >&5
2155sed 's/^/| /' conftest.$ac_ext >&5
2156
2157	ac_retval=1
2158fi
2159  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2160  as_fn_set_status $ac_retval
2161
2162} # ac_fn_c_try_compile
2163
2164# ac_fn_cxx_try_compile LINENO
2165# ----------------------------
2166# Try to compile conftest.$ac_ext, and return whether this succeeded.
2167ac_fn_cxx_try_compile ()
2168{
2169  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2170  rm -f conftest.$ac_objext
2171  if { { ac_try="$ac_compile"
2172case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_compile") 2>conftest.err
2179  ac_status=$?
2180  if test -s conftest.err; then
2181    grep -v '^ *+' conftest.err >conftest.er1
2182    cat conftest.er1 >&5
2183    mv -f conftest.er1 conftest.err
2184  fi
2185  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2186  test $ac_status = 0; } && {
2187	 test -z "$ac_cxx_werror_flag" ||
2188	 test ! -s conftest.err
2189       } && test -s conftest.$ac_objext; then :
2190  ac_retval=0
2191else
2192  $as_echo "$as_me: failed program was:" >&5
2193sed 's/^/| /' conftest.$ac_ext >&5
2194
2195	ac_retval=1
2196fi
2197  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2198  as_fn_set_status $ac_retval
2199
2200} # ac_fn_cxx_try_compile
2201
2202# ac_fn_objc_try_compile LINENO
2203# -----------------------------
2204# Try to compile conftest.$ac_ext, and return whether this succeeded.
2205ac_fn_objc_try_compile ()
2206{
2207  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2208  rm -f conftest.$ac_objext
2209  if { { ac_try="$ac_compile"
2210case "(($ac_try" in
2211  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212  *) ac_try_echo=$ac_try;;
2213esac
2214eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215$as_echo "$ac_try_echo"; } >&5
2216  (eval "$ac_compile") 2>conftest.err
2217  ac_status=$?
2218  if test -s conftest.err; then
2219    grep -v '^ *+' conftest.err >conftest.er1
2220    cat conftest.er1 >&5
2221    mv -f conftest.er1 conftest.err
2222  fi
2223  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224  test $ac_status = 0; } && {
2225	 test -z "$ac_objc_werror_flag" ||
2226	 test ! -s conftest.err
2227       } && test -s conftest.$ac_objext; then :
2228  ac_retval=0
2229else
2230  $as_echo "$as_me: failed program was:" >&5
2231sed 's/^/| /' conftest.$ac_ext >&5
2232
2233	ac_retval=1
2234fi
2235  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236  as_fn_set_status $ac_retval
2237
2238} # ac_fn_objc_try_compile
2239
2240# ac_fn_c_try_cpp LINENO
2241# ----------------------
2242# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2243ac_fn_c_try_cpp ()
2244{
2245  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246  if { { ac_try="$ac_cpp conftest.$ac_ext"
2247case "(($ac_try" in
2248  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2249  *) ac_try_echo=$ac_try;;
2250esac
2251eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2252$as_echo "$ac_try_echo"; } >&5
2253  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2254  ac_status=$?
2255  if test -s conftest.err; then
2256    grep -v '^ *+' conftest.err >conftest.er1
2257    cat conftest.er1 >&5
2258    mv -f conftest.er1 conftest.err
2259  fi
2260  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2261  test $ac_status = 0; } > conftest.i && {
2262	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2263	 test ! -s conftest.err
2264       }; then :
2265  ac_retval=0
2266else
2267  $as_echo "$as_me: failed program was:" >&5
2268sed 's/^/| /' conftest.$ac_ext >&5
2269
2270    ac_retval=1
2271fi
2272  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2273  as_fn_set_status $ac_retval
2274
2275} # ac_fn_c_try_cpp
2276
2277# ac_fn_cxx_try_cpp LINENO
2278# ------------------------
2279# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2280ac_fn_cxx_try_cpp ()
2281{
2282  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283  if { { ac_try="$ac_cpp conftest.$ac_ext"
2284case "(($ac_try" in
2285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2286  *) ac_try_echo=$ac_try;;
2287esac
2288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2289$as_echo "$ac_try_echo"; } >&5
2290  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2291  ac_status=$?
2292  if test -s conftest.err; then
2293    grep -v '^ *+' conftest.err >conftest.er1
2294    cat conftest.er1 >&5
2295    mv -f conftest.er1 conftest.err
2296  fi
2297  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2298  test $ac_status = 0; } > conftest.i && {
2299	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2300	 test ! -s conftest.err
2301       }; then :
2302  ac_retval=0
2303else
2304  $as_echo "$as_me: failed program was:" >&5
2305sed 's/^/| /' conftest.$ac_ext >&5
2306
2307    ac_retval=1
2308fi
2309  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310  as_fn_set_status $ac_retval
2311
2312} # ac_fn_cxx_try_cpp
2313
2314# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2315# ---------------------------------------------------------
2316# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2317# the include files in INCLUDES and setting the cache variable VAR
2318# accordingly.
2319ac_fn_cxx_check_header_mongrel ()
2320{
2321  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2322  if eval \${$3+:} false; then :
2323  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2324$as_echo_n "checking for $2... " >&6; }
2325if eval \${$3+:} false; then :
2326  $as_echo_n "(cached) " >&6
2327fi
2328eval ac_res=\$$3
2329	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
2331else
2332  # Is the header compilable?
2333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2334$as_echo_n "checking $2 usability... " >&6; }
2335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336/* end confdefs.h.  */
2337$4
2338#include <$2>
2339_ACEOF
2340if ac_fn_cxx_try_compile "$LINENO"; then :
2341  ac_header_compiler=yes
2342else
2343  ac_header_compiler=no
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2347$as_echo "$ac_header_compiler" >&6; }
2348
2349# Is the header present?
2350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2351$as_echo_n "checking $2 presence... " >&6; }
2352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h.  */
2354#include <$2>
2355_ACEOF
2356if ac_fn_cxx_try_cpp "$LINENO"; then :
2357  ac_header_preproc=yes
2358else
2359  ac_header_preproc=no
2360fi
2361rm -f conftest.err conftest.i conftest.$ac_ext
2362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2363$as_echo "$ac_header_preproc" >&6; }
2364
2365# So?  What about this header?
2366case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2367  yes:no: )
2368    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2369$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2370    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2371$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2372    ;;
2373  no:yes:* )
2374    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2375$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2376    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2377$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2378    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2379$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2380    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2381$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2383$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2384( $as_echo "## ----------------------------------------- ##
2385## Report this to build-dev@openjdk.java.net ##
2386## ----------------------------------------- ##"
2387     ) | sed "s/^/$as_me: WARNING:     /" >&2
2388    ;;
2389esac
2390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2391$as_echo_n "checking for $2... " >&6; }
2392if eval \${$3+:} false; then :
2393  $as_echo_n "(cached) " >&6
2394else
2395  eval "$3=\$ac_header_compiler"
2396fi
2397eval ac_res=\$$3
2398	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399$as_echo "$ac_res" >&6; }
2400fi
2401  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402
2403} # ac_fn_cxx_check_header_mongrel
2404
2405# ac_fn_cxx_try_run LINENO
2406# ------------------------
2407# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2408# that executables *can* be run.
2409ac_fn_cxx_try_run ()
2410{
2411  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412  if { { ac_try="$ac_link"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_link") 2>&5
2420  ac_status=$?
2421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2422  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2423  { { case "(($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_try") 2>&5
2430  ac_status=$?
2431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432  test $ac_status = 0; }; }; then :
2433  ac_retval=0
2434else
2435  $as_echo "$as_me: program exited with status $ac_status" >&5
2436       $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439       ac_retval=$ac_status
2440fi
2441  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_cxx_try_run
2446
2447# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2448# ---------------------------------------------------------
2449# Tests whether HEADER exists and can be compiled using the include files in
2450# INCLUDES, setting the cache variable VAR accordingly.
2451ac_fn_cxx_check_header_compile ()
2452{
2453  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2455$as_echo_n "checking for $2... " >&6; }
2456if eval \${$3+:} false; then :
2457  $as_echo_n "(cached) " >&6
2458else
2459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460/* end confdefs.h.  */
2461$4
2462#include <$2>
2463_ACEOF
2464if ac_fn_cxx_try_compile "$LINENO"; then :
2465  eval "$3=yes"
2466else
2467  eval "$3=no"
2468fi
2469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2470fi
2471eval ac_res=\$$3
2472	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2473$as_echo "$ac_res" >&6; }
2474  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_cxx_check_header_compile
2477
2478# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2479# ----------------------------------------------
2480# Tries to find the compile-time value of EXPR in a program that includes
2481# INCLUDES, setting VAR accordingly. Returns whether the value could be
2482# computed
2483ac_fn_cxx_compute_int ()
2484{
2485  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2486  if test "$cross_compiling" = yes; then
2487    # Depending upon the size, compute the lo and hi bounds.
2488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2489/* end confdefs.h.  */
2490$4
2491int
2492main ()
2493{
2494static int test_array [1 - 2 * !(($2) >= 0)];
2495test_array [0] = 0;
2496return test_array [0];
2497
2498  ;
2499  return 0;
2500}
2501_ACEOF
2502if ac_fn_cxx_try_compile "$LINENO"; then :
2503  ac_lo=0 ac_mid=0
2504  while :; do
2505    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2506/* end confdefs.h.  */
2507$4
2508int
2509main ()
2510{
2511static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2512test_array [0] = 0;
2513return test_array [0];
2514
2515  ;
2516  return 0;
2517}
2518_ACEOF
2519if ac_fn_cxx_try_compile "$LINENO"; then :
2520  ac_hi=$ac_mid; break
2521else
2522  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2523			if test $ac_lo -le $ac_mid; then
2524			  ac_lo= ac_hi=
2525			  break
2526			fi
2527			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2528fi
2529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2530  done
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534$4
2535int
2536main ()
2537{
2538static int test_array [1 - 2 * !(($2) < 0)];
2539test_array [0] = 0;
2540return test_array [0];
2541
2542  ;
2543  return 0;
2544}
2545_ACEOF
2546if ac_fn_cxx_try_compile "$LINENO"; then :
2547  ac_hi=-1 ac_mid=-1
2548  while :; do
2549    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550/* end confdefs.h.  */
2551$4
2552int
2553main ()
2554{
2555static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2556test_array [0] = 0;
2557return test_array [0];
2558
2559  ;
2560  return 0;
2561}
2562_ACEOF
2563if ac_fn_cxx_try_compile "$LINENO"; then :
2564  ac_lo=$ac_mid; break
2565else
2566  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2567			if test $ac_mid -le $ac_hi; then
2568			  ac_lo= ac_hi=
2569			  break
2570			fi
2571			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2572fi
2573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2574  done
2575else
2576  ac_lo= ac_hi=
2577fi
2578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2579fi
2580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2581# Binary search between lo and hi bounds.
2582while test "x$ac_lo" != "x$ac_hi"; do
2583  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2584  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585/* end confdefs.h.  */
2586$4
2587int
2588main ()
2589{
2590static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2591test_array [0] = 0;
2592return test_array [0];
2593
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598if ac_fn_cxx_try_compile "$LINENO"; then :
2599  ac_hi=$ac_mid
2600else
2601  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2602fi
2603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604done
2605case $ac_lo in #((
2606?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2607'') ac_retval=1 ;;
2608esac
2609  else
2610    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613static long int longval () { return $2; }
2614static unsigned long int ulongval () { return $2; }
2615#include <stdio.h>
2616#include <stdlib.h>
2617int
2618main ()
2619{
2620
2621  FILE *f = fopen ("conftest.val", "w");
2622  if (! f)
2623    return 1;
2624  if (($2) < 0)
2625    {
2626      long int i = longval ();
2627      if (i != ($2))
2628	return 1;
2629      fprintf (f, "%ld", i);
2630    }
2631  else
2632    {
2633      unsigned long int i = ulongval ();
2634      if (i != ($2))
2635	return 1;
2636      fprintf (f, "%lu", i);
2637    }
2638  /* Do not output a trailing newline, as this causes \r\n confusion
2639     on some platforms.  */
2640  return ferror (f) || fclose (f) != 0;
2641
2642  ;
2643  return 0;
2644}
2645_ACEOF
2646if ac_fn_cxx_try_run "$LINENO"; then :
2647  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2648else
2649  ac_retval=1
2650fi
2651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2652  conftest.$ac_objext conftest.beam conftest.$ac_ext
2653rm -f conftest.val
2654
2655  fi
2656  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2657  as_fn_set_status $ac_retval
2658
2659} # ac_fn_cxx_compute_int
2660
2661# ac_fn_cxx_try_link LINENO
2662# -------------------------
2663# Try to link conftest.$ac_ext, and return whether this succeeded.
2664ac_fn_cxx_try_link ()
2665{
2666  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2667  rm -f conftest.$ac_objext conftest$ac_exeext
2668  if { { ac_try="$ac_link"
2669case "(($ac_try" in
2670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671  *) ac_try_echo=$ac_try;;
2672esac
2673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2674$as_echo "$ac_try_echo"; } >&5
2675  (eval "$ac_link") 2>conftest.err
2676  ac_status=$?
2677  if test -s conftest.err; then
2678    grep -v '^ *+' conftest.err >conftest.er1
2679    cat conftest.er1 >&5
2680    mv -f conftest.er1 conftest.err
2681  fi
2682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2683  test $ac_status = 0; } && {
2684	 test -z "$ac_cxx_werror_flag" ||
2685	 test ! -s conftest.err
2686       } && test -s conftest$ac_exeext && {
2687	 test "$cross_compiling" = yes ||
2688	 test -x conftest$ac_exeext
2689       }; then :
2690  ac_retval=0
2691else
2692  $as_echo "$as_me: failed program was:" >&5
2693sed 's/^/| /' conftest.$ac_ext >&5
2694
2695	ac_retval=1
2696fi
2697  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2698  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2699  # interfere with the next link command; also delete a directory that is
2700  # left behind by Apple's compiler.  We do this before executing the actions.
2701  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2702  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2703  as_fn_set_status $ac_retval
2704
2705} # ac_fn_cxx_try_link
2706
2707# ac_fn_cxx_check_func LINENO FUNC VAR
2708# ------------------------------------
2709# Tests whether FUNC exists, setting the cache variable VAR accordingly
2710ac_fn_cxx_check_func ()
2711{
2712  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2714$as_echo_n "checking for $2... " >&6; }
2715if eval \${$3+:} false; then :
2716  $as_echo_n "(cached) " >&6
2717else
2718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2719/* end confdefs.h.  */
2720/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2721   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2722#define $2 innocuous_$2
2723
2724/* System header to define __stub macros and hopefully few prototypes,
2725    which can conflict with char $2 (); below.
2726    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2727    <limits.h> exists even on freestanding compilers.  */
2728
2729#ifdef __STDC__
2730# include <limits.h>
2731#else
2732# include <assert.h>
2733#endif
2734
2735#undef $2
2736
2737/* Override any GCC internal prototype to avoid an error.
2738   Use char because int might match the return type of a GCC
2739   builtin and then its argument prototype would still apply.  */
2740#ifdef __cplusplus
2741extern "C"
2742#endif
2743char $2 ();
2744/* The GNU C library defines this for functions which it implements
2745    to always fail with ENOSYS.  Some functions are actually named
2746    something starting with __ and the normal name is an alias.  */
2747#if defined __stub_$2 || defined __stub___$2
2748choke me
2749#endif
2750
2751int
2752main ()
2753{
2754return $2 ();
2755  ;
2756  return 0;
2757}
2758_ACEOF
2759if ac_fn_cxx_try_link "$LINENO"; then :
2760  eval "$3=yes"
2761else
2762  eval "$3=no"
2763fi
2764rm -f core conftest.err conftest.$ac_objext \
2765    conftest$ac_exeext conftest.$ac_ext
2766fi
2767eval ac_res=\$$3
2768	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769$as_echo "$ac_res" >&6; }
2770  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2771
2772} # ac_fn_cxx_check_func
2773
2774# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2775# -------------------------------------------------------
2776# Tests whether HEADER exists and can be compiled using the include files in
2777# INCLUDES, setting the cache variable VAR accordingly.
2778ac_fn_c_check_header_compile ()
2779{
2780  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2782$as_echo_n "checking for $2... " >&6; }
2783if eval \${$3+:} false; then :
2784  $as_echo_n "(cached) " >&6
2785else
2786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787/* end confdefs.h.  */
2788$4
2789#include <$2>
2790_ACEOF
2791if ac_fn_c_try_compile "$LINENO"; then :
2792  eval "$3=yes"
2793else
2794  eval "$3=no"
2795fi
2796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2797fi
2798eval ac_res=\$$3
2799	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2800$as_echo "$ac_res" >&6; }
2801  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2802
2803} # ac_fn_c_check_header_compile
2804cat >config.log <<_ACEOF
2805This file contains any messages produced by compilers while
2806running configure, to aid debugging if configure makes a mistake.
2807
2808It was created by OpenJDK $as_me jdk8, which was
2809generated by GNU Autoconf 2.69.  Invocation command line was
2810
2811  $ $0 $@
2812
2813_ACEOF
2814exec 5>>config.log
2815{
2816cat <<_ASUNAME
2817## --------- ##
2818## Platform. ##
2819## --------- ##
2820
2821hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2822uname -m = `(uname -m) 2>/dev/null || echo unknown`
2823uname -r = `(uname -r) 2>/dev/null || echo unknown`
2824uname -s = `(uname -s) 2>/dev/null || echo unknown`
2825uname -v = `(uname -v) 2>/dev/null || echo unknown`
2826
2827/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2828/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2829
2830/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2831/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2832/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2833/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2834/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2835/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2836/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2837
2838_ASUNAME
2839
2840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2841for as_dir in $PATH
2842do
2843  IFS=$as_save_IFS
2844  test -z "$as_dir" && as_dir=.
2845    $as_echo "PATH: $as_dir"
2846  done
2847IFS=$as_save_IFS
2848
2849} >&5
2850
2851cat >&5 <<_ACEOF
2852
2853
2854## ----------- ##
2855## Core tests. ##
2856## ----------- ##
2857
2858_ACEOF
2859
2860
2861# Keep a trace of the command line.
2862# Strip out --no-create and --no-recursion so they do not pile up.
2863# Strip out --silent because we don't want to record it for future runs.
2864# Also quote any args containing shell meta-characters.
2865# Make two passes to allow for proper duplicate-argument suppression.
2866ac_configure_args=
2867ac_configure_args0=
2868ac_configure_args1=
2869ac_must_keep_next=false
2870for ac_pass in 1 2
2871do
2872  for ac_arg
2873  do
2874    case $ac_arg in
2875    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2876    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2877    | -silent | --silent | --silen | --sile | --sil)
2878      continue ;;
2879    *\'*)
2880      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2881    esac
2882    case $ac_pass in
2883    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2884    2)
2885      as_fn_append ac_configure_args1 " '$ac_arg'"
2886      if test $ac_must_keep_next = true; then
2887	ac_must_keep_next=false # Got value, back to normal.
2888      else
2889	case $ac_arg in
2890	  *=* | --config-cache | -C | -disable-* | --disable-* \
2891	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2892	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2893	  | -with-* | --with-* | -without-* | --without-* | --x)
2894	    case "$ac_configure_args0 " in
2895	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2896	    esac
2897	    ;;
2898	  -* ) ac_must_keep_next=true ;;
2899	esac
2900      fi
2901      as_fn_append ac_configure_args " '$ac_arg'"
2902      ;;
2903    esac
2904  done
2905done
2906{ ac_configure_args0=; unset ac_configure_args0;}
2907{ ac_configure_args1=; unset ac_configure_args1;}
2908
2909# When interrupted or exit'd, cleanup temporary files, and complete
2910# config.log.  We remove comments because anyway the quotes in there
2911# would cause problems or look ugly.
2912# WARNING: Use '\'' to represent an apostrophe within the trap.
2913# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2914trap 'exit_status=$?
2915  # Save into config.log some information that might help in debugging.
2916  {
2917    echo
2918
2919    $as_echo "## ---------------- ##
2920## Cache variables. ##
2921## ---------------- ##"
2922    echo
2923    # The following way of writing the cache mishandles newlines in values,
2924(
2925  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2926    eval ac_val=\$$ac_var
2927    case $ac_val in #(
2928    *${as_nl}*)
2929      case $ac_var in #(
2930      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2931$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2932      esac
2933      case $ac_var in #(
2934      _ | IFS | as_nl) ;; #(
2935      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2936      *) { eval $ac_var=; unset $ac_var;} ;;
2937      esac ;;
2938    esac
2939  done
2940  (set) 2>&1 |
2941    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2942    *${as_nl}ac_space=\ *)
2943      sed -n \
2944	"s/'\''/'\''\\\\'\'''\''/g;
2945	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2946      ;; #(
2947    *)
2948      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2949      ;;
2950    esac |
2951    sort
2952)
2953    echo
2954
2955    $as_echo "## ----------------- ##
2956## Output variables. ##
2957## ----------------- ##"
2958    echo
2959    for ac_var in $ac_subst_vars
2960    do
2961      eval ac_val=\$$ac_var
2962      case $ac_val in
2963      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2964      esac
2965      $as_echo "$ac_var='\''$ac_val'\''"
2966    done | sort
2967    echo
2968
2969    if test -n "$ac_subst_files"; then
2970      $as_echo "## ------------------- ##
2971## File substitutions. ##
2972## ------------------- ##"
2973      echo
2974      for ac_var in $ac_subst_files
2975      do
2976	eval ac_val=\$$ac_var
2977	case $ac_val in
2978	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2979	esac
2980	$as_echo "$ac_var='\''$ac_val'\''"
2981      done | sort
2982      echo
2983    fi
2984
2985    if test -s confdefs.h; then
2986      $as_echo "## ----------- ##
2987## confdefs.h. ##
2988## ----------- ##"
2989      echo
2990      cat confdefs.h
2991      echo
2992    fi
2993    test "$ac_signal" != 0 &&
2994      $as_echo "$as_me: caught signal $ac_signal"
2995    $as_echo "$as_me: exit $exit_status"
2996  } >&5
2997  rm -f core *.core core.conftest.* &&
2998    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2999    exit $exit_status
3000' 0
3001for ac_signal in 1 2 13 15; do
3002  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3003done
3004ac_signal=0
3005
3006# confdefs.h avoids OS command line length limits that DEFS can exceed.
3007rm -f -r conftest* confdefs.h
3008
3009$as_echo "/* confdefs.h */" > confdefs.h
3010
3011# Predefined preprocessor variables.
3012
3013cat >>confdefs.h <<_ACEOF
3014#define PACKAGE_NAME "$PACKAGE_NAME"
3015_ACEOF
3016
3017cat >>confdefs.h <<_ACEOF
3018#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3019_ACEOF
3020
3021cat >>confdefs.h <<_ACEOF
3022#define PACKAGE_VERSION "$PACKAGE_VERSION"
3023_ACEOF
3024
3025cat >>confdefs.h <<_ACEOF
3026#define PACKAGE_STRING "$PACKAGE_STRING"
3027_ACEOF
3028
3029cat >>confdefs.h <<_ACEOF
3030#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3031_ACEOF
3032
3033cat >>confdefs.h <<_ACEOF
3034#define PACKAGE_URL "$PACKAGE_URL"
3035_ACEOF
3036
3037
3038# Let the site file select an alternate cache file if it wants to.
3039# Prefer an explicitly selected file to automatically selected ones.
3040ac_site_file1=NONE
3041ac_site_file2=NONE
3042if test -n "$CONFIG_SITE"; then
3043  # We do not want a PATH search for config.site.
3044  case $CONFIG_SITE in #((
3045    -*)  ac_site_file1=./$CONFIG_SITE;;
3046    */*) ac_site_file1=$CONFIG_SITE;;
3047    *)   ac_site_file1=./$CONFIG_SITE;;
3048  esac
3049elif test "x$prefix" != xNONE; then
3050  ac_site_file1=$prefix/share/config.site
3051  ac_site_file2=$prefix/etc/config.site
3052else
3053  ac_site_file1=$ac_default_prefix/share/config.site
3054  ac_site_file2=$ac_default_prefix/etc/config.site
3055fi
3056for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3057do
3058  test "x$ac_site_file" = xNONE && continue
3059  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3060    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3061$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3062    sed 's/^/| /' "$ac_site_file" >&5
3063    . "$ac_site_file" \
3064      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3066as_fn_error $? "failed to load site script $ac_site_file
3067See \`config.log' for more details" "$LINENO" 5; }
3068  fi
3069done
3070
3071if test -r "$cache_file"; then
3072  # Some versions of bash will fail to source /dev/null (special files
3073  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3074  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3075    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3076$as_echo "$as_me: loading cache $cache_file" >&6;}
3077    case $cache_file in
3078      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3079      *)                      . "./$cache_file";;
3080    esac
3081  fi
3082else
3083  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3084$as_echo "$as_me: creating cache $cache_file" >&6;}
3085  >$cache_file
3086fi
3087
3088# Check that the precious variables saved in the cache have kept the same
3089# value.
3090ac_cache_corrupted=false
3091for ac_var in $ac_precious_vars; do
3092  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3093  eval ac_new_set=\$ac_env_${ac_var}_set
3094  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3095  eval ac_new_val=\$ac_env_${ac_var}_value
3096  case $ac_old_set,$ac_new_set in
3097    set,)
3098      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3099$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3100      ac_cache_corrupted=: ;;
3101    ,set)
3102      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3103$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3104      ac_cache_corrupted=: ;;
3105    ,);;
3106    *)
3107      if test "x$ac_old_val" != "x$ac_new_val"; then
3108	# differences in whitespace do not lead to failure.
3109	ac_old_val_w=`echo x $ac_old_val`
3110	ac_new_val_w=`echo x $ac_new_val`
3111	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3112	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3113$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3114	  ac_cache_corrupted=:
3115	else
3116	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3117$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3118	  eval $ac_var=\$ac_old_val
3119	fi
3120	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3121$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3122	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3123$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3124      fi;;
3125  esac
3126  # Pass precious variables to config.status.
3127  if test "$ac_new_set" = set; then
3128    case $ac_new_val in
3129    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3130    *) ac_arg=$ac_var=$ac_new_val ;;
3131    esac
3132    case " $ac_configure_args " in
3133      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3134      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3135    esac
3136  fi
3137done
3138if $ac_cache_corrupted; then
3139  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3141  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3142$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3143  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3144fi
3145## -------------------- ##
3146## Main body of script. ##
3147## -------------------- ##
3148
3149ac_ext=c
3150ac_cpp='$CPP $CPPFLAGS'
3151ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3152ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3153ac_compiler_gnu=$ac_cv_c_compiler_gnu
3154
3155
3156
3157ac_aux_dir=
3158for ac_dir in build-aux "$srcdir"/build-aux; do
3159  if test -f "$ac_dir/install-sh"; then
3160    ac_aux_dir=$ac_dir
3161    ac_install_sh="$ac_aux_dir/install-sh -c"
3162    break
3163  elif test -f "$ac_dir/install.sh"; then
3164    ac_aux_dir=$ac_dir
3165    ac_install_sh="$ac_aux_dir/install.sh -c"
3166    break
3167  elif test -f "$ac_dir/shtool"; then
3168    ac_aux_dir=$ac_dir
3169    ac_install_sh="$ac_aux_dir/shtool install -c"
3170    break
3171  fi
3172done
3173if test -z "$ac_aux_dir"; then
3174  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3175fi
3176
3177# These three variables are undocumented and unsupported,
3178# and are intended to be withdrawn in a future Autoconf release.
3179# They can cause serious problems if a builder's source tree is in a directory
3180# whose full name contains unusual characters.
3181ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3182ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3183ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3184
3185
3186# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3187
3188#
3189# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3190# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3191#
3192# This code is free software; you can redistribute it and/or modify it
3193# under the terms of the GNU General Public License version 2 only, as
3194# published by the Free Software Foundation.  Oracle designates this
3195# particular file as subject to the "Classpath" exception as provided
3196# by Oracle in the LICENSE file that accompanied this code.
3197#
3198# This code is distributed in the hope that it will be useful, but WITHOUT
3199# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3200# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3201# version 2 for more details (a copy is included in the LICENSE file that
3202# accompanied this code).
3203#
3204# You should have received a copy of the GNU General Public License version
3205# 2 along with this work; if not, write to the Free Software Foundation,
3206# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3207#
3208# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3209# or visit www.oracle.com if you need additional information or have any
3210# questions.
3211#
3212
3213#
3214# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3215#
3216# This program is free software; you can redistribute it and/or modify
3217# it under the terms of the GNU General Public License as published by
3218# the Free Software Foundation; either version 2 of the License, or
3219# (at your option) any later version.
3220#
3221# This program is distributed in the hope that it will be useful, but
3222# WITHOUT ANY WARRANTY; without even the implied warranty of
3223# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3224# General Public License for more details.
3225#
3226# You should have received a copy of the GNU General Public License
3227# along with this program; if not, write to the Free Software
3228# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3229#
3230# As a special exception to the GNU General Public License, if you
3231# distribute this file as part of a program that contains a
3232# configuration script generated by Autoconf, you may include it under
3233# the same distribution terms that you use for the rest of that program.
3234
3235# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3236# ----------------------------------
3237# PKG_PROG_PKG_CONFIG
3238
3239# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3240#
3241# Check to see whether a particular set of modules exists.  Similar
3242# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3243#
3244#
3245# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3246# this or PKG_CHECK_MODULES is called, or make sure to call
3247# PKG_CHECK_EXISTS manually
3248# --------------------------------------------------------------
3249
3250
3251
3252# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3253# ---------------------------------------------
3254# _PKG_CONFIG
3255
3256# _PKG_SHORT_ERRORS_SUPPORTED
3257# -----------------------------
3258# _PKG_SHORT_ERRORS_SUPPORTED
3259
3260
3261# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3262# [ACTION-IF-NOT-FOUND])
3263#
3264#
3265# Note that if there is a possibility the first call to
3266# PKG_CHECK_MODULES might not happen, you should be sure to include an
3267# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3268#
3269#
3270# --------------------------------------------------------------
3271# PKG_CHECK_MODULES
3272
3273
3274# Include these first...
3275#
3276# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3277# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3278#
3279# This code is free software; you can redistribute it and/or modify it
3280# under the terms of the GNU General Public License version 2 only, as
3281# published by the Free Software Foundation.  Oracle designates this
3282# particular file as subject to the "Classpath" exception as provided
3283# by Oracle in the LICENSE file that accompanied this code.
3284#
3285# This code is distributed in the hope that it will be useful, but WITHOUT
3286# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3287# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3288# version 2 for more details (a copy is included in the LICENSE file that
3289# accompanied this code).
3290#
3291# You should have received a copy of the GNU General Public License version
3292# 2 along with this work; if not, write to the Free Software Foundation,
3293# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3294#
3295# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3296# or visit www.oracle.com if you need additional information or have any
3297# questions.
3298#
3299
3300# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3301# If so, then append $1 to $2 \
3302# Also set JVM_ARG_OK to true/false depending on outcome.
3303
3304
3305# Appends a string to a path variable, only adding the : when needed.
3306
3307
3308# This will make sure the given variable points to a full and proper
3309# path. This means:
3310# 1) There will be no spaces in the path. On posix platforms,
3311#    spaces in the path will result in an error. On Windows,
3312#    the path will be rewritten using short-style to be space-free.
3313# 2) The path will be absolute, and it will be in unix-style (on
3314#     cygwin).
3315# $1: The name of the variable to fix
3316
3317
3318# This will make sure the given variable points to a executable
3319# with a full and proper 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# Any arguments given to the executable is preserved.
3326# If the input variable does not have a directory specification, then
3327# it need to be in the PATH.
3328# $1: The name of the variable to fix
3329
3330
3331
3332
3333# Register a --with argument but mark it as deprecated
3334# $1: The name of the with argument to deprecate, not including --with-
3335
3336
3337# Register a --enable argument but mark it as deprecated
3338# $1: The name of the with argument to deprecate, not including --enable-
3339# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3340
3341
3342
3343
3344# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3345# $1: variable to check
3346
3347
3348# Check that there are no unprocessed overridden variables left.
3349# If so, they are an incorrect argument and we will exit with an error.
3350
3351
3352# Setup a tool for the given variable. If correctly specified by the user,
3353# use that value, otherwise search for the tool using the supplied code snippet.
3354# $1: variable to set
3355# $2: code snippet to call to look for the tool
3356
3357
3358# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3359# $1: variable to set
3360# $2: executable name (or list of names) to look for
3361
3362
3363# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3364# $1: variable to set
3365# $2: executable name (or list of names) to look for
3366
3367
3368# Like BASIC_PATH_PROGS but fails if no tool was found.
3369# $1: variable to set
3370# $2: executable name (or list of names) to look for
3371
3372
3373# Like BASIC_SETUP_TOOL but fails if no tool was found.
3374# $1: variable to set
3375# $2: autoconf macro to call to look for the special tool
3376
3377
3378# Setup the most fundamental tools that relies on not much else to set up,
3379# but is used by much of the early bootstrap code.
3380
3381
3382# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3383
3384
3385
3386
3387
3388
3389
3390#%%% Simple tools %%%
3391
3392# Check if we have found a usable version of make
3393# $1: the path to a potential make binary (or empty)
3394# $2: the description on how we found this
3395
3396
3397# Goes looking for a usable version of GNU make.
3398
3399
3400
3401
3402
3403
3404# Check if build directory is on local disk. If not possible to determine,
3405# we prefer to claim it's local.
3406# Argument 1: directory to test
3407# Argument 2: what to do if it is on local disk
3408# Argument 3: what to do otherwise (remote disk or failure)
3409
3410
3411# Check that source files have basic read permissions set. This might
3412# not be the case in cygwin in certain conditions.
3413
3414
3415
3416
3417#
3418# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3419# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3420#
3421# This code is free software; you can redistribute it and/or modify it
3422# under the terms of the GNU General Public License version 2 only, as
3423# published by the Free Software Foundation.  Oracle designates this
3424# particular file as subject to the "Classpath" exception as provided
3425# by Oracle in the LICENSE file that accompanied this code.
3426#
3427# This code is distributed in the hope that it will be useful, but WITHOUT
3428# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3429# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3430# version 2 for more details (a copy is included in the LICENSE file that
3431# accompanied this code).
3432#
3433# You should have received a copy of the GNU General Public License version
3434# 2 along with this work; if not, write to the Free Software Foundation,
3435# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3436#
3437# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3438# or visit www.oracle.com if you need additional information or have any
3439# questions.
3440#
3441
3442
3443
3444
3445
3446# Helper function which possibly converts a path using DOS-style short mode.
3447# If so, the updated path is stored in $new_path.
3448# $1: The path to check
3449
3450
3451# Helper function which possibly converts a path using DOS-style short mode.
3452# If so, the updated path is stored in $new_path.
3453# $1: The path to check
3454
3455
3456# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3457# and could probably be heavily simplified. However, all changes in this
3458# area tend to need lot of testing in different scenarios, and in lack of
3459# proper unit testing, cleaning this up has not been deemed worth the effort
3460# at the moment.
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3471
3472
3473
3474
3475#
3476# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3477# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3478#
3479# This code is free software; you can redistribute it and/or modify it
3480# under the terms of the GNU General Public License version 2 only, as
3481# published by the Free Software Foundation.  Oracle designates this
3482# particular file as subject to the "Classpath" exception as provided
3483# by Oracle in the LICENSE file that accompanied this code.
3484#
3485# This code is distributed in the hope that it will be useful, but WITHOUT
3486# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3487# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3488# version 2 for more details (a copy is included in the LICENSE file that
3489# accompanied this code).
3490#
3491# You should have received a copy of the GNU General Public License version
3492# 2 along with this work; if not, write to the Free Software Foundation,
3493# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3494#
3495# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3496# or visit www.oracle.com if you need additional information or have any
3497# questions.
3498#
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510# ... then the rest
3511#
3512# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3514#
3515# This code is free software; you can redistribute it and/or modify it
3516# under the terms of the GNU General Public License version 2 only, as
3517# published by the Free Software Foundation.  Oracle designates this
3518# particular file as subject to the "Classpath" exception as provided
3519# by Oracle in the LICENSE file that accompanied this code.
3520#
3521# This code is distributed in the hope that it will be useful, but WITHOUT
3522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3524# version 2 for more details (a copy is included in the LICENSE file that
3525# accompanied this code).
3526#
3527# You should have received a copy of the GNU General Public License version
3528# 2 along with this work; if not, write to the Free Software Foundation,
3529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3530#
3531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3532# or visit www.oracle.com if you need additional information or have any
3533# questions.
3534#
3535
3536########################################################################
3537# This file handles detection of the Boot JDK. The Boot JDK detection
3538# process has been developed as a response to solve a complex real-world
3539# problem. Initially, it was simple, but it has grown as platform after
3540# platform, idiosyncracy after idiosyncracy has been supported.
3541#
3542# The basic idea is this:
3543# 1) You need an acceptable *) JDK to use as a Boot JDK
3544# 2) There are several ways to locate a JDK, that are mostly platform
3545#    dependent **)
3546# 3) You can have multiple JDKs installed
3547# 4) If possible, configure should try to dig out an acceptable JDK
3548#    automatically, without having to resort to command-line options
3549#
3550# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3551#     javac) and not a JRE, etc.
3552#
3553# **) On Windows we typically use a well-known path.
3554#     On MacOSX we typically use the tool java_home.
3555#     On Linux we typically find javac in the $PATH, and then follow a
3556#     chain of symlinks that often ends up in a real JDK.
3557#
3558# This leads to the code where we check in different ways to locate a
3559# JDK, and if one is found, check if it is acceptable. If not, we print
3560# our reasons for rejecting it (useful when debugging non-working
3561# configure situations) and continue checking the next one.
3562########################################################################
3563
3564# Execute the check given as argument, and verify the result
3565# If the Boot JDK was previously found, do nothing
3566# $1 A command line (typically autoconf macro) to execute
3567
3568
3569# Test: Is bootjdk explicitely set by command line arguments?
3570
3571
3572# Test: Is bootjdk available from builddeps?
3573
3574
3575# Test: Is $JAVA_HOME set?
3576
3577
3578# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3579
3580
3581# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3582# $1: Argument to the java_home binary (optional)
3583
3584
3585# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3586
3587
3588# Look for a jdk in the given path. If there are multiple, try to select the newest.
3589# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3590# $1 = Path to directory containing jdk installations.
3591# $2 = String to append to the found JDK directory to get the proper JDK home
3592
3593
3594# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3595# environmental variable as base for where to look.
3596# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3597
3598
3599# Test: Is there a JDK installed in default, well-known locations?
3600
3601
3602# Check that a command-line tool in the Boot JDK is correct
3603# $1 = name of variable to assign
3604# $2 = name of binary
3605
3606
3607###############################################################################
3608#
3609# We need a Boot JDK to bootstrap the build.
3610#
3611
3612
3613
3614
3615
3616#
3617# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3618# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3619#
3620# This code is free software; you can redistribute it and/or modify it
3621# under the terms of the GNU General Public License version 2 only, as
3622# published by the Free Software Foundation.  Oracle designates this
3623# particular file as subject to the "Classpath" exception as provided
3624# by Oracle in the LICENSE file that accompanied this code.
3625#
3626# This code is distributed in the hope that it will be useful, but WITHOUT
3627# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3628# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3629# version 2 for more details (a copy is included in the LICENSE file that
3630# accompanied this code).
3631#
3632# You should have received a copy of the GNU General Public License version
3633# 2 along with this work; if not, write to the Free Software Foundation,
3634# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3635#
3636# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3637# or visit www.oracle.com if you need additional information or have any
3638# questions.
3639#
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660#
3661# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3662# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3663#
3664# This code is free software; you can redistribute it and/or modify it
3665# under the terms of the GNU General Public License version 2 only, as
3666# published by the Free Software Foundation.  Oracle designates this
3667# particular file as subject to the "Classpath" exception as provided
3668# by Oracle in the LICENSE file that accompanied this code.
3669#
3670# This code is distributed in the hope that it will be useful, but WITHOUT
3671# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3672# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3673# version 2 for more details (a copy is included in the LICENSE file that
3674# accompanied this code).
3675#
3676# You should have received a copy of the GNU General Public License version
3677# 2 along with this work; if not, write to the Free Software Foundation,
3678# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3679#
3680# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3681# or visit www.oracle.com if you need additional information or have any
3682# questions.
3683#
3684
3685
3686
3687
3688
3689cygwin_help() {
3690  case $1 in
3691    unzip)
3692      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3693      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3694      ;;
3695    zip)
3696      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3697      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3698      ;;
3699    make)
3700      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3701      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3702      ;;
3703    freetype)
3704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3705        HELP_MSG="To install freetype, run:
3706wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3707chmod +x /tmp/freetype-setup.exe
3708/tmp/freetype-setup.exe
3709Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3710After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3711      else
3712        HELP_MSG="You need to build a 64-bit version of freetype.
3713This is not readily available.
3714You can find source code and build instructions on
3715http://www.freetype.org/
3716If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3717      fi
3718      ;;
3719  esac
3720}
3721
3722msys_help() {
3723  PKGHANDLER_COMMAND=""
3724}
3725
3726apt_help() {
3727  case $1 in
3728    devkit)
3729      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3730    openjdk)
3731      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3732    alsa)
3733      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3734    cups)
3735      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3736    freetype)
3737      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3738    pulse)
3739      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3740    x11)
3741      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3742    ccache)
3743      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3744  esac
3745}
3746
3747yum_help() {
3748  case $1 in
3749    devkit)
3750      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3751    openjdk)
3752      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3753    alsa)
3754      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3755    cups)
3756      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3757    freetype)
3758      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3759    pulse)
3760      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3761    x11)
3762      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3763    ccache)
3764      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3765  esac
3766}
3767
3768port_help() {
3769  PKGHANDLER_COMMAND=""
3770}
3771
3772pkgutil_help() {
3773  PKGHANDLER_COMMAND=""
3774}
3775
3776pkgadd_help() {
3777  PKGHANDLER_COMMAND=""
3778}
3779
3780
3781
3782#
3783# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3784# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3785#
3786# This code is free software; you can redistribute it and/or modify it
3787# under the terms of the GNU General Public License version 2 only, as
3788# published by the Free Software Foundation.  Oracle designates this
3789# particular file as subject to the "Classpath" exception as provided
3790# by Oracle in the LICENSE file that accompanied this code.
3791#
3792# This code is distributed in the hope that it will be useful, but WITHOUT
3793# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3794# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3795# version 2 for more details (a copy is included in the LICENSE file that
3796# accompanied this code).
3797#
3798# You should have received a copy of the GNU General Public License version
3799# 2 along with this work; if not, write to the Free Software Foundation,
3800# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3801#
3802# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3803# or visit www.oracle.com if you need additional information or have any
3804# questions.
3805#
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816###############################################################################
3817#
3818# Should we build only OpenJDK even if closed sources are present?
3819#
3820
3821
3822
3823
3824###############################################################################
3825#
3826# Setup version numbers
3827#
3828
3829
3830
3831
3832
3833
3834#
3835# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3836# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3837#
3838# This code is free software; you can redistribute it and/or modify it
3839# under the terms of the GNU General Public License version 2 only, as
3840# published by the Free Software Foundation.  Oracle designates this
3841# particular file as subject to the "Classpath" exception as provided
3842# by Oracle in the LICENSE file that accompanied this code.
3843#
3844# This code is distributed in the hope that it will be useful, but WITHOUT
3845# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3846# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3847# version 2 for more details (a copy is included in the LICENSE file that
3848# accompanied this code).
3849#
3850# You should have received a copy of the GNU General Public License version
3851# 2 along with this work; if not, write to the Free Software Foundation,
3852# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3853#
3854# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3855# or visit www.oracle.com if you need additional information or have any
3856# questions.
3857#
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875#
3876# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3877# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3878#
3879# This code is free software; you can redistribute it and/or modify it
3880# under the terms of the GNU General Public License version 2 only, as
3881# published by the Free Software Foundation.  Oracle designates this
3882# particular file as subject to the "Classpath" exception as provided
3883# by Oracle in the LICENSE file that accompanied this code.
3884#
3885# This code is distributed in the hope that it will be useful, but WITHOUT
3886# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3887# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3888# version 2 for more details (a copy is included in the LICENSE file that
3889# accompanied this code).
3890#
3891# You should have received a copy of the GNU General Public License version
3892# 2 along with this work; if not, write to the Free Software Foundation,
3893# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3894#
3895# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3896# or visit www.oracle.com if you need additional information or have any
3897# questions.
3898#
3899
3900# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3901# Converts autoconf style CPU name to OpenJDK style, into
3902# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3903
3904
3905# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3906# Converts autoconf style OS name to OpenJDK style, into
3907# VAR_OS and VAR_OS_API.
3908
3909
3910# Expects $host_os $host_cpu $build_os and $build_cpu
3911# and $with_target_bits to have been setup!
3912#
3913# Translate the standard triplet(quadruplet) definition
3914# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3915# OPENJDK_BUILD_OS, etc.
3916
3917
3918# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3919# accordingly. Must be done after setting up build and target system, but before
3920# doing anything else with these values.
3921
3922
3923# Setup the legacy variables, for controlling the old makefiles.
3924#
3925
3926
3927
3928
3929#%%% Build and target systems %%%
3930
3931
3932
3933
3934# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3935# Add -mX to various FLAGS variables.
3936
3937
3938
3939
3940
3941
3942#
3943# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3944# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3945#
3946# This code is free software; you can redistribute it and/or modify it
3947# under the terms of the GNU General Public License version 2 only, as
3948# published by the Free Software Foundation.  Oracle designates this
3949# particular file as subject to the "Classpath" exception as provided
3950# by Oracle in the LICENSE file that accompanied this code.
3951#
3952# This code is distributed in the hope that it will be useful, but WITHOUT
3953# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3954# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3955# version 2 for more details (a copy is included in the LICENSE file that
3956# accompanied this code).
3957#
3958# You should have received a copy of the GNU General Public License version
3959# 2 along with this work; if not, write to the Free Software Foundation,
3960# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3961#
3962# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3963# or visit www.oracle.com if you need additional information or have any
3964# questions.
3965#
3966
3967
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999# $1 = compiler to test (CC or CXX)
4000# $2 = human readable name of compiler (C or C++)
4001
4002
4003
4004
4005
4006# $1 = compiler to test (CC or CXX)
4007# $2 = human readable name of compiler (C or C++)
4008# $3 = list of compiler names to search for
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
4023#                                   [RUN-IF-FALSE])
4024# ------------------------------------------------------------
4025# Check that the c and c++ compilers support an argument
4026
4027
4028
4029
4030# Setup the JTREG paths
4031
4032
4033#
4034# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4035# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4036#
4037# This code is free software; you can redistribute it and/or modify it
4038# under the terms of the GNU General Public License version 2 only, as
4039# published by the Free Software Foundation.  Oracle designates this
4040# particular file as subject to the "Classpath" exception as provided
4041# by Oracle in the LICENSE file that accompanied this code.
4042#
4043# This code is distributed in the hope that it will be useful, but WITHOUT
4044# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4045# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4046# version 2 for more details (a copy is included in the LICENSE file that
4047# accompanied this code).
4048#
4049# You should have received a copy of the GNU General Public License version
4050# 2 along with this work; if not, write to the Free Software Foundation,
4051# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4052#
4053# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4054# or visit www.oracle.com if you need additional information or have any
4055# questions.
4056#
4057
4058
4059
4060
4061
4062
4063
4064# Check if the VS env variables were setup prior to running configure.
4065# If not, then find vcvarsall.bat and run it automatically, and integrate
4066# the set env variables into the spec file.
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077# This line needs to be here, verbatim, after all includes and the dummy hook
4078# definitions. It is replaced with custom functionality when building
4079# custom sources.
4080#CUSTOM_AUTOCONF_INCLUDE
4081
4082# Do not change or remove the following line, it is needed for consistency checks:
4083DATE_WHEN_GENERATED=1392245654
4084
4085###############################################################################
4086#
4087# Initialization / Boot-strapping
4088#
4089# The bootstrapping process needs to solve the "chicken or the egg" problem,
4090# thus it jumps back and forth, each time gaining something needed later on.
4091#
4092###############################################################################
4093
4094# Basic initialization that must happen first of all
4095
4096  # Save the original command line. This is passed to us by the wrapper configure script.
4097
4098  DATE_WHEN_CONFIGURED=`LANG=C date`
4099
4100  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4101$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4102  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4103$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4104
4105
4106  # Start with tools that do not need have cross compilation support
4107  # and can be expected to be found in the default PATH. These tools are
4108  # used by configure. Nor are these tools expected to be found in the
4109  # devkit from the builddeps server either, since they are
4110  # needed to download the devkit.
4111
4112  # First are all the simple required tools.
4113
4114
4115
4116  # Publish this variable in the help.
4117
4118
4119  if test "x$BASENAME" = x; then
4120    # The variable is not set by user, try to locate tool using the code snippet
4121    for ac_prog in basename
4122do
4123  # Extract the first word of "$ac_prog", so it can be a program name with args.
4124set dummy $ac_prog; ac_word=$2
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4126$as_echo_n "checking for $ac_word... " >&6; }
4127if ${ac_cv_path_BASENAME+:} false; then :
4128  $as_echo_n "(cached) " >&6
4129else
4130  case $BASENAME in
4131  [\\/]* | ?:[\\/]*)
4132  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4133  ;;
4134  *)
4135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4136for as_dir in $PATH
4137do
4138  IFS=$as_save_IFS
4139  test -z "$as_dir" && as_dir=.
4140    for ac_exec_ext in '' $ac_executable_extensions; do
4141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4142    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4144    break 2
4145  fi
4146done
4147  done
4148IFS=$as_save_IFS
4149
4150  ;;
4151esac
4152fi
4153BASENAME=$ac_cv_path_BASENAME
4154if test -n "$BASENAME"; then
4155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4156$as_echo "$BASENAME" >&6; }
4157else
4158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4159$as_echo "no" >&6; }
4160fi
4161
4162
4163  test -n "$BASENAME" && break
4164done
4165
4166  else
4167    # The variable is set, but is it from the command line or the environment?
4168
4169    # Try to remove the string !BASENAME! from our list.
4170    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4171    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4172      # If it failed, the variable was not from the command line. Ignore it,
4173      # but warn the user (except for BASH, which is always set by the calling BASH).
4174      if test "xBASENAME" != xBASH; then
4175        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4176$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4177      fi
4178      # Try to locate tool using the code snippet
4179      for ac_prog in basename
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if ${ac_cv_path_BASENAME+:} false; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $BASENAME in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4200    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211BASENAME=$ac_cv_path_BASENAME
4212if test -n "$BASENAME"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4214$as_echo "$BASENAME" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$BASENAME" && break
4222done
4223
4224    else
4225      # If it succeeded, then it was overridden by the user. We will use it
4226      # for the tool.
4227
4228      # First remove it from the list of overridden variables, so we can test
4229      # for unknown variables in the end.
4230      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4231
4232      # Check if the provided tool contains a complete path.
4233      tool_specified="$BASENAME"
4234      tool_basename="${tool_specified##*/}"
4235      if test "x$tool_basename" = "x$tool_specified"; then
4236        # A command without a complete path is provided, search $PATH.
4237        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4238$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4239        # Extract the first word of "$tool_basename", so it can be a program name with args.
4240set dummy $tool_basename; ac_word=$2
4241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4242$as_echo_n "checking for $ac_word... " >&6; }
4243if ${ac_cv_path_BASENAME+:} false; then :
4244  $as_echo_n "(cached) " >&6
4245else
4246  case $BASENAME in
4247  [\\/]* | ?:[\\/]*)
4248  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4249  ;;
4250  *)
4251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4252for as_dir in $PATH
4253do
4254  IFS=$as_save_IFS
4255  test -z "$as_dir" && as_dir=.
4256    for ac_exec_ext in '' $ac_executable_extensions; do
4257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4258    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4260    break 2
4261  fi
4262done
4263  done
4264IFS=$as_save_IFS
4265
4266  ;;
4267esac
4268fi
4269BASENAME=$ac_cv_path_BASENAME
4270if test -n "$BASENAME"; then
4271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4272$as_echo "$BASENAME" >&6; }
4273else
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4275$as_echo "no" >&6; }
4276fi
4277
4278
4279        if test "x$BASENAME" = x; then
4280          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4281        fi
4282      else
4283        # Otherwise we believe it is a complete path. Use it as it is.
4284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4285$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4287$as_echo_n "checking for BASENAME... " >&6; }
4288        if test ! -x "$tool_specified"; then
4289          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4290$as_echo "not found" >&6; }
4291          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4292        fi
4293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4294$as_echo "$tool_specified" >&6; }
4295      fi
4296    fi
4297  fi
4298
4299
4300
4301  if test "x$BASENAME" = x; then
4302    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4303  fi
4304
4305
4306
4307
4308
4309  # Publish this variable in the help.
4310
4311
4312  if test "x$BASH" = x; then
4313    # The variable is not set by user, try to locate tool using the code snippet
4314    for ac_prog in bash
4315do
4316  # Extract the first word of "$ac_prog", so it can be a program name with args.
4317set dummy $ac_prog; ac_word=$2
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4319$as_echo_n "checking for $ac_word... " >&6; }
4320if ${ac_cv_path_BASH+:} false; then :
4321  $as_echo_n "(cached) " >&6
4322else
4323  case $BASH in
4324  [\\/]* | ?:[\\/]*)
4325  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4326  ;;
4327  *)
4328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329for as_dir in $PATH
4330do
4331  IFS=$as_save_IFS
4332  test -z "$as_dir" && as_dir=.
4333    for ac_exec_ext in '' $ac_executable_extensions; do
4334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4335    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4337    break 2
4338  fi
4339done
4340  done
4341IFS=$as_save_IFS
4342
4343  ;;
4344esac
4345fi
4346BASH=$ac_cv_path_BASH
4347if test -n "$BASH"; then
4348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4349$as_echo "$BASH" >&6; }
4350else
4351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4352$as_echo "no" >&6; }
4353fi
4354
4355
4356  test -n "$BASH" && break
4357done
4358
4359  else
4360    # The variable is set, but is it from the command line or the environment?
4361
4362    # Try to remove the string !BASH! from our list.
4363    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4364    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4365      # If it failed, the variable was not from the command line. Ignore it,
4366      # but warn the user (except for BASH, which is always set by the calling BASH).
4367      if test "xBASH" != xBASH; then
4368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4369$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4370      fi
4371      # Try to locate tool using the code snippet
4372      for ac_prog in bash
4373do
4374  # Extract the first word of "$ac_prog", so it can be a program name with args.
4375set dummy $ac_prog; ac_word=$2
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4377$as_echo_n "checking for $ac_word... " >&6; }
4378if ${ac_cv_path_BASH+:} false; then :
4379  $as_echo_n "(cached) " >&6
4380else
4381  case $BASH in
4382  [\\/]* | ?:[\\/]*)
4383  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4384  ;;
4385  *)
4386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4387for as_dir in $PATH
4388do
4389  IFS=$as_save_IFS
4390  test -z "$as_dir" && as_dir=.
4391    for ac_exec_ext in '' $ac_executable_extensions; do
4392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4393    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4395    break 2
4396  fi
4397done
4398  done
4399IFS=$as_save_IFS
4400
4401  ;;
4402esac
4403fi
4404BASH=$ac_cv_path_BASH
4405if test -n "$BASH"; then
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4407$as_echo "$BASH" >&6; }
4408else
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4410$as_echo "no" >&6; }
4411fi
4412
4413
4414  test -n "$BASH" && break
4415done
4416
4417    else
4418      # If it succeeded, then it was overridden by the user. We will use it
4419      # for the tool.
4420
4421      # First remove it from the list of overridden variables, so we can test
4422      # for unknown variables in the end.
4423      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4424
4425      # Check if the provided tool contains a complete path.
4426      tool_specified="$BASH"
4427      tool_basename="${tool_specified##*/}"
4428      if test "x$tool_basename" = "x$tool_specified"; then
4429        # A command without a complete path is provided, search $PATH.
4430        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4431$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4432        # Extract the first word of "$tool_basename", so it can be a program name with args.
4433set dummy $tool_basename; ac_word=$2
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
4436if ${ac_cv_path_BASH+:} false; then :
4437  $as_echo_n "(cached) " >&6
4438else
4439  case $BASH in
4440  [\\/]* | ?:[\\/]*)
4441  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4442  ;;
4443  *)
4444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in $PATH
4446do
4447  IFS=$as_save_IFS
4448  test -z "$as_dir" && as_dir=.
4449    for ac_exec_ext in '' $ac_executable_extensions; do
4450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4451    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453    break 2
4454  fi
4455done
4456  done
4457IFS=$as_save_IFS
4458
4459  ;;
4460esac
4461fi
4462BASH=$ac_cv_path_BASH
4463if test -n "$BASH"; then
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4465$as_echo "$BASH" >&6; }
4466else
4467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471
4472        if test "x$BASH" = x; then
4473          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4474        fi
4475      else
4476        # Otherwise we believe it is a complete path. Use it as it is.
4477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4478$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4480$as_echo_n "checking for BASH... " >&6; }
4481        if test ! -x "$tool_specified"; then
4482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4483$as_echo "not found" >&6; }
4484          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4485        fi
4486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4487$as_echo "$tool_specified" >&6; }
4488      fi
4489    fi
4490  fi
4491
4492
4493
4494  if test "x$BASH" = x; then
4495    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4496  fi
4497
4498
4499
4500
4501
4502  # Publish this variable in the help.
4503
4504
4505  if test "x$CAT" = x; then
4506    # The variable is not set by user, try to locate tool using the code snippet
4507    for ac_prog in cat
4508do
4509  # Extract the first word of "$ac_prog", so it can be a program name with args.
4510set dummy $ac_prog; ac_word=$2
4511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4512$as_echo_n "checking for $ac_word... " >&6; }
4513if ${ac_cv_path_CAT+:} false; then :
4514  $as_echo_n "(cached) " >&6
4515else
4516  case $CAT in
4517  [\\/]* | ?:[\\/]*)
4518  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4519  ;;
4520  *)
4521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4522for as_dir in $PATH
4523do
4524  IFS=$as_save_IFS
4525  test -z "$as_dir" && as_dir=.
4526    for ac_exec_ext in '' $ac_executable_extensions; do
4527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4528    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4530    break 2
4531  fi
4532done
4533  done
4534IFS=$as_save_IFS
4535
4536  ;;
4537esac
4538fi
4539CAT=$ac_cv_path_CAT
4540if test -n "$CAT"; then
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4542$as_echo "$CAT" >&6; }
4543else
4544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4545$as_echo "no" >&6; }
4546fi
4547
4548
4549  test -n "$CAT" && break
4550done
4551
4552  else
4553    # The variable is set, but is it from the command line or the environment?
4554
4555    # Try to remove the string !CAT! from our list.
4556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4558      # If it failed, the variable was not from the command line. Ignore it,
4559      # but warn the user (except for BASH, which is always set by the calling BASH).
4560      if test "xCAT" != xBASH; then
4561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4562$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4563      fi
4564      # Try to locate tool using the code snippet
4565      for ac_prog in cat
4566do
4567  # Extract the first word of "$ac_prog", so it can be a program name with args.
4568set dummy $ac_prog; ac_word=$2
4569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
4571if ${ac_cv_path_CAT+:} false; then :
4572  $as_echo_n "(cached) " >&6
4573else
4574  case $CAT in
4575  [\\/]* | ?:[\\/]*)
4576  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4577  ;;
4578  *)
4579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in $PATH
4581do
4582  IFS=$as_save_IFS
4583  test -z "$as_dir" && as_dir=.
4584    for ac_exec_ext in '' $ac_executable_extensions; do
4585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4586    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4588    break 2
4589  fi
4590done
4591  done
4592IFS=$as_save_IFS
4593
4594  ;;
4595esac
4596fi
4597CAT=$ac_cv_path_CAT
4598if test -n "$CAT"; then
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4600$as_echo "$CAT" >&6; }
4601else
4602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
4604fi
4605
4606
4607  test -n "$CAT" && break
4608done
4609
4610    else
4611      # If it succeeded, then it was overridden by the user. We will use it
4612      # for the tool.
4613
4614      # First remove it from the list of overridden variables, so we can test
4615      # for unknown variables in the end.
4616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4617
4618      # Check if the provided tool contains a complete path.
4619      tool_specified="$CAT"
4620      tool_basename="${tool_specified##*/}"
4621      if test "x$tool_basename" = "x$tool_specified"; then
4622        # A command without a complete path is provided, search $PATH.
4623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4624$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4625        # Extract the first word of "$tool_basename", so it can be a program name with args.
4626set dummy $tool_basename; ac_word=$2
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_CAT+:} false; then :
4630  $as_echo_n "(cached) " >&6
4631else
4632  case $CAT in
4633  [\\/]* | ?:[\\/]*)
4634  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4635  ;;
4636  *)
4637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in $PATH
4639do
4640  IFS=$as_save_IFS
4641  test -z "$as_dir" && as_dir=.
4642    for ac_exec_ext in '' $ac_executable_extensions; do
4643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646    break 2
4647  fi
4648done
4649  done
4650IFS=$as_save_IFS
4651
4652  ;;
4653esac
4654fi
4655CAT=$ac_cv_path_CAT
4656if test -n "$CAT"; then
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4658$as_echo "$CAT" >&6; }
4659else
4660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
4664
4665        if test "x$CAT" = x; then
4666          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4667        fi
4668      else
4669        # Otherwise we believe it is a complete path. Use it as it is.
4670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4671$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4673$as_echo_n "checking for CAT... " >&6; }
4674        if test ! -x "$tool_specified"; then
4675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4676$as_echo "not found" >&6; }
4677          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4678        fi
4679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4680$as_echo "$tool_specified" >&6; }
4681      fi
4682    fi
4683  fi
4684
4685
4686
4687  if test "x$CAT" = x; then
4688    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4689  fi
4690
4691
4692
4693
4694
4695  # Publish this variable in the help.
4696
4697
4698  if test "x$CHMOD" = x; then
4699    # The variable is not set by user, try to locate tool using the code snippet
4700    for ac_prog in chmod
4701do
4702  # Extract the first word of "$ac_prog", so it can be a program name with args.
4703set dummy $ac_prog; ac_word=$2
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
4706if ${ac_cv_path_CHMOD+:} false; then :
4707  $as_echo_n "(cached) " >&6
4708else
4709  case $CHMOD in
4710  [\\/]* | ?:[\\/]*)
4711  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4712  ;;
4713  *)
4714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in $PATH
4716do
4717  IFS=$as_save_IFS
4718  test -z "$as_dir" && as_dir=.
4719    for ac_exec_ext in '' $ac_executable_extensions; do
4720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4721    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723    break 2
4724  fi
4725done
4726  done
4727IFS=$as_save_IFS
4728
4729  ;;
4730esac
4731fi
4732CHMOD=$ac_cv_path_CHMOD
4733if test -n "$CHMOD"; then
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4735$as_echo "$CHMOD" >&6; }
4736else
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
4739fi
4740
4741
4742  test -n "$CHMOD" && break
4743done
4744
4745  else
4746    # The variable is set, but is it from the command line or the environment?
4747
4748    # Try to remove the string !CHMOD! from our list.
4749    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4750    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4751      # If it failed, the variable was not from the command line. Ignore it,
4752      # but warn the user (except for BASH, which is always set by the calling BASH).
4753      if test "xCHMOD" != xBASH; then
4754        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4755$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4756      fi
4757      # Try to locate tool using the code snippet
4758      for ac_prog in chmod
4759do
4760  # Extract the first word of "$ac_prog", so it can be a program name with args.
4761set dummy $ac_prog; ac_word=$2
4762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4763$as_echo_n "checking for $ac_word... " >&6; }
4764if ${ac_cv_path_CHMOD+:} false; then :
4765  $as_echo_n "(cached) " >&6
4766else
4767  case $CHMOD in
4768  [\\/]* | ?:[\\/]*)
4769  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4770  ;;
4771  *)
4772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4773for as_dir in $PATH
4774do
4775  IFS=$as_save_IFS
4776  test -z "$as_dir" && as_dir=.
4777    for ac_exec_ext in '' $ac_executable_extensions; do
4778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4779    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4781    break 2
4782  fi
4783done
4784  done
4785IFS=$as_save_IFS
4786
4787  ;;
4788esac
4789fi
4790CHMOD=$ac_cv_path_CHMOD
4791if test -n "$CHMOD"; then
4792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4793$as_echo "$CHMOD" >&6; }
4794else
4795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796$as_echo "no" >&6; }
4797fi
4798
4799
4800  test -n "$CHMOD" && break
4801done
4802
4803    else
4804      # If it succeeded, then it was overridden by the user. We will use it
4805      # for the tool.
4806
4807      # First remove it from the list of overridden variables, so we can test
4808      # for unknown variables in the end.
4809      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4810
4811      # Check if the provided tool contains a complete path.
4812      tool_specified="$CHMOD"
4813      tool_basename="${tool_specified##*/}"
4814      if test "x$tool_basename" = "x$tool_specified"; then
4815        # A command without a complete path is provided, search $PATH.
4816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4817$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4818        # Extract the first word of "$tool_basename", so it can be a program name with args.
4819set dummy $tool_basename; ac_word=$2
4820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
4822if ${ac_cv_path_CHMOD+:} false; then :
4823  $as_echo_n "(cached) " >&6
4824else
4825  case $CHMOD in
4826  [\\/]* | ?:[\\/]*)
4827  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4828  ;;
4829  *)
4830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4831for as_dir in $PATH
4832do
4833  IFS=$as_save_IFS
4834  test -z "$as_dir" && as_dir=.
4835    for ac_exec_ext in '' $ac_executable_extensions; do
4836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4837    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4839    break 2
4840  fi
4841done
4842  done
4843IFS=$as_save_IFS
4844
4845  ;;
4846esac
4847fi
4848CHMOD=$ac_cv_path_CHMOD
4849if test -n "$CHMOD"; then
4850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4851$as_echo "$CHMOD" >&6; }
4852else
4853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854$as_echo "no" >&6; }
4855fi
4856
4857
4858        if test "x$CHMOD" = x; then
4859          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4860        fi
4861      else
4862        # Otherwise we believe it is a complete path. Use it as it is.
4863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
4864$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
4866$as_echo_n "checking for CHMOD... " >&6; }
4867        if test ! -x "$tool_specified"; then
4868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4869$as_echo "not found" >&6; }
4870          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
4871        fi
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4873$as_echo "$tool_specified" >&6; }
4874      fi
4875    fi
4876  fi
4877
4878
4879
4880  if test "x$CHMOD" = x; then
4881    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
4882  fi
4883
4884
4885
4886
4887
4888  # Publish this variable in the help.
4889
4890
4891  if test "x$CMP" = x; then
4892    # The variable is not set by user, try to locate tool using the code snippet
4893    for ac_prog in cmp
4894do
4895  # Extract the first word of "$ac_prog", so it can be a program name with args.
4896set dummy $ac_prog; ac_word=$2
4897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_path_CMP+:} false; then :
4900  $as_echo_n "(cached) " >&6
4901else
4902  case $CMP in
4903  [\\/]* | ?:[\\/]*)
4904  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4905  ;;
4906  *)
4907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in $PATH
4909do
4910  IFS=$as_save_IFS
4911  test -z "$as_dir" && as_dir=.
4912    for ac_exec_ext in '' $ac_executable_extensions; do
4913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4914    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916    break 2
4917  fi
4918done
4919  done
4920IFS=$as_save_IFS
4921
4922  ;;
4923esac
4924fi
4925CMP=$ac_cv_path_CMP
4926if test -n "$CMP"; then
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4928$as_echo "$CMP" >&6; }
4929else
4930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
4934
4935  test -n "$CMP" && break
4936done
4937
4938  else
4939    # The variable is set, but is it from the command line or the environment?
4940
4941    # Try to remove the string !CMP! from our list.
4942    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
4943    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4944      # If it failed, the variable was not from the command line. Ignore it,
4945      # but warn the user (except for BASH, which is always set by the calling BASH).
4946      if test "xCMP" != xBASH; then
4947        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
4948$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
4949      fi
4950      # Try to locate tool using the code snippet
4951      for ac_prog in cmp
4952do
4953  # Extract the first word of "$ac_prog", so it can be a program name with args.
4954set dummy $ac_prog; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_CMP+:} false; then :
4958  $as_echo_n "(cached) " >&6
4959else
4960  case $CMP in
4961  [\\/]* | ?:[\\/]*)
4962  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4963  ;;
4964  *)
4965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in $PATH
4967do
4968  IFS=$as_save_IFS
4969  test -z "$as_dir" && as_dir=.
4970    for ac_exec_ext in '' $ac_executable_extensions; do
4971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974    break 2
4975  fi
4976done
4977  done
4978IFS=$as_save_IFS
4979
4980  ;;
4981esac
4982fi
4983CMP=$ac_cv_path_CMP
4984if test -n "$CMP"; then
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4986$as_echo "$CMP" >&6; }
4987else
4988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992
4993  test -n "$CMP" && break
4994done
4995
4996    else
4997      # If it succeeded, then it was overridden by the user. We will use it
4998      # for the tool.
4999
5000      # First remove it from the list of overridden variables, so we can test
5001      # for unknown variables in the end.
5002      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5003
5004      # Check if the provided tool contains a complete path.
5005      tool_specified="$CMP"
5006      tool_basename="${tool_specified##*/}"
5007      if test "x$tool_basename" = "x$tool_specified"; then
5008        # A command without a complete path is provided, search $PATH.
5009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5010$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5011        # Extract the first word of "$tool_basename", so it can be a program name with args.
5012set dummy $tool_basename; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if ${ac_cv_path_CMP+:} false; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  case $CMP in
5019  [\\/]* | ?:[\\/]*)
5020  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5021  ;;
5022  *)
5023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026  IFS=$as_save_IFS
5027  test -z "$as_dir" && as_dir=.
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038  ;;
5039esac
5040fi
5041CMP=$ac_cv_path_CMP
5042if test -n "$CMP"; then
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5044$as_echo "$CMP" >&6; }
5045else
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050
5051        if test "x$CMP" = x; then
5052          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5053        fi
5054      else
5055        # Otherwise we believe it is a complete path. Use it as it is.
5056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5057$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5059$as_echo_n "checking for CMP... " >&6; }
5060        if test ! -x "$tool_specified"; then
5061          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5062$as_echo "not found" >&6; }
5063          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5064        fi
5065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5066$as_echo "$tool_specified" >&6; }
5067      fi
5068    fi
5069  fi
5070
5071
5072
5073  if test "x$CMP" = x; then
5074    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5075  fi
5076
5077
5078
5079
5080
5081  # Publish this variable in the help.
5082
5083
5084  if test "x$COMM" = x; then
5085    # The variable is not set by user, try to locate tool using the code snippet
5086    for ac_prog in comm
5087do
5088  # Extract the first word of "$ac_prog", so it can be a program name with args.
5089set dummy $ac_prog; ac_word=$2
5090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5091$as_echo_n "checking for $ac_word... " >&6; }
5092if ${ac_cv_path_COMM+:} false; then :
5093  $as_echo_n "(cached) " >&6
5094else
5095  case $COMM in
5096  [\\/]* | ?:[\\/]*)
5097  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5098  ;;
5099  *)
5100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103  IFS=$as_save_IFS
5104  test -z "$as_dir" && as_dir=.
5105    for ac_exec_ext in '' $ac_executable_extensions; do
5106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5107    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109    break 2
5110  fi
5111done
5112  done
5113IFS=$as_save_IFS
5114
5115  ;;
5116esac
5117fi
5118COMM=$ac_cv_path_COMM
5119if test -n "$COMM"; then
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5121$as_echo "$COMM" >&6; }
5122else
5123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124$as_echo "no" >&6; }
5125fi
5126
5127
5128  test -n "$COMM" && break
5129done
5130
5131  else
5132    # The variable is set, but is it from the command line or the environment?
5133
5134    # Try to remove the string !COMM! from our list.
5135    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5136    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5137      # If it failed, the variable was not from the command line. Ignore it,
5138      # but warn the user (except for BASH, which is always set by the calling BASH).
5139      if test "xCOMM" != xBASH; then
5140        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5141$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5142      fi
5143      # Try to locate tool using the code snippet
5144      for ac_prog in comm
5145do
5146  # Extract the first word of "$ac_prog", so it can be a program name with args.
5147set dummy $ac_prog; ac_word=$2
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5149$as_echo_n "checking for $ac_word... " >&6; }
5150if ${ac_cv_path_COMM+:} false; then :
5151  $as_echo_n "(cached) " >&6
5152else
5153  case $COMM in
5154  [\\/]* | ?:[\\/]*)
5155  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5156  ;;
5157  *)
5158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161  IFS=$as_save_IFS
5162  test -z "$as_dir" && as_dir=.
5163    for ac_exec_ext in '' $ac_executable_extensions; do
5164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5165    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5167    break 2
5168  fi
5169done
5170  done
5171IFS=$as_save_IFS
5172
5173  ;;
5174esac
5175fi
5176COMM=$ac_cv_path_COMM
5177if test -n "$COMM"; then
5178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5179$as_echo "$COMM" >&6; }
5180else
5181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5182$as_echo "no" >&6; }
5183fi
5184
5185
5186  test -n "$COMM" && break
5187done
5188
5189    else
5190      # If it succeeded, then it was overridden by the user. We will use it
5191      # for the tool.
5192
5193      # First remove it from the list of overridden variables, so we can test
5194      # for unknown variables in the end.
5195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5196
5197      # Check if the provided tool contains a complete path.
5198      tool_specified="$COMM"
5199      tool_basename="${tool_specified##*/}"
5200      if test "x$tool_basename" = "x$tool_specified"; then
5201        # A command without a complete path is provided, search $PATH.
5202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5203$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5204        # Extract the first word of "$tool_basename", so it can be a program name with args.
5205set dummy $tool_basename; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
5208if ${ac_cv_path_COMM+:} false; then :
5209  $as_echo_n "(cached) " >&6
5210else
5211  case $COMM in
5212  [\\/]* | ?:[\\/]*)
5213  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5214  ;;
5215  *)
5216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217for as_dir in $PATH
5218do
5219  IFS=$as_save_IFS
5220  test -z "$as_dir" && as_dir=.
5221    for ac_exec_ext in '' $ac_executable_extensions; do
5222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5223    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225    break 2
5226  fi
5227done
5228  done
5229IFS=$as_save_IFS
5230
5231  ;;
5232esac
5233fi
5234COMM=$ac_cv_path_COMM
5235if test -n "$COMM"; then
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5237$as_echo "$COMM" >&6; }
5238else
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
5241fi
5242
5243
5244        if test "x$COMM" = x; then
5245          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5246        fi
5247      else
5248        # Otherwise we believe it is a complete path. Use it as it is.
5249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5250$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5252$as_echo_n "checking for COMM... " >&6; }
5253        if test ! -x "$tool_specified"; then
5254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5255$as_echo "not found" >&6; }
5256          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5257        fi
5258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5259$as_echo "$tool_specified" >&6; }
5260      fi
5261    fi
5262  fi
5263
5264
5265
5266  if test "x$COMM" = x; then
5267    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5268  fi
5269
5270
5271
5272
5273
5274  # Publish this variable in the help.
5275
5276
5277  if test "x$CP" = x; then
5278    # The variable is not set by user, try to locate tool using the code snippet
5279    for ac_prog in cp
5280do
5281  # Extract the first word of "$ac_prog", so it can be a program name with args.
5282set dummy $ac_prog; ac_word=$2
5283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5284$as_echo_n "checking for $ac_word... " >&6; }
5285if ${ac_cv_path_CP+:} false; then :
5286  $as_echo_n "(cached) " >&6
5287else
5288  case $CP in
5289  [\\/]* | ?:[\\/]*)
5290  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5291  ;;
5292  *)
5293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5294for as_dir in $PATH
5295do
5296  IFS=$as_save_IFS
5297  test -z "$as_dir" && as_dir=.
5298    for ac_exec_ext in '' $ac_executable_extensions; do
5299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5300    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5302    break 2
5303  fi
5304done
5305  done
5306IFS=$as_save_IFS
5307
5308  ;;
5309esac
5310fi
5311CP=$ac_cv_path_CP
5312if test -n "$CP"; then
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5314$as_echo "$CP" >&6; }
5315else
5316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
5318fi
5319
5320
5321  test -n "$CP" && break
5322done
5323
5324  else
5325    # The variable is set, but is it from the command line or the environment?
5326
5327    # Try to remove the string !CP! from our list.
5328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5330      # If it failed, the variable was not from the command line. Ignore it,
5331      # but warn the user (except for BASH, which is always set by the calling BASH).
5332      if test "xCP" != xBASH; then
5333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5334$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5335      fi
5336      # Try to locate tool using the code snippet
5337      for ac_prog in cp
5338do
5339  # Extract the first word of "$ac_prog", so it can be a program name with args.
5340set dummy $ac_prog; ac_word=$2
5341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5342$as_echo_n "checking for $ac_word... " >&6; }
5343if ${ac_cv_path_CP+:} false; then :
5344  $as_echo_n "(cached) " >&6
5345else
5346  case $CP in
5347  [\\/]* | ?:[\\/]*)
5348  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5349  ;;
5350  *)
5351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5352for as_dir in $PATH
5353do
5354  IFS=$as_save_IFS
5355  test -z "$as_dir" && as_dir=.
5356    for ac_exec_ext in '' $ac_executable_extensions; do
5357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5358    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5360    break 2
5361  fi
5362done
5363  done
5364IFS=$as_save_IFS
5365
5366  ;;
5367esac
5368fi
5369CP=$ac_cv_path_CP
5370if test -n "$CP"; then
5371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5372$as_echo "$CP" >&6; }
5373else
5374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
5376fi
5377
5378
5379  test -n "$CP" && break
5380done
5381
5382    else
5383      # If it succeeded, then it was overridden by the user. We will use it
5384      # for the tool.
5385
5386      # First remove it from the list of overridden variables, so we can test
5387      # for unknown variables in the end.
5388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5389
5390      # Check if the provided tool contains a complete path.
5391      tool_specified="$CP"
5392      tool_basename="${tool_specified##*/}"
5393      if test "x$tool_basename" = "x$tool_specified"; then
5394        # A command without a complete path is provided, search $PATH.
5395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5396$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5397        # Extract the first word of "$tool_basename", so it can be a program name with args.
5398set dummy $tool_basename; ac_word=$2
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400$as_echo_n "checking for $ac_word... " >&6; }
5401if ${ac_cv_path_CP+:} false; then :
5402  $as_echo_n "(cached) " >&6
5403else
5404  case $CP in
5405  [\\/]* | ?:[\\/]*)
5406  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5407  ;;
5408  *)
5409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410for as_dir in $PATH
5411do
5412  IFS=$as_save_IFS
5413  test -z "$as_dir" && as_dir=.
5414    for ac_exec_ext in '' $ac_executable_extensions; do
5415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418    break 2
5419  fi
5420done
5421  done
5422IFS=$as_save_IFS
5423
5424  ;;
5425esac
5426fi
5427CP=$ac_cv_path_CP
5428if test -n "$CP"; then
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5430$as_echo "$CP" >&6; }
5431else
5432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433$as_echo "no" >&6; }
5434fi
5435
5436
5437        if test "x$CP" = x; then
5438          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5439        fi
5440      else
5441        # Otherwise we believe it is a complete path. Use it as it is.
5442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5443$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5445$as_echo_n "checking for CP... " >&6; }
5446        if test ! -x "$tool_specified"; then
5447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5448$as_echo "not found" >&6; }
5449          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5450        fi
5451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5452$as_echo "$tool_specified" >&6; }
5453      fi
5454    fi
5455  fi
5456
5457
5458
5459  if test "x$CP" = x; then
5460    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5461  fi
5462
5463
5464
5465
5466
5467  # Publish this variable in the help.
5468
5469
5470  if test "x$CPIO" = x; then
5471    # The variable is not set by user, try to locate tool using the code snippet
5472    for ac_prog in cpio
5473do
5474  # Extract the first word of "$ac_prog", so it can be a program name with args.
5475set dummy $ac_prog; ac_word=$2
5476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5477$as_echo_n "checking for $ac_word... " >&6; }
5478if ${ac_cv_path_CPIO+:} false; then :
5479  $as_echo_n "(cached) " >&6
5480else
5481  case $CPIO in
5482  [\\/]* | ?:[\\/]*)
5483  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5484  ;;
5485  *)
5486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5487for as_dir in $PATH
5488do
5489  IFS=$as_save_IFS
5490  test -z "$as_dir" && as_dir=.
5491    for ac_exec_ext in '' $ac_executable_extensions; do
5492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5493    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5495    break 2
5496  fi
5497done
5498  done
5499IFS=$as_save_IFS
5500
5501  ;;
5502esac
5503fi
5504CPIO=$ac_cv_path_CPIO
5505if test -n "$CPIO"; then
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5507$as_echo "$CPIO" >&6; }
5508else
5509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510$as_echo "no" >&6; }
5511fi
5512
5513
5514  test -n "$CPIO" && break
5515done
5516
5517  else
5518    # The variable is set, but is it from the command line or the environment?
5519
5520    # Try to remove the string !CPIO! from our list.
5521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5523      # If it failed, the variable was not from the command line. Ignore it,
5524      # but warn the user (except for BASH, which is always set by the calling BASH).
5525      if test "xCPIO" != xBASH; then
5526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5527$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5528      fi
5529      # Try to locate tool using the code snippet
5530      for ac_prog in cpio
5531do
5532  # Extract the first word of "$ac_prog", so it can be a program name with args.
5533set dummy $ac_prog; ac_word=$2
5534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535$as_echo_n "checking for $ac_word... " >&6; }
5536if ${ac_cv_path_CPIO+:} false; then :
5537  $as_echo_n "(cached) " >&6
5538else
5539  case $CPIO in
5540  [\\/]* | ?:[\\/]*)
5541  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5542  ;;
5543  *)
5544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545for as_dir in $PATH
5546do
5547  IFS=$as_save_IFS
5548  test -z "$as_dir" && as_dir=.
5549    for ac_exec_ext in '' $ac_executable_extensions; do
5550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5551    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5553    break 2
5554  fi
5555done
5556  done
5557IFS=$as_save_IFS
5558
5559  ;;
5560esac
5561fi
5562CPIO=$ac_cv_path_CPIO
5563if test -n "$CPIO"; then
5564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5565$as_echo "$CPIO" >&6; }
5566else
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568$as_echo "no" >&6; }
5569fi
5570
5571
5572  test -n "$CPIO" && break
5573done
5574
5575    else
5576      # If it succeeded, then it was overridden by the user. We will use it
5577      # for the tool.
5578
5579      # First remove it from the list of overridden variables, so we can test
5580      # for unknown variables in the end.
5581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5582
5583      # Check if the provided tool contains a complete path.
5584      tool_specified="$CPIO"
5585      tool_basename="${tool_specified##*/}"
5586      if test "x$tool_basename" = "x$tool_specified"; then
5587        # A command without a complete path is provided, search $PATH.
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5589$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5590        # Extract the first word of "$tool_basename", so it can be a program name with args.
5591set dummy $tool_basename; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if ${ac_cv_path_CPIO+:} false; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $CPIO in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5609    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620CPIO=$ac_cv_path_CPIO
5621if test -n "$CPIO"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5623$as_echo "$CPIO" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630        if test "x$CPIO" = x; then
5631          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5632        fi
5633      else
5634        # Otherwise we believe it is a complete path. Use it as it is.
5635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5636$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5638$as_echo_n "checking for CPIO... " >&6; }
5639        if test ! -x "$tool_specified"; then
5640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5641$as_echo "not found" >&6; }
5642          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5643        fi
5644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5645$as_echo "$tool_specified" >&6; }
5646      fi
5647    fi
5648  fi
5649
5650
5651
5652  if test "x$CPIO" = x; then
5653    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5654  fi
5655
5656
5657
5658
5659
5660  # Publish this variable in the help.
5661
5662
5663  if test "x$CUT" = x; then
5664    # The variable is not set by user, try to locate tool using the code snippet
5665    for ac_prog in cut
5666do
5667  # Extract the first word of "$ac_prog", so it can be a program name with args.
5668set dummy $ac_prog; ac_word=$2
5669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5670$as_echo_n "checking for $ac_word... " >&6; }
5671if ${ac_cv_path_CUT+:} false; then :
5672  $as_echo_n "(cached) " >&6
5673else
5674  case $CUT in
5675  [\\/]* | ?:[\\/]*)
5676  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5677  ;;
5678  *)
5679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5680for as_dir in $PATH
5681do
5682  IFS=$as_save_IFS
5683  test -z "$as_dir" && as_dir=.
5684    for ac_exec_ext in '' $ac_executable_extensions; do
5685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5686    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5688    break 2
5689  fi
5690done
5691  done
5692IFS=$as_save_IFS
5693
5694  ;;
5695esac
5696fi
5697CUT=$ac_cv_path_CUT
5698if test -n "$CUT"; then
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5700$as_echo "$CUT" >&6; }
5701else
5702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
5704fi
5705
5706
5707  test -n "$CUT" && break
5708done
5709
5710  else
5711    # The variable is set, but is it from the command line or the environment?
5712
5713    # Try to remove the string !CUT! from our list.
5714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5716      # If it failed, the variable was not from the command line. Ignore it,
5717      # but warn the user (except for BASH, which is always set by the calling BASH).
5718      if test "xCUT" != xBASH; then
5719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5720$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5721      fi
5722      # Try to locate tool using the code snippet
5723      for ac_prog in cut
5724do
5725  # Extract the first word of "$ac_prog", so it can be a program name with args.
5726set dummy $ac_prog; ac_word=$2
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728$as_echo_n "checking for $ac_word... " >&6; }
5729if ${ac_cv_path_CUT+:} false; then :
5730  $as_echo_n "(cached) " >&6
5731else
5732  case $CUT in
5733  [\\/]* | ?:[\\/]*)
5734  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5735  ;;
5736  *)
5737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738for as_dir in $PATH
5739do
5740  IFS=$as_save_IFS
5741  test -z "$as_dir" && as_dir=.
5742    for ac_exec_ext in '' $ac_executable_extensions; do
5743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746    break 2
5747  fi
5748done
5749  done
5750IFS=$as_save_IFS
5751
5752  ;;
5753esac
5754fi
5755CUT=$ac_cv_path_CUT
5756if test -n "$CUT"; then
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5758$as_echo "$CUT" >&6; }
5759else
5760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761$as_echo "no" >&6; }
5762fi
5763
5764
5765  test -n "$CUT" && break
5766done
5767
5768    else
5769      # If it succeeded, then it was overridden by the user. We will use it
5770      # for the tool.
5771
5772      # First remove it from the list of overridden variables, so we can test
5773      # for unknown variables in the end.
5774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5775
5776      # Check if the provided tool contains a complete path.
5777      tool_specified="$CUT"
5778      tool_basename="${tool_specified##*/}"
5779      if test "x$tool_basename" = "x$tool_specified"; then
5780        # A command without a complete path is provided, search $PATH.
5781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5782$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5783        # Extract the first word of "$tool_basename", so it can be a program name with args.
5784set dummy $tool_basename; ac_word=$2
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if ${ac_cv_path_CUT+:} false; then :
5788  $as_echo_n "(cached) " >&6
5789else
5790  case $CUT in
5791  [\\/]* | ?:[\\/]*)
5792  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5793  ;;
5794  *)
5795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798  IFS=$as_save_IFS
5799  test -z "$as_dir" && as_dir=.
5800    for ac_exec_ext in '' $ac_executable_extensions; do
5801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5802    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804    break 2
5805  fi
5806done
5807  done
5808IFS=$as_save_IFS
5809
5810  ;;
5811esac
5812fi
5813CUT=$ac_cv_path_CUT
5814if test -n "$CUT"; then
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5816$as_echo "$CUT" >&6; }
5817else
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823        if test "x$CUT" = x; then
5824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5825        fi
5826      else
5827        # Otherwise we believe it is a complete path. Use it as it is.
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5829$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5831$as_echo_n "checking for CUT... " >&6; }
5832        if test ! -x "$tool_specified"; then
5833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5834$as_echo "not found" >&6; }
5835          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5836        fi
5837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5838$as_echo "$tool_specified" >&6; }
5839      fi
5840    fi
5841  fi
5842
5843
5844
5845  if test "x$CUT" = x; then
5846    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5847  fi
5848
5849
5850
5851
5852
5853  # Publish this variable in the help.
5854
5855
5856  if test "x$DATE" = x; then
5857    # The variable is not set by user, try to locate tool using the code snippet
5858    for ac_prog in date
5859do
5860  # Extract the first word of "$ac_prog", so it can be a program name with args.
5861set dummy $ac_prog; ac_word=$2
5862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5863$as_echo_n "checking for $ac_word... " >&6; }
5864if ${ac_cv_path_DATE+:} false; then :
5865  $as_echo_n "(cached) " >&6
5866else
5867  case $DATE in
5868  [\\/]* | ?:[\\/]*)
5869  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5870  ;;
5871  *)
5872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5873for as_dir in $PATH
5874do
5875  IFS=$as_save_IFS
5876  test -z "$as_dir" && as_dir=.
5877    for ac_exec_ext in '' $ac_executable_extensions; do
5878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5879    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5881    break 2
5882  fi
5883done
5884  done
5885IFS=$as_save_IFS
5886
5887  ;;
5888esac
5889fi
5890DATE=$ac_cv_path_DATE
5891if test -n "$DATE"; then
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5893$as_echo "$DATE" >&6; }
5894else
5895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897fi
5898
5899
5900  test -n "$DATE" && break
5901done
5902
5903  else
5904    # The variable is set, but is it from the command line or the environment?
5905
5906    # Try to remove the string !DATE! from our list.
5907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5909      # If it failed, the variable was not from the command line. Ignore it,
5910      # but warn the user (except for BASH, which is always set by the calling BASH).
5911      if test "xDATE" != xBASH; then
5912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5913$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5914      fi
5915      # Try to locate tool using the code snippet
5916      for ac_prog in date
5917do
5918  # Extract the first word of "$ac_prog", so it can be a program name with args.
5919set dummy $ac_prog; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if ${ac_cv_path_DATE+:} false; then :
5923  $as_echo_n "(cached) " >&6
5924else
5925  case $DATE in
5926  [\\/]* | ?:[\\/]*)
5927  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5928  ;;
5929  *)
5930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5931for as_dir in $PATH
5932do
5933  IFS=$as_save_IFS
5934  test -z "$as_dir" && as_dir=.
5935    for ac_exec_ext in '' $ac_executable_extensions; do
5936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5937    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5939    break 2
5940  fi
5941done
5942  done
5943IFS=$as_save_IFS
5944
5945  ;;
5946esac
5947fi
5948DATE=$ac_cv_path_DATE
5949if test -n "$DATE"; then
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5951$as_echo "$DATE" >&6; }
5952else
5953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954$as_echo "no" >&6; }
5955fi
5956
5957
5958  test -n "$DATE" && break
5959done
5960
5961    else
5962      # If it succeeded, then it was overridden by the user. We will use it
5963      # for the tool.
5964
5965      # First remove it from the list of overridden variables, so we can test
5966      # for unknown variables in the end.
5967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5968
5969      # Check if the provided tool contains a complete path.
5970      tool_specified="$DATE"
5971      tool_basename="${tool_specified##*/}"
5972      if test "x$tool_basename" = "x$tool_specified"; then
5973        # A command without a complete path is provided, search $PATH.
5974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
5975$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
5976        # Extract the first word of "$tool_basename", so it can be a program name with args.
5977set dummy $tool_basename; ac_word=$2
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if ${ac_cv_path_DATE+:} false; then :
5981  $as_echo_n "(cached) " >&6
5982else
5983  case $DATE in
5984  [\\/]* | ?:[\\/]*)
5985  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5986  ;;
5987  *)
5988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989for as_dir in $PATH
5990do
5991  IFS=$as_save_IFS
5992  test -z "$as_dir" && as_dir=.
5993    for ac_exec_ext in '' $ac_executable_extensions; do
5994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5997    break 2
5998  fi
5999done
6000  done
6001IFS=$as_save_IFS
6002
6003  ;;
6004esac
6005fi
6006DATE=$ac_cv_path_DATE
6007if test -n "$DATE"; then
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6009$as_echo "$DATE" >&6; }
6010else
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013fi
6014
6015
6016        if test "x$DATE" = x; then
6017          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6018        fi
6019      else
6020        # Otherwise we believe it is a complete path. Use it as it is.
6021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6022$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6024$as_echo_n "checking for DATE... " >&6; }
6025        if test ! -x "$tool_specified"; then
6026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6027$as_echo "not found" >&6; }
6028          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6029        fi
6030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6031$as_echo "$tool_specified" >&6; }
6032      fi
6033    fi
6034  fi
6035
6036
6037
6038  if test "x$DATE" = x; then
6039    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6040  fi
6041
6042
6043
6044
6045
6046  # Publish this variable in the help.
6047
6048
6049  if test "x$DIFF" = x; then
6050    # The variable is not set by user, try to locate tool using the code snippet
6051    for ac_prog in gdiff diff
6052do
6053  # Extract the first word of "$ac_prog", so it can be a program name with args.
6054set dummy $ac_prog; ac_word=$2
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6056$as_echo_n "checking for $ac_word... " >&6; }
6057if ${ac_cv_path_DIFF+:} false; then :
6058  $as_echo_n "(cached) " >&6
6059else
6060  case $DIFF in
6061  [\\/]* | ?:[\\/]*)
6062  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6063  ;;
6064  *)
6065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6066for as_dir in $PATH
6067do
6068  IFS=$as_save_IFS
6069  test -z "$as_dir" && as_dir=.
6070    for ac_exec_ext in '' $ac_executable_extensions; do
6071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6072    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6074    break 2
6075  fi
6076done
6077  done
6078IFS=$as_save_IFS
6079
6080  ;;
6081esac
6082fi
6083DIFF=$ac_cv_path_DIFF
6084if test -n "$DIFF"; then
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6086$as_echo "$DIFF" >&6; }
6087else
6088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089$as_echo "no" >&6; }
6090fi
6091
6092
6093  test -n "$DIFF" && break
6094done
6095
6096  else
6097    # The variable is set, but is it from the command line or the environment?
6098
6099    # Try to remove the string !DIFF! from our list.
6100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6102      # If it failed, the variable was not from the command line. Ignore it,
6103      # but warn the user (except for BASH, which is always set by the calling BASH).
6104      if test "xDIFF" != xBASH; then
6105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6106$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6107      fi
6108      # Try to locate tool using the code snippet
6109      for ac_prog in gdiff diff
6110do
6111  # Extract the first word of "$ac_prog", so it can be a program name with args.
6112set dummy $ac_prog; ac_word=$2
6113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6114$as_echo_n "checking for $ac_word... " >&6; }
6115if ${ac_cv_path_DIFF+:} false; then :
6116  $as_echo_n "(cached) " >&6
6117else
6118  case $DIFF in
6119  [\\/]* | ?:[\\/]*)
6120  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6121  ;;
6122  *)
6123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126  IFS=$as_save_IFS
6127  test -z "$as_dir" && as_dir=.
6128    for ac_exec_ext in '' $ac_executable_extensions; do
6129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6130    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132    break 2
6133  fi
6134done
6135  done
6136IFS=$as_save_IFS
6137
6138  ;;
6139esac
6140fi
6141DIFF=$ac_cv_path_DIFF
6142if test -n "$DIFF"; then
6143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6144$as_echo "$DIFF" >&6; }
6145else
6146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6147$as_echo "no" >&6; }
6148fi
6149
6150
6151  test -n "$DIFF" && break
6152done
6153
6154    else
6155      # If it succeeded, then it was overridden by the user. We will use it
6156      # for the tool.
6157
6158      # First remove it from the list of overridden variables, so we can test
6159      # for unknown variables in the end.
6160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6161
6162      # Check if the provided tool contains a complete path.
6163      tool_specified="$DIFF"
6164      tool_basename="${tool_specified##*/}"
6165      if test "x$tool_basename" = "x$tool_specified"; then
6166        # A command without a complete path is provided, search $PATH.
6167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6168$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6169        # Extract the first word of "$tool_basename", so it can be a program name with args.
6170set dummy $tool_basename; ac_word=$2
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172$as_echo_n "checking for $ac_word... " >&6; }
6173if ${ac_cv_path_DIFF+:} false; then :
6174  $as_echo_n "(cached) " >&6
6175else
6176  case $DIFF in
6177  [\\/]* | ?:[\\/]*)
6178  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6179  ;;
6180  *)
6181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184  IFS=$as_save_IFS
6185  test -z "$as_dir" && as_dir=.
6186    for ac_exec_ext in '' $ac_executable_extensions; do
6187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190    break 2
6191  fi
6192done
6193  done
6194IFS=$as_save_IFS
6195
6196  ;;
6197esac
6198fi
6199DIFF=$ac_cv_path_DIFF
6200if test -n "$DIFF"; then
6201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6202$as_echo "$DIFF" >&6; }
6203else
6204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209        if test "x$DIFF" = x; then
6210          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6211        fi
6212      else
6213        # Otherwise we believe it is a complete path. Use it as it is.
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6215$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6217$as_echo_n "checking for DIFF... " >&6; }
6218        if test ! -x "$tool_specified"; then
6219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6220$as_echo "not found" >&6; }
6221          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6222        fi
6223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6224$as_echo "$tool_specified" >&6; }
6225      fi
6226    fi
6227  fi
6228
6229
6230
6231  if test "x$DIFF" = x; then
6232    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6233  fi
6234
6235
6236
6237
6238
6239  # Publish this variable in the help.
6240
6241
6242  if test "x$DIRNAME" = x; then
6243    # The variable is not set by user, try to locate tool using the code snippet
6244    for ac_prog in dirname
6245do
6246  # Extract the first word of "$ac_prog", so it can be a program name with args.
6247set dummy $ac_prog; ac_word=$2
6248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6249$as_echo_n "checking for $ac_word... " >&6; }
6250if ${ac_cv_path_DIRNAME+:} false; then :
6251  $as_echo_n "(cached) " >&6
6252else
6253  case $DIRNAME in
6254  [\\/]* | ?:[\\/]*)
6255  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6256  ;;
6257  *)
6258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6259for as_dir in $PATH
6260do
6261  IFS=$as_save_IFS
6262  test -z "$as_dir" && as_dir=.
6263    for ac_exec_ext in '' $ac_executable_extensions; do
6264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6265    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6267    break 2
6268  fi
6269done
6270  done
6271IFS=$as_save_IFS
6272
6273  ;;
6274esac
6275fi
6276DIRNAME=$ac_cv_path_DIRNAME
6277if test -n "$DIRNAME"; then
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6279$as_echo "$DIRNAME" >&6; }
6280else
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6282$as_echo "no" >&6; }
6283fi
6284
6285
6286  test -n "$DIRNAME" && break
6287done
6288
6289  else
6290    # The variable is set, but is it from the command line or the environment?
6291
6292    # Try to remove the string !DIRNAME! from our list.
6293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6295      # If it failed, the variable was not from the command line. Ignore it,
6296      # but warn the user (except for BASH, which is always set by the calling BASH).
6297      if test "xDIRNAME" != xBASH; then
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6299$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6300      fi
6301      # Try to locate tool using the code snippet
6302      for ac_prog in dirname
6303do
6304  # Extract the first word of "$ac_prog", so it can be a program name with args.
6305set dummy $ac_prog; ac_word=$2
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307$as_echo_n "checking for $ac_word... " >&6; }
6308if ${ac_cv_path_DIRNAME+:} false; then :
6309  $as_echo_n "(cached) " >&6
6310else
6311  case $DIRNAME in
6312  [\\/]* | ?:[\\/]*)
6313  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6314  ;;
6315  *)
6316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6317for as_dir in $PATH
6318do
6319  IFS=$as_save_IFS
6320  test -z "$as_dir" && as_dir=.
6321    for ac_exec_ext in '' $ac_executable_extensions; do
6322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6323    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6325    break 2
6326  fi
6327done
6328  done
6329IFS=$as_save_IFS
6330
6331  ;;
6332esac
6333fi
6334DIRNAME=$ac_cv_path_DIRNAME
6335if test -n "$DIRNAME"; then
6336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6337$as_echo "$DIRNAME" >&6; }
6338else
6339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6340$as_echo "no" >&6; }
6341fi
6342
6343
6344  test -n "$DIRNAME" && break
6345done
6346
6347    else
6348      # If it succeeded, then it was overridden by the user. We will use it
6349      # for the tool.
6350
6351      # First remove it from the list of overridden variables, so we can test
6352      # for unknown variables in the end.
6353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6354
6355      # Check if the provided tool contains a complete path.
6356      tool_specified="$DIRNAME"
6357      tool_basename="${tool_specified##*/}"
6358      if test "x$tool_basename" = "x$tool_specified"; then
6359        # A command without a complete path is provided, search $PATH.
6360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6361$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6362        # Extract the first word of "$tool_basename", so it can be a program name with args.
6363set dummy $tool_basename; ac_word=$2
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6365$as_echo_n "checking for $ac_word... " >&6; }
6366if ${ac_cv_path_DIRNAME+:} false; then :
6367  $as_echo_n "(cached) " >&6
6368else
6369  case $DIRNAME in
6370  [\\/]* | ?:[\\/]*)
6371  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6372  ;;
6373  *)
6374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6375for as_dir in $PATH
6376do
6377  IFS=$as_save_IFS
6378  test -z "$as_dir" && as_dir=.
6379    for ac_exec_ext in '' $ac_executable_extensions; do
6380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6381    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6383    break 2
6384  fi
6385done
6386  done
6387IFS=$as_save_IFS
6388
6389  ;;
6390esac
6391fi
6392DIRNAME=$ac_cv_path_DIRNAME
6393if test -n "$DIRNAME"; then
6394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6395$as_echo "$DIRNAME" >&6; }
6396else
6397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
6399fi
6400
6401
6402        if test "x$DIRNAME" = x; then
6403          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6404        fi
6405      else
6406        # Otherwise we believe it is a complete path. Use it as it is.
6407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6408$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6410$as_echo_n "checking for DIRNAME... " >&6; }
6411        if test ! -x "$tool_specified"; then
6412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6413$as_echo "not found" >&6; }
6414          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6415        fi
6416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6417$as_echo "$tool_specified" >&6; }
6418      fi
6419    fi
6420  fi
6421
6422
6423
6424  if test "x$DIRNAME" = x; then
6425    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6426  fi
6427
6428
6429
6430
6431
6432  # Publish this variable in the help.
6433
6434
6435  if test "x$ECHO" = x; then
6436    # The variable is not set by user, try to locate tool using the code snippet
6437    for ac_prog in echo
6438do
6439  # Extract the first word of "$ac_prog", so it can be a program name with args.
6440set dummy $ac_prog; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if ${ac_cv_path_ECHO+:} false; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  case $ECHO in
6447  [\\/]* | ?:[\\/]*)
6448  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6449  ;;
6450  *)
6451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454  IFS=$as_save_IFS
6455  test -z "$as_dir" && as_dir=.
6456    for ac_exec_ext in '' $ac_executable_extensions; do
6457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460    break 2
6461  fi
6462done
6463  done
6464IFS=$as_save_IFS
6465
6466  ;;
6467esac
6468fi
6469ECHO=$ac_cv_path_ECHO
6470if test -n "$ECHO"; then
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6472$as_echo "$ECHO" >&6; }
6473else
6474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }
6476fi
6477
6478
6479  test -n "$ECHO" && break
6480done
6481
6482  else
6483    # The variable is set, but is it from the command line or the environment?
6484
6485    # Try to remove the string !ECHO! from our list.
6486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6488      # If it failed, the variable was not from the command line. Ignore it,
6489      # but warn the user (except for BASH, which is always set by the calling BASH).
6490      if test "xECHO" != xBASH; then
6491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6492$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6493      fi
6494      # Try to locate tool using the code snippet
6495      for ac_prog in echo
6496do
6497  # Extract the first word of "$ac_prog", so it can be a program name with args.
6498set dummy $ac_prog; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_ECHO+:} false; then :
6502  $as_echo_n "(cached) " >&6
6503else
6504  case $ECHO in
6505  [\\/]* | ?:[\\/]*)
6506  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6507  ;;
6508  *)
6509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in $PATH
6511do
6512  IFS=$as_save_IFS
6513  test -z "$as_dir" && as_dir=.
6514    for ac_exec_ext in '' $ac_executable_extensions; do
6515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518    break 2
6519  fi
6520done
6521  done
6522IFS=$as_save_IFS
6523
6524  ;;
6525esac
6526fi
6527ECHO=$ac_cv_path_ECHO
6528if test -n "$ECHO"; then
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6530$as_echo "$ECHO" >&6; }
6531else
6532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537  test -n "$ECHO" && break
6538done
6539
6540    else
6541      # If it succeeded, then it was overridden by the user. We will use it
6542      # for the tool.
6543
6544      # First remove it from the list of overridden variables, so we can test
6545      # for unknown variables in the end.
6546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6547
6548      # Check if the provided tool contains a complete path.
6549      tool_specified="$ECHO"
6550      tool_basename="${tool_specified##*/}"
6551      if test "x$tool_basename" = "x$tool_specified"; then
6552        # A command without a complete path is provided, search $PATH.
6553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6554$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6555        # Extract the first word of "$tool_basename", so it can be a program name with args.
6556set dummy $tool_basename; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_ECHO+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $ECHO in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585ECHO=$ac_cv_path_ECHO
6586if test -n "$ECHO"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6588$as_echo "$ECHO" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595        if test "x$ECHO" = x; then
6596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6597        fi
6598      else
6599        # Otherwise we believe it is a complete path. Use it as it is.
6600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6601$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6603$as_echo_n "checking for ECHO... " >&6; }
6604        if test ! -x "$tool_specified"; then
6605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6606$as_echo "not found" >&6; }
6607          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6608        fi
6609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6610$as_echo "$tool_specified" >&6; }
6611      fi
6612    fi
6613  fi
6614
6615
6616
6617  if test "x$ECHO" = x; then
6618    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6619  fi
6620
6621
6622
6623
6624
6625  # Publish this variable in the help.
6626
6627
6628  if test "x$EXPR" = x; then
6629    # The variable is not set by user, try to locate tool using the code snippet
6630    for ac_prog in expr
6631do
6632  # Extract the first word of "$ac_prog", so it can be a program name with args.
6633set dummy $ac_prog; ac_word=$2
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6635$as_echo_n "checking for $ac_word... " >&6; }
6636if ${ac_cv_path_EXPR+:} false; then :
6637  $as_echo_n "(cached) " >&6
6638else
6639  case $EXPR in
6640  [\\/]* | ?:[\\/]*)
6641  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6642  ;;
6643  *)
6644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6645for as_dir in $PATH
6646do
6647  IFS=$as_save_IFS
6648  test -z "$as_dir" && as_dir=.
6649    for ac_exec_ext in '' $ac_executable_extensions; do
6650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6651    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6653    break 2
6654  fi
6655done
6656  done
6657IFS=$as_save_IFS
6658
6659  ;;
6660esac
6661fi
6662EXPR=$ac_cv_path_EXPR
6663if test -n "$EXPR"; then
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6665$as_echo "$EXPR" >&6; }
6666else
6667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6668$as_echo "no" >&6; }
6669fi
6670
6671
6672  test -n "$EXPR" && break
6673done
6674
6675  else
6676    # The variable is set, but is it from the command line or the environment?
6677
6678    # Try to remove the string !EXPR! from our list.
6679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6681      # If it failed, the variable was not from the command line. Ignore it,
6682      # but warn the user (except for BASH, which is always set by the calling BASH).
6683      if test "xEXPR" != xBASH; then
6684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6685$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6686      fi
6687      # Try to locate tool using the code snippet
6688      for ac_prog in expr
6689do
6690  # Extract the first word of "$ac_prog", so it can be a program name with args.
6691set dummy $ac_prog; ac_word=$2
6692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6693$as_echo_n "checking for $ac_word... " >&6; }
6694if ${ac_cv_path_EXPR+:} false; then :
6695  $as_echo_n "(cached) " >&6
6696else
6697  case $EXPR in
6698  [\\/]* | ?:[\\/]*)
6699  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6700  ;;
6701  *)
6702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6703for as_dir in $PATH
6704do
6705  IFS=$as_save_IFS
6706  test -z "$as_dir" && as_dir=.
6707    for ac_exec_ext in '' $ac_executable_extensions; do
6708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6709    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6711    break 2
6712  fi
6713done
6714  done
6715IFS=$as_save_IFS
6716
6717  ;;
6718esac
6719fi
6720EXPR=$ac_cv_path_EXPR
6721if test -n "$EXPR"; then
6722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6723$as_echo "$EXPR" >&6; }
6724else
6725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726$as_echo "no" >&6; }
6727fi
6728
6729
6730  test -n "$EXPR" && break
6731done
6732
6733    else
6734      # If it succeeded, then it was overridden by the user. We will use it
6735      # for the tool.
6736
6737      # First remove it from the list of overridden variables, so we can test
6738      # for unknown variables in the end.
6739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6740
6741      # Check if the provided tool contains a complete path.
6742      tool_specified="$EXPR"
6743      tool_basename="${tool_specified##*/}"
6744      if test "x$tool_basename" = "x$tool_specified"; then
6745        # A command without a complete path is provided, search $PATH.
6746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6747$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6748        # Extract the first word of "$tool_basename", so it can be a program name with args.
6749set dummy $tool_basename; ac_word=$2
6750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6751$as_echo_n "checking for $ac_word... " >&6; }
6752if ${ac_cv_path_EXPR+:} false; then :
6753  $as_echo_n "(cached) " >&6
6754else
6755  case $EXPR in
6756  [\\/]* | ?:[\\/]*)
6757  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6758  ;;
6759  *)
6760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6761for as_dir in $PATH
6762do
6763  IFS=$as_save_IFS
6764  test -z "$as_dir" && as_dir=.
6765    for ac_exec_ext in '' $ac_executable_extensions; do
6766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6767    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6769    break 2
6770  fi
6771done
6772  done
6773IFS=$as_save_IFS
6774
6775  ;;
6776esac
6777fi
6778EXPR=$ac_cv_path_EXPR
6779if test -n "$EXPR"; then
6780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6781$as_echo "$EXPR" >&6; }
6782else
6783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6784$as_echo "no" >&6; }
6785fi
6786
6787
6788        if test "x$EXPR" = x; then
6789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6790        fi
6791      else
6792        # Otherwise we believe it is a complete path. Use it as it is.
6793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6794$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6796$as_echo_n "checking for EXPR... " >&6; }
6797        if test ! -x "$tool_specified"; then
6798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6799$as_echo "not found" >&6; }
6800          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6801        fi
6802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6803$as_echo "$tool_specified" >&6; }
6804      fi
6805    fi
6806  fi
6807
6808
6809
6810  if test "x$EXPR" = x; then
6811    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6812  fi
6813
6814
6815
6816
6817
6818  # Publish this variable in the help.
6819
6820
6821  if test "x$FILE" = x; then
6822    # The variable is not set by user, try to locate tool using the code snippet
6823    for ac_prog in file
6824do
6825  # Extract the first word of "$ac_prog", so it can be a program name with args.
6826set dummy $ac_prog; ac_word=$2
6827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6828$as_echo_n "checking for $ac_word... " >&6; }
6829if ${ac_cv_path_FILE+:} false; then :
6830  $as_echo_n "(cached) " >&6
6831else
6832  case $FILE in
6833  [\\/]* | ?:[\\/]*)
6834  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6835  ;;
6836  *)
6837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6838for as_dir in $PATH
6839do
6840  IFS=$as_save_IFS
6841  test -z "$as_dir" && as_dir=.
6842    for ac_exec_ext in '' $ac_executable_extensions; do
6843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6844    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6846    break 2
6847  fi
6848done
6849  done
6850IFS=$as_save_IFS
6851
6852  ;;
6853esac
6854fi
6855FILE=$ac_cv_path_FILE
6856if test -n "$FILE"; then
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6858$as_echo "$FILE" >&6; }
6859else
6860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6861$as_echo "no" >&6; }
6862fi
6863
6864
6865  test -n "$FILE" && break
6866done
6867
6868  else
6869    # The variable is set, but is it from the command line or the environment?
6870
6871    # Try to remove the string !FILE! from our list.
6872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6874      # If it failed, the variable was not from the command line. Ignore it,
6875      # but warn the user (except for BASH, which is always set by the calling BASH).
6876      if test "xFILE" != xBASH; then
6877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6878$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6879      fi
6880      # Try to locate tool using the code snippet
6881      for ac_prog in file
6882do
6883  # Extract the first word of "$ac_prog", so it can be a program name with args.
6884set dummy $ac_prog; ac_word=$2
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6886$as_echo_n "checking for $ac_word... " >&6; }
6887if ${ac_cv_path_FILE+:} false; then :
6888  $as_echo_n "(cached) " >&6
6889else
6890  case $FILE in
6891  [\\/]* | ?:[\\/]*)
6892  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6893  ;;
6894  *)
6895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6896for as_dir in $PATH
6897do
6898  IFS=$as_save_IFS
6899  test -z "$as_dir" && as_dir=.
6900    for ac_exec_ext in '' $ac_executable_extensions; do
6901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6902    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6904    break 2
6905  fi
6906done
6907  done
6908IFS=$as_save_IFS
6909
6910  ;;
6911esac
6912fi
6913FILE=$ac_cv_path_FILE
6914if test -n "$FILE"; then
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6916$as_echo "$FILE" >&6; }
6917else
6918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6919$as_echo "no" >&6; }
6920fi
6921
6922
6923  test -n "$FILE" && break
6924done
6925
6926    else
6927      # If it succeeded, then it was overridden by the user. We will use it
6928      # for the tool.
6929
6930      # First remove it from the list of overridden variables, so we can test
6931      # for unknown variables in the end.
6932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6933
6934      # Check if the provided tool contains a complete path.
6935      tool_specified="$FILE"
6936      tool_basename="${tool_specified##*/}"
6937      if test "x$tool_basename" = "x$tool_specified"; then
6938        # A command without a complete path is provided, search $PATH.
6939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6940$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6941        # Extract the first word of "$tool_basename", so it can be a program name with args.
6942set dummy $tool_basename; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_FILE+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $FILE in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971FILE=$ac_cv_path_FILE
6972if test -n "$FILE"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6974$as_echo "$FILE" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981        if test "x$FILE" = x; then
6982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6983        fi
6984      else
6985        # Otherwise we believe it is a complete path. Use it as it is.
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
6987$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
6989$as_echo_n "checking for FILE... " >&6; }
6990        if test ! -x "$tool_specified"; then
6991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6992$as_echo "not found" >&6; }
6993          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
6994        fi
6995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6996$as_echo "$tool_specified" >&6; }
6997      fi
6998    fi
6999  fi
7000
7001
7002
7003  if test "x$FILE" = x; then
7004    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7005  fi
7006
7007
7008
7009
7010
7011  # Publish this variable in the help.
7012
7013
7014  if test "x$FIND" = x; then
7015    # The variable is not set by user, try to locate tool using the code snippet
7016    for ac_prog in find
7017do
7018  # Extract the first word of "$ac_prog", so it can be a program name with args.
7019set dummy $ac_prog; ac_word=$2
7020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7021$as_echo_n "checking for $ac_word... " >&6; }
7022if ${ac_cv_path_FIND+:} false; then :
7023  $as_echo_n "(cached) " >&6
7024else
7025  case $FIND in
7026  [\\/]* | ?:[\\/]*)
7027  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7028  ;;
7029  *)
7030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7031for as_dir in $PATH
7032do
7033  IFS=$as_save_IFS
7034  test -z "$as_dir" && as_dir=.
7035    for ac_exec_ext in '' $ac_executable_extensions; do
7036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7037    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7039    break 2
7040  fi
7041done
7042  done
7043IFS=$as_save_IFS
7044
7045  ;;
7046esac
7047fi
7048FIND=$ac_cv_path_FIND
7049if test -n "$FIND"; then
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7051$as_echo "$FIND" >&6; }
7052else
7053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7054$as_echo "no" >&6; }
7055fi
7056
7057
7058  test -n "$FIND" && break
7059done
7060
7061  else
7062    # The variable is set, but is it from the command line or the environment?
7063
7064    # Try to remove the string !FIND! from our list.
7065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7067      # If it failed, the variable was not from the command line. Ignore it,
7068      # but warn the user (except for BASH, which is always set by the calling BASH).
7069      if test "xFIND" != xBASH; then
7070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7071$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7072      fi
7073      # Try to locate tool using the code snippet
7074      for ac_prog in find
7075do
7076  # Extract the first word of "$ac_prog", so it can be a program name with args.
7077set dummy $ac_prog; ac_word=$2
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079$as_echo_n "checking for $ac_word... " >&6; }
7080if ${ac_cv_path_FIND+:} false; then :
7081  $as_echo_n "(cached) " >&6
7082else
7083  case $FIND in
7084  [\\/]* | ?:[\\/]*)
7085  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7086  ;;
7087  *)
7088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089for as_dir in $PATH
7090do
7091  IFS=$as_save_IFS
7092  test -z "$as_dir" && as_dir=.
7093    for ac_exec_ext in '' $ac_executable_extensions; do
7094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7097    break 2
7098  fi
7099done
7100  done
7101IFS=$as_save_IFS
7102
7103  ;;
7104esac
7105fi
7106FIND=$ac_cv_path_FIND
7107if test -n "$FIND"; then
7108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7109$as_echo "$FIND" >&6; }
7110else
7111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7112$as_echo "no" >&6; }
7113fi
7114
7115
7116  test -n "$FIND" && break
7117done
7118
7119    else
7120      # If it succeeded, then it was overridden by the user. We will use it
7121      # for the tool.
7122
7123      # First remove it from the list of overridden variables, so we can test
7124      # for unknown variables in the end.
7125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7126
7127      # Check if the provided tool contains a complete path.
7128      tool_specified="$FIND"
7129      tool_basename="${tool_specified##*/}"
7130      if test "x$tool_basename" = "x$tool_specified"; then
7131        # A command without a complete path is provided, search $PATH.
7132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7133$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7134        # Extract the first word of "$tool_basename", so it can be a program name with args.
7135set dummy $tool_basename; ac_word=$2
7136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7137$as_echo_n "checking for $ac_word... " >&6; }
7138if ${ac_cv_path_FIND+:} false; then :
7139  $as_echo_n "(cached) " >&6
7140else
7141  case $FIND in
7142  [\\/]* | ?:[\\/]*)
7143  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7144  ;;
7145  *)
7146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7147for as_dir in $PATH
7148do
7149  IFS=$as_save_IFS
7150  test -z "$as_dir" && as_dir=.
7151    for ac_exec_ext in '' $ac_executable_extensions; do
7152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7153    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7155    break 2
7156  fi
7157done
7158  done
7159IFS=$as_save_IFS
7160
7161  ;;
7162esac
7163fi
7164FIND=$ac_cv_path_FIND
7165if test -n "$FIND"; then
7166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7167$as_echo "$FIND" >&6; }
7168else
7169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7170$as_echo "no" >&6; }
7171fi
7172
7173
7174        if test "x$FIND" = x; then
7175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7176        fi
7177      else
7178        # Otherwise we believe it is a complete path. Use it as it is.
7179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7180$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7182$as_echo_n "checking for FIND... " >&6; }
7183        if test ! -x "$tool_specified"; then
7184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7185$as_echo "not found" >&6; }
7186          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7187        fi
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7189$as_echo "$tool_specified" >&6; }
7190      fi
7191    fi
7192  fi
7193
7194
7195
7196  if test "x$FIND" = x; then
7197    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7198  fi
7199
7200
7201
7202
7203
7204  # Publish this variable in the help.
7205
7206
7207  if test "x$HEAD" = x; then
7208    # The variable is not set by user, try to locate tool using the code snippet
7209    for ac_prog in head
7210do
7211  # Extract the first word of "$ac_prog", so it can be a program name with args.
7212set dummy $ac_prog; ac_word=$2
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214$as_echo_n "checking for $ac_word... " >&6; }
7215if ${ac_cv_path_HEAD+:} false; then :
7216  $as_echo_n "(cached) " >&6
7217else
7218  case $HEAD in
7219  [\\/]* | ?:[\\/]*)
7220  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7221  ;;
7222  *)
7223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224for as_dir in $PATH
7225do
7226  IFS=$as_save_IFS
7227  test -z "$as_dir" && as_dir=.
7228    for ac_exec_ext in '' $ac_executable_extensions; do
7229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7232    break 2
7233  fi
7234done
7235  done
7236IFS=$as_save_IFS
7237
7238  ;;
7239esac
7240fi
7241HEAD=$ac_cv_path_HEAD
7242if test -n "$HEAD"; then
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7244$as_echo "$HEAD" >&6; }
7245else
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247$as_echo "no" >&6; }
7248fi
7249
7250
7251  test -n "$HEAD" && break
7252done
7253
7254  else
7255    # The variable is set, but is it from the command line or the environment?
7256
7257    # Try to remove the string !HEAD! from our list.
7258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7260      # If it failed, the variable was not from the command line. Ignore it,
7261      # but warn the user (except for BASH, which is always set by the calling BASH).
7262      if test "xHEAD" != xBASH; then
7263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7264$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7265      fi
7266      # Try to locate tool using the code snippet
7267      for ac_prog in head
7268do
7269  # Extract the first word of "$ac_prog", so it can be a program name with args.
7270set dummy $ac_prog; ac_word=$2
7271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7272$as_echo_n "checking for $ac_word... " >&6; }
7273if ${ac_cv_path_HEAD+:} false; then :
7274  $as_echo_n "(cached) " >&6
7275else
7276  case $HEAD in
7277  [\\/]* | ?:[\\/]*)
7278  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7279  ;;
7280  *)
7281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7282for as_dir in $PATH
7283do
7284  IFS=$as_save_IFS
7285  test -z "$as_dir" && as_dir=.
7286    for ac_exec_ext in '' $ac_executable_extensions; do
7287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7288    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7290    break 2
7291  fi
7292done
7293  done
7294IFS=$as_save_IFS
7295
7296  ;;
7297esac
7298fi
7299HEAD=$ac_cv_path_HEAD
7300if test -n "$HEAD"; then
7301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7302$as_echo "$HEAD" >&6; }
7303else
7304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7305$as_echo "no" >&6; }
7306fi
7307
7308
7309  test -n "$HEAD" && break
7310done
7311
7312    else
7313      # If it succeeded, then it was overridden by the user. We will use it
7314      # for the tool.
7315
7316      # First remove it from the list of overridden variables, so we can test
7317      # for unknown variables in the end.
7318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7319
7320      # Check if the provided tool contains a complete path.
7321      tool_specified="$HEAD"
7322      tool_basename="${tool_specified##*/}"
7323      if test "x$tool_basename" = "x$tool_specified"; then
7324        # A command without a complete path is provided, search $PATH.
7325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7326$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7327        # Extract the first word of "$tool_basename", so it can be a program name with args.
7328set dummy $tool_basename; ac_word=$2
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330$as_echo_n "checking for $ac_word... " >&6; }
7331if ${ac_cv_path_HEAD+:} false; then :
7332  $as_echo_n "(cached) " >&6
7333else
7334  case $HEAD in
7335  [\\/]* | ?:[\\/]*)
7336  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7337  ;;
7338  *)
7339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340for as_dir in $PATH
7341do
7342  IFS=$as_save_IFS
7343  test -z "$as_dir" && as_dir=.
7344    for ac_exec_ext in '' $ac_executable_extensions; do
7345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348    break 2
7349  fi
7350done
7351  done
7352IFS=$as_save_IFS
7353
7354  ;;
7355esac
7356fi
7357HEAD=$ac_cv_path_HEAD
7358if test -n "$HEAD"; then
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7360$as_echo "$HEAD" >&6; }
7361else
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363$as_echo "no" >&6; }
7364fi
7365
7366
7367        if test "x$HEAD" = x; then
7368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7369        fi
7370      else
7371        # Otherwise we believe it is a complete path. Use it as it is.
7372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7373$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7375$as_echo_n "checking for HEAD... " >&6; }
7376        if test ! -x "$tool_specified"; then
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7378$as_echo "not found" >&6; }
7379          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7380        fi
7381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7382$as_echo "$tool_specified" >&6; }
7383      fi
7384    fi
7385  fi
7386
7387
7388
7389  if test "x$HEAD" = x; then
7390    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7391  fi
7392
7393
7394
7395
7396
7397  # Publish this variable in the help.
7398
7399
7400  if test "x$LN" = x; then
7401    # The variable is not set by user, try to locate tool using the code snippet
7402    for ac_prog in ln
7403do
7404  # Extract the first word of "$ac_prog", so it can be a program name with args.
7405set dummy $ac_prog; ac_word=$2
7406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407$as_echo_n "checking for $ac_word... " >&6; }
7408if ${ac_cv_path_LN+:} false; then :
7409  $as_echo_n "(cached) " >&6
7410else
7411  case $LN in
7412  [\\/]* | ?:[\\/]*)
7413  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7414  ;;
7415  *)
7416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7417for as_dir in $PATH
7418do
7419  IFS=$as_save_IFS
7420  test -z "$as_dir" && as_dir=.
7421    for ac_exec_ext in '' $ac_executable_extensions; do
7422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7423    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7425    break 2
7426  fi
7427done
7428  done
7429IFS=$as_save_IFS
7430
7431  ;;
7432esac
7433fi
7434LN=$ac_cv_path_LN
7435if test -n "$LN"; then
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7437$as_echo "$LN" >&6; }
7438else
7439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440$as_echo "no" >&6; }
7441fi
7442
7443
7444  test -n "$LN" && break
7445done
7446
7447  else
7448    # The variable is set, but is it from the command line or the environment?
7449
7450    # Try to remove the string !LN! from our list.
7451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7453      # If it failed, the variable was not from the command line. Ignore it,
7454      # but warn the user (except for BASH, which is always set by the calling BASH).
7455      if test "xLN" != xBASH; then
7456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7457$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7458      fi
7459      # Try to locate tool using the code snippet
7460      for ac_prog in ln
7461do
7462  # Extract the first word of "$ac_prog", so it can be a program name with args.
7463set dummy $ac_prog; ac_word=$2
7464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7465$as_echo_n "checking for $ac_word... " >&6; }
7466if ${ac_cv_path_LN+:} false; then :
7467  $as_echo_n "(cached) " >&6
7468else
7469  case $LN in
7470  [\\/]* | ?:[\\/]*)
7471  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7472  ;;
7473  *)
7474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7475for as_dir in $PATH
7476do
7477  IFS=$as_save_IFS
7478  test -z "$as_dir" && as_dir=.
7479    for ac_exec_ext in '' $ac_executable_extensions; do
7480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7481    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7483    break 2
7484  fi
7485done
7486  done
7487IFS=$as_save_IFS
7488
7489  ;;
7490esac
7491fi
7492LN=$ac_cv_path_LN
7493if test -n "$LN"; then
7494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7495$as_echo "$LN" >&6; }
7496else
7497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7498$as_echo "no" >&6; }
7499fi
7500
7501
7502  test -n "$LN" && break
7503done
7504
7505    else
7506      # If it succeeded, then it was overridden by the user. We will use it
7507      # for the tool.
7508
7509      # First remove it from the list of overridden variables, so we can test
7510      # for unknown variables in the end.
7511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7512
7513      # Check if the provided tool contains a complete path.
7514      tool_specified="$LN"
7515      tool_basename="${tool_specified##*/}"
7516      if test "x$tool_basename" = "x$tool_specified"; then
7517        # A command without a complete path is provided, search $PATH.
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7519$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7520        # Extract the first word of "$tool_basename", so it can be a program name with args.
7521set dummy $tool_basename; ac_word=$2
7522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7523$as_echo_n "checking for $ac_word... " >&6; }
7524if ${ac_cv_path_LN+:} false; then :
7525  $as_echo_n "(cached) " >&6
7526else
7527  case $LN in
7528  [\\/]* | ?:[\\/]*)
7529  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7530  ;;
7531  *)
7532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535  IFS=$as_save_IFS
7536  test -z "$as_dir" && as_dir=.
7537    for ac_exec_ext in '' $ac_executable_extensions; do
7538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7539    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7541    break 2
7542  fi
7543done
7544  done
7545IFS=$as_save_IFS
7546
7547  ;;
7548esac
7549fi
7550LN=$ac_cv_path_LN
7551if test -n "$LN"; then
7552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7553$as_echo "$LN" >&6; }
7554else
7555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556$as_echo "no" >&6; }
7557fi
7558
7559
7560        if test "x$LN" = x; then
7561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7562        fi
7563      else
7564        # Otherwise we believe it is a complete path. Use it as it is.
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7566$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7568$as_echo_n "checking for LN... " >&6; }
7569        if test ! -x "$tool_specified"; then
7570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7571$as_echo "not found" >&6; }
7572          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7573        fi
7574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7575$as_echo "$tool_specified" >&6; }
7576      fi
7577    fi
7578  fi
7579
7580
7581
7582  if test "x$LN" = x; then
7583    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7584  fi
7585
7586
7587
7588
7589
7590  # Publish this variable in the help.
7591
7592
7593  if test "x$LS" = x; then
7594    # The variable is not set by user, try to locate tool using the code snippet
7595    for ac_prog in ls
7596do
7597  # Extract the first word of "$ac_prog", so it can be a program name with args.
7598set dummy $ac_prog; ac_word=$2
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7600$as_echo_n "checking for $ac_word... " >&6; }
7601if ${ac_cv_path_LS+:} false; then :
7602  $as_echo_n "(cached) " >&6
7603else
7604  case $LS in
7605  [\\/]* | ?:[\\/]*)
7606  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7607  ;;
7608  *)
7609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7610for as_dir in $PATH
7611do
7612  IFS=$as_save_IFS
7613  test -z "$as_dir" && as_dir=.
7614    for ac_exec_ext in '' $ac_executable_extensions; do
7615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7616    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7618    break 2
7619  fi
7620done
7621  done
7622IFS=$as_save_IFS
7623
7624  ;;
7625esac
7626fi
7627LS=$ac_cv_path_LS
7628if test -n "$LS"; then
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7630$as_echo "$LS" >&6; }
7631else
7632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633$as_echo "no" >&6; }
7634fi
7635
7636
7637  test -n "$LS" && break
7638done
7639
7640  else
7641    # The variable is set, but is it from the command line or the environment?
7642
7643    # Try to remove the string !LS! from our list.
7644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7646      # If it failed, the variable was not from the command line. Ignore it,
7647      # but warn the user (except for BASH, which is always set by the calling BASH).
7648      if test "xLS" != xBASH; then
7649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7650$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7651      fi
7652      # Try to locate tool using the code snippet
7653      for ac_prog in ls
7654do
7655  # Extract the first word of "$ac_prog", so it can be a program name with args.
7656set dummy $ac_prog; ac_word=$2
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658$as_echo_n "checking for $ac_word... " >&6; }
7659if ${ac_cv_path_LS+:} false; then :
7660  $as_echo_n "(cached) " >&6
7661else
7662  case $LS in
7663  [\\/]* | ?:[\\/]*)
7664  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7665  ;;
7666  *)
7667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668for as_dir in $PATH
7669do
7670  IFS=$as_save_IFS
7671  test -z "$as_dir" && as_dir=.
7672    for ac_exec_ext in '' $ac_executable_extensions; do
7673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676    break 2
7677  fi
7678done
7679  done
7680IFS=$as_save_IFS
7681
7682  ;;
7683esac
7684fi
7685LS=$ac_cv_path_LS
7686if test -n "$LS"; then
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7688$as_echo "$LS" >&6; }
7689else
7690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691$as_echo "no" >&6; }
7692fi
7693
7694
7695  test -n "$LS" && break
7696done
7697
7698    else
7699      # If it succeeded, then it was overridden by the user. We will use it
7700      # for the tool.
7701
7702      # First remove it from the list of overridden variables, so we can test
7703      # for unknown variables in the end.
7704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7705
7706      # Check if the provided tool contains a complete path.
7707      tool_specified="$LS"
7708      tool_basename="${tool_specified##*/}"
7709      if test "x$tool_basename" = "x$tool_specified"; then
7710        # A command without a complete path is provided, search $PATH.
7711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7712$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7713        # Extract the first word of "$tool_basename", so it can be a program name with args.
7714set dummy $tool_basename; ac_word=$2
7715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716$as_echo_n "checking for $ac_word... " >&6; }
7717if ${ac_cv_path_LS+:} false; then :
7718  $as_echo_n "(cached) " >&6
7719else
7720  case $LS in
7721  [\\/]* | ?:[\\/]*)
7722  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7723  ;;
7724  *)
7725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726for as_dir in $PATH
7727do
7728  IFS=$as_save_IFS
7729  test -z "$as_dir" && as_dir=.
7730    for ac_exec_ext in '' $ac_executable_extensions; do
7731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734    break 2
7735  fi
7736done
7737  done
7738IFS=$as_save_IFS
7739
7740  ;;
7741esac
7742fi
7743LS=$ac_cv_path_LS
7744if test -n "$LS"; then
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7746$as_echo "$LS" >&6; }
7747else
7748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749$as_echo "no" >&6; }
7750fi
7751
7752
7753        if test "x$LS" = x; then
7754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7755        fi
7756      else
7757        # Otherwise we believe it is a complete path. Use it as it is.
7758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7759$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7761$as_echo_n "checking for LS... " >&6; }
7762        if test ! -x "$tool_specified"; then
7763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7764$as_echo "not found" >&6; }
7765          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7766        fi
7767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7768$as_echo "$tool_specified" >&6; }
7769      fi
7770    fi
7771  fi
7772
7773
7774
7775  if test "x$LS" = x; then
7776    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7777  fi
7778
7779
7780
7781
7782
7783  # Publish this variable in the help.
7784
7785
7786  if test "x$MKDIR" = x; then
7787    # The variable is not set by user, try to locate tool using the code snippet
7788    for ac_prog in mkdir
7789do
7790  # Extract the first word of "$ac_prog", so it can be a program name with args.
7791set dummy $ac_prog; ac_word=$2
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7793$as_echo_n "checking for $ac_word... " >&6; }
7794if ${ac_cv_path_MKDIR+:} false; then :
7795  $as_echo_n "(cached) " >&6
7796else
7797  case $MKDIR in
7798  [\\/]* | ?:[\\/]*)
7799  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7800  ;;
7801  *)
7802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7803for as_dir in $PATH
7804do
7805  IFS=$as_save_IFS
7806  test -z "$as_dir" && as_dir=.
7807    for ac_exec_ext in '' $ac_executable_extensions; do
7808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7809    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7811    break 2
7812  fi
7813done
7814  done
7815IFS=$as_save_IFS
7816
7817  ;;
7818esac
7819fi
7820MKDIR=$ac_cv_path_MKDIR
7821if test -n "$MKDIR"; then
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7823$as_echo "$MKDIR" >&6; }
7824else
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7826$as_echo "no" >&6; }
7827fi
7828
7829
7830  test -n "$MKDIR" && break
7831done
7832
7833  else
7834    # The variable is set, but is it from the command line or the environment?
7835
7836    # Try to remove the string !MKDIR! from our list.
7837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7839      # If it failed, the variable was not from the command line. Ignore it,
7840      # but warn the user (except for BASH, which is always set by the calling BASH).
7841      if test "xMKDIR" != xBASH; then
7842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7843$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7844      fi
7845      # Try to locate tool using the code snippet
7846      for ac_prog in mkdir
7847do
7848  # Extract the first word of "$ac_prog", so it can be a program name with args.
7849set dummy $ac_prog; ac_word=$2
7850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7851$as_echo_n "checking for $ac_word... " >&6; }
7852if ${ac_cv_path_MKDIR+:} false; then :
7853  $as_echo_n "(cached) " >&6
7854else
7855  case $MKDIR in
7856  [\\/]* | ?:[\\/]*)
7857  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7858  ;;
7859  *)
7860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7861for as_dir in $PATH
7862do
7863  IFS=$as_save_IFS
7864  test -z "$as_dir" && as_dir=.
7865    for ac_exec_ext in '' $ac_executable_extensions; do
7866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7867    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7869    break 2
7870  fi
7871done
7872  done
7873IFS=$as_save_IFS
7874
7875  ;;
7876esac
7877fi
7878MKDIR=$ac_cv_path_MKDIR
7879if test -n "$MKDIR"; then
7880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7881$as_echo "$MKDIR" >&6; }
7882else
7883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7884$as_echo "no" >&6; }
7885fi
7886
7887
7888  test -n "$MKDIR" && break
7889done
7890
7891    else
7892      # If it succeeded, then it was overridden by the user. We will use it
7893      # for the tool.
7894
7895      # First remove it from the list of overridden variables, so we can test
7896      # for unknown variables in the end.
7897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7898
7899      # Check if the provided tool contains a complete path.
7900      tool_specified="$MKDIR"
7901      tool_basename="${tool_specified##*/}"
7902      if test "x$tool_basename" = "x$tool_specified"; then
7903        # A command without a complete path is provided, search $PATH.
7904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7905$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7906        # Extract the first word of "$tool_basename", so it can be a program name with args.
7907set dummy $tool_basename; ac_word=$2
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909$as_echo_n "checking for $ac_word... " >&6; }
7910if ${ac_cv_path_MKDIR+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  case $MKDIR in
7914  [\\/]* | ?:[\\/]*)
7915  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7916  ;;
7917  *)
7918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919for as_dir in $PATH
7920do
7921  IFS=$as_save_IFS
7922  test -z "$as_dir" && as_dir=.
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927    break 2
7928  fi
7929done
7930  done
7931IFS=$as_save_IFS
7932
7933  ;;
7934esac
7935fi
7936MKDIR=$ac_cv_path_MKDIR
7937if test -n "$MKDIR"; then
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7939$as_echo "$MKDIR" >&6; }
7940else
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942$as_echo "no" >&6; }
7943fi
7944
7945
7946        if test "x$MKDIR" = x; then
7947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7948        fi
7949      else
7950        # Otherwise we believe it is a complete path. Use it as it is.
7951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
7952$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
7954$as_echo_n "checking for MKDIR... " >&6; }
7955        if test ! -x "$tool_specified"; then
7956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7957$as_echo "not found" >&6; }
7958          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
7959        fi
7960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7961$as_echo "$tool_specified" >&6; }
7962      fi
7963    fi
7964  fi
7965
7966
7967
7968  if test "x$MKDIR" = x; then
7969    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
7970  fi
7971
7972
7973
7974
7975
7976  # Publish this variable in the help.
7977
7978
7979  if test "x$MKTEMP" = x; then
7980    # The variable is not set by user, try to locate tool using the code snippet
7981    for ac_prog in mktemp
7982do
7983  # Extract the first word of "$ac_prog", so it can be a program name with args.
7984set dummy $ac_prog; ac_word=$2
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986$as_echo_n "checking for $ac_word... " >&6; }
7987if ${ac_cv_path_MKTEMP+:} false; then :
7988  $as_echo_n "(cached) " >&6
7989else
7990  case $MKTEMP in
7991  [\\/]* | ?:[\\/]*)
7992  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
7993  ;;
7994  *)
7995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996for as_dir in $PATH
7997do
7998  IFS=$as_save_IFS
7999  test -z "$as_dir" && as_dir=.
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004    break 2
8005  fi
8006done
8007  done
8008IFS=$as_save_IFS
8009
8010  ;;
8011esac
8012fi
8013MKTEMP=$ac_cv_path_MKTEMP
8014if test -n "$MKTEMP"; then
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8016$as_echo "$MKTEMP" >&6; }
8017else
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019$as_echo "no" >&6; }
8020fi
8021
8022
8023  test -n "$MKTEMP" && break
8024done
8025
8026  else
8027    # The variable is set, but is it from the command line or the environment?
8028
8029    # Try to remove the string !MKTEMP! from our list.
8030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8032      # If it failed, the variable was not from the command line. Ignore it,
8033      # but warn the user (except for BASH, which is always set by the calling BASH).
8034      if test "xMKTEMP" != xBASH; then
8035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8036$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8037      fi
8038      # Try to locate tool using the code snippet
8039      for ac_prog in mktemp
8040do
8041  # Extract the first word of "$ac_prog", so it can be a program name with args.
8042set dummy $ac_prog; ac_word=$2
8043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044$as_echo_n "checking for $ac_word... " >&6; }
8045if ${ac_cv_path_MKTEMP+:} false; then :
8046  $as_echo_n "(cached) " >&6
8047else
8048  case $MKTEMP in
8049  [\\/]* | ?:[\\/]*)
8050  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8051  ;;
8052  *)
8053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8054for as_dir in $PATH
8055do
8056  IFS=$as_save_IFS
8057  test -z "$as_dir" && as_dir=.
8058    for ac_exec_ext in '' $ac_executable_extensions; do
8059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8060    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8062    break 2
8063  fi
8064done
8065  done
8066IFS=$as_save_IFS
8067
8068  ;;
8069esac
8070fi
8071MKTEMP=$ac_cv_path_MKTEMP
8072if test -n "$MKTEMP"; then
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8074$as_echo "$MKTEMP" >&6; }
8075else
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8077$as_echo "no" >&6; }
8078fi
8079
8080
8081  test -n "$MKTEMP" && break
8082done
8083
8084    else
8085      # If it succeeded, then it was overridden by the user. We will use it
8086      # for the tool.
8087
8088      # First remove it from the list of overridden variables, so we can test
8089      # for unknown variables in the end.
8090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8091
8092      # Check if the provided tool contains a complete path.
8093      tool_specified="$MKTEMP"
8094      tool_basename="${tool_specified##*/}"
8095      if test "x$tool_basename" = "x$tool_specified"; then
8096        # A command without a complete path is provided, search $PATH.
8097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8098$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8099        # Extract the first word of "$tool_basename", so it can be a program name with args.
8100set dummy $tool_basename; ac_word=$2
8101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8102$as_echo_n "checking for $ac_word... " >&6; }
8103if ${ac_cv_path_MKTEMP+:} false; then :
8104  $as_echo_n "(cached) " >&6
8105else
8106  case $MKTEMP in
8107  [\\/]* | ?:[\\/]*)
8108  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8109  ;;
8110  *)
8111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8112for as_dir in $PATH
8113do
8114  IFS=$as_save_IFS
8115  test -z "$as_dir" && as_dir=.
8116    for ac_exec_ext in '' $ac_executable_extensions; do
8117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8118    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8120    break 2
8121  fi
8122done
8123  done
8124IFS=$as_save_IFS
8125
8126  ;;
8127esac
8128fi
8129MKTEMP=$ac_cv_path_MKTEMP
8130if test -n "$MKTEMP"; then
8131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8132$as_echo "$MKTEMP" >&6; }
8133else
8134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8135$as_echo "no" >&6; }
8136fi
8137
8138
8139        if test "x$MKTEMP" = x; then
8140          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8141        fi
8142      else
8143        # Otherwise we believe it is a complete path. Use it as it is.
8144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8145$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8147$as_echo_n "checking for MKTEMP... " >&6; }
8148        if test ! -x "$tool_specified"; then
8149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8150$as_echo "not found" >&6; }
8151          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8152        fi
8153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8154$as_echo "$tool_specified" >&6; }
8155      fi
8156    fi
8157  fi
8158
8159
8160
8161  if test "x$MKTEMP" = x; then
8162    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8163  fi
8164
8165
8166
8167
8168
8169  # Publish this variable in the help.
8170
8171
8172  if test "x$MV" = x; then
8173    # The variable is not set by user, try to locate tool using the code snippet
8174    for ac_prog in mv
8175do
8176  # Extract the first word of "$ac_prog", so it can be a program name with args.
8177set dummy $ac_prog; ac_word=$2
8178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8179$as_echo_n "checking for $ac_word... " >&6; }
8180if ${ac_cv_path_MV+:} false; then :
8181  $as_echo_n "(cached) " >&6
8182else
8183  case $MV in
8184  [\\/]* | ?:[\\/]*)
8185  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8186  ;;
8187  *)
8188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8189for as_dir in $PATH
8190do
8191  IFS=$as_save_IFS
8192  test -z "$as_dir" && as_dir=.
8193    for ac_exec_ext in '' $ac_executable_extensions; do
8194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8195    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8197    break 2
8198  fi
8199done
8200  done
8201IFS=$as_save_IFS
8202
8203  ;;
8204esac
8205fi
8206MV=$ac_cv_path_MV
8207if test -n "$MV"; then
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8209$as_echo "$MV" >&6; }
8210else
8211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212$as_echo "no" >&6; }
8213fi
8214
8215
8216  test -n "$MV" && break
8217done
8218
8219  else
8220    # The variable is set, but is it from the command line or the environment?
8221
8222    # Try to remove the string !MV! from our list.
8223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8225      # If it failed, the variable was not from the command line. Ignore it,
8226      # but warn the user (except for BASH, which is always set by the calling BASH).
8227      if test "xMV" != xBASH; then
8228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8229$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8230      fi
8231      # Try to locate tool using the code snippet
8232      for ac_prog in mv
8233do
8234  # Extract the first word of "$ac_prog", so it can be a program name with args.
8235set dummy $ac_prog; ac_word=$2
8236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8237$as_echo_n "checking for $ac_word... " >&6; }
8238if ${ac_cv_path_MV+:} false; then :
8239  $as_echo_n "(cached) " >&6
8240else
8241  case $MV in
8242  [\\/]* | ?:[\\/]*)
8243  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8244  ;;
8245  *)
8246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247for as_dir in $PATH
8248do
8249  IFS=$as_save_IFS
8250  test -z "$as_dir" && as_dir=.
8251    for ac_exec_ext in '' $ac_executable_extensions; do
8252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8253    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8255    break 2
8256  fi
8257done
8258  done
8259IFS=$as_save_IFS
8260
8261  ;;
8262esac
8263fi
8264MV=$ac_cv_path_MV
8265if test -n "$MV"; then
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8267$as_echo "$MV" >&6; }
8268else
8269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8270$as_echo "no" >&6; }
8271fi
8272
8273
8274  test -n "$MV" && break
8275done
8276
8277    else
8278      # If it succeeded, then it was overridden by the user. We will use it
8279      # for the tool.
8280
8281      # First remove it from the list of overridden variables, so we can test
8282      # for unknown variables in the end.
8283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8284
8285      # Check if the provided tool contains a complete path.
8286      tool_specified="$MV"
8287      tool_basename="${tool_specified##*/}"
8288      if test "x$tool_basename" = "x$tool_specified"; then
8289        # A command without a complete path is provided, search $PATH.
8290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8291$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8292        # Extract the first word of "$tool_basename", so it can be a program name with args.
8293set dummy $tool_basename; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_MV+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $MV in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322MV=$ac_cv_path_MV
8323if test -n "$MV"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8325$as_echo "$MV" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332        if test "x$MV" = x; then
8333          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8334        fi
8335      else
8336        # Otherwise we believe it is a complete path. Use it as it is.
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8338$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8340$as_echo_n "checking for MV... " >&6; }
8341        if test ! -x "$tool_specified"; then
8342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8343$as_echo "not found" >&6; }
8344          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8345        fi
8346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8347$as_echo "$tool_specified" >&6; }
8348      fi
8349    fi
8350  fi
8351
8352
8353
8354  if test "x$MV" = x; then
8355    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8356  fi
8357
8358
8359
8360
8361
8362  # Publish this variable in the help.
8363
8364
8365  if test "x$NAWK" = x; then
8366    # The variable is not set by user, try to locate tool using the code snippet
8367    for ac_prog in nawk gawk awk
8368do
8369  # Extract the first word of "$ac_prog", so it can be a program name with args.
8370set dummy $ac_prog; ac_word=$2
8371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8372$as_echo_n "checking for $ac_word... " >&6; }
8373if ${ac_cv_path_NAWK+:} false; then :
8374  $as_echo_n "(cached) " >&6
8375else
8376  case $NAWK in
8377  [\\/]* | ?:[\\/]*)
8378  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8379  ;;
8380  *)
8381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8382for as_dir in $PATH
8383do
8384  IFS=$as_save_IFS
8385  test -z "$as_dir" && as_dir=.
8386    for ac_exec_ext in '' $ac_executable_extensions; do
8387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8388    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8390    break 2
8391  fi
8392done
8393  done
8394IFS=$as_save_IFS
8395
8396  ;;
8397esac
8398fi
8399NAWK=$ac_cv_path_NAWK
8400if test -n "$NAWK"; then
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8402$as_echo "$NAWK" >&6; }
8403else
8404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8405$as_echo "no" >&6; }
8406fi
8407
8408
8409  test -n "$NAWK" && break
8410done
8411
8412  else
8413    # The variable is set, but is it from the command line or the environment?
8414
8415    # Try to remove the string !NAWK! from our list.
8416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8418      # If it failed, the variable was not from the command line. Ignore it,
8419      # but warn the user (except for BASH, which is always set by the calling BASH).
8420      if test "xNAWK" != xBASH; then
8421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8422$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8423      fi
8424      # Try to locate tool using the code snippet
8425      for ac_prog in nawk gawk awk
8426do
8427  # Extract the first word of "$ac_prog", so it can be a program name with args.
8428set dummy $ac_prog; ac_word=$2
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8430$as_echo_n "checking for $ac_word... " >&6; }
8431if ${ac_cv_path_NAWK+:} false; then :
8432  $as_echo_n "(cached) " >&6
8433else
8434  case $NAWK in
8435  [\\/]* | ?:[\\/]*)
8436  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8437  ;;
8438  *)
8439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8440for as_dir in $PATH
8441do
8442  IFS=$as_save_IFS
8443  test -z "$as_dir" && as_dir=.
8444    for ac_exec_ext in '' $ac_executable_extensions; do
8445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8446    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8448    break 2
8449  fi
8450done
8451  done
8452IFS=$as_save_IFS
8453
8454  ;;
8455esac
8456fi
8457NAWK=$ac_cv_path_NAWK
8458if test -n "$NAWK"; then
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8460$as_echo "$NAWK" >&6; }
8461else
8462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8463$as_echo "no" >&6; }
8464fi
8465
8466
8467  test -n "$NAWK" && break
8468done
8469
8470    else
8471      # If it succeeded, then it was overridden by the user. We will use it
8472      # for the tool.
8473
8474      # First remove it from the list of overridden variables, so we can test
8475      # for unknown variables in the end.
8476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8477
8478      # Check if the provided tool contains a complete path.
8479      tool_specified="$NAWK"
8480      tool_basename="${tool_specified##*/}"
8481      if test "x$tool_basename" = "x$tool_specified"; then
8482        # A command without a complete path is provided, search $PATH.
8483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8484$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8485        # Extract the first word of "$tool_basename", so it can be a program name with args.
8486set dummy $tool_basename; ac_word=$2
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488$as_echo_n "checking for $ac_word... " >&6; }
8489if ${ac_cv_path_NAWK+:} false; then :
8490  $as_echo_n "(cached) " >&6
8491else
8492  case $NAWK in
8493  [\\/]* | ?:[\\/]*)
8494  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8495  ;;
8496  *)
8497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500  IFS=$as_save_IFS
8501  test -z "$as_dir" && as_dir=.
8502    for ac_exec_ext in '' $ac_executable_extensions; do
8503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8504    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8506    break 2
8507  fi
8508done
8509  done
8510IFS=$as_save_IFS
8511
8512  ;;
8513esac
8514fi
8515NAWK=$ac_cv_path_NAWK
8516if test -n "$NAWK"; then
8517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8518$as_echo "$NAWK" >&6; }
8519else
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521$as_echo "no" >&6; }
8522fi
8523
8524
8525        if test "x$NAWK" = x; then
8526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8527        fi
8528      else
8529        # Otherwise we believe it is a complete path. Use it as it is.
8530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8531$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8533$as_echo_n "checking for NAWK... " >&6; }
8534        if test ! -x "$tool_specified"; then
8535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8536$as_echo "not found" >&6; }
8537          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8538        fi
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8540$as_echo "$tool_specified" >&6; }
8541      fi
8542    fi
8543  fi
8544
8545
8546
8547  if test "x$NAWK" = x; then
8548    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8549  fi
8550
8551
8552
8553
8554
8555  # Publish this variable in the help.
8556
8557
8558  if test "x$PRINTF" = x; then
8559    # The variable is not set by user, try to locate tool using the code snippet
8560    for ac_prog in printf
8561do
8562  # Extract the first word of "$ac_prog", so it can be a program name with args.
8563set dummy $ac_prog; ac_word=$2
8564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8565$as_echo_n "checking for $ac_word... " >&6; }
8566if ${ac_cv_path_PRINTF+:} false; then :
8567  $as_echo_n "(cached) " >&6
8568else
8569  case $PRINTF in
8570  [\\/]* | ?:[\\/]*)
8571  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8572  ;;
8573  *)
8574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8575for as_dir in $PATH
8576do
8577  IFS=$as_save_IFS
8578  test -z "$as_dir" && as_dir=.
8579    for ac_exec_ext in '' $ac_executable_extensions; do
8580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8581    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8583    break 2
8584  fi
8585done
8586  done
8587IFS=$as_save_IFS
8588
8589  ;;
8590esac
8591fi
8592PRINTF=$ac_cv_path_PRINTF
8593if test -n "$PRINTF"; then
8594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8595$as_echo "$PRINTF" >&6; }
8596else
8597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8598$as_echo "no" >&6; }
8599fi
8600
8601
8602  test -n "$PRINTF" && break
8603done
8604
8605  else
8606    # The variable is set, but is it from the command line or the environment?
8607
8608    # Try to remove the string !PRINTF! from our list.
8609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8611      # If it failed, the variable was not from the command line. Ignore it,
8612      # but warn the user (except for BASH, which is always set by the calling BASH).
8613      if test "xPRINTF" != xBASH; then
8614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8615$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8616      fi
8617      # Try to locate tool using the code snippet
8618      for ac_prog in printf
8619do
8620  # Extract the first word of "$ac_prog", so it can be a program name with args.
8621set dummy $ac_prog; ac_word=$2
8622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8623$as_echo_n "checking for $ac_word... " >&6; }
8624if ${ac_cv_path_PRINTF+:} false; then :
8625  $as_echo_n "(cached) " >&6
8626else
8627  case $PRINTF in
8628  [\\/]* | ?:[\\/]*)
8629  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8630  ;;
8631  *)
8632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8633for as_dir in $PATH
8634do
8635  IFS=$as_save_IFS
8636  test -z "$as_dir" && as_dir=.
8637    for ac_exec_ext in '' $ac_executable_extensions; do
8638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8639    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8641    break 2
8642  fi
8643done
8644  done
8645IFS=$as_save_IFS
8646
8647  ;;
8648esac
8649fi
8650PRINTF=$ac_cv_path_PRINTF
8651if test -n "$PRINTF"; then
8652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8653$as_echo "$PRINTF" >&6; }
8654else
8655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8656$as_echo "no" >&6; }
8657fi
8658
8659
8660  test -n "$PRINTF" && break
8661done
8662
8663    else
8664      # If it succeeded, then it was overridden by the user. We will use it
8665      # for the tool.
8666
8667      # First remove it from the list of overridden variables, so we can test
8668      # for unknown variables in the end.
8669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8670
8671      # Check if the provided tool contains a complete path.
8672      tool_specified="$PRINTF"
8673      tool_basename="${tool_specified##*/}"
8674      if test "x$tool_basename" = "x$tool_specified"; then
8675        # A command without a complete path is provided, search $PATH.
8676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8677$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8678        # Extract the first word of "$tool_basename", so it can be a program name with args.
8679set dummy $tool_basename; ac_word=$2
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8681$as_echo_n "checking for $ac_word... " >&6; }
8682if ${ac_cv_path_PRINTF+:} false; then :
8683  $as_echo_n "(cached) " >&6
8684else
8685  case $PRINTF in
8686  [\\/]* | ?:[\\/]*)
8687  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8688  ;;
8689  *)
8690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691for as_dir in $PATH
8692do
8693  IFS=$as_save_IFS
8694  test -z "$as_dir" && as_dir=.
8695    for ac_exec_ext in '' $ac_executable_extensions; do
8696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8697    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8699    break 2
8700  fi
8701done
8702  done
8703IFS=$as_save_IFS
8704
8705  ;;
8706esac
8707fi
8708PRINTF=$ac_cv_path_PRINTF
8709if test -n "$PRINTF"; then
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8711$as_echo "$PRINTF" >&6; }
8712else
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715fi
8716
8717
8718        if test "x$PRINTF" = x; then
8719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8720        fi
8721      else
8722        # Otherwise we believe it is a complete path. Use it as it is.
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8724$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8726$as_echo_n "checking for PRINTF... " >&6; }
8727        if test ! -x "$tool_specified"; then
8728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8729$as_echo "not found" >&6; }
8730          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8731        fi
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8733$as_echo "$tool_specified" >&6; }
8734      fi
8735    fi
8736  fi
8737
8738
8739
8740  if test "x$PRINTF" = x; then
8741    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8742  fi
8743
8744
8745
8746
8747
8748  # Publish this variable in the help.
8749
8750
8751  if test "x$RM" = x; then
8752    # The variable is not set by user, try to locate tool using the code snippet
8753    for ac_prog in rm
8754do
8755  # Extract the first word of "$ac_prog", so it can be a program name with args.
8756set dummy $ac_prog; ac_word=$2
8757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8758$as_echo_n "checking for $ac_word... " >&6; }
8759if ${ac_cv_path_RM+:} false; then :
8760  $as_echo_n "(cached) " >&6
8761else
8762  case $RM in
8763  [\\/]* | ?:[\\/]*)
8764  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8765  ;;
8766  *)
8767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8768for as_dir in $PATH
8769do
8770  IFS=$as_save_IFS
8771  test -z "$as_dir" && as_dir=.
8772    for ac_exec_ext in '' $ac_executable_extensions; do
8773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8774    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8776    break 2
8777  fi
8778done
8779  done
8780IFS=$as_save_IFS
8781
8782  ;;
8783esac
8784fi
8785RM=$ac_cv_path_RM
8786if test -n "$RM"; then
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8788$as_echo "$RM" >&6; }
8789else
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8791$as_echo "no" >&6; }
8792fi
8793
8794
8795  test -n "$RM" && break
8796done
8797
8798  else
8799    # The variable is set, but is it from the command line or the environment?
8800
8801    # Try to remove the string !RM! from our list.
8802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8804      # If it failed, the variable was not from the command line. Ignore it,
8805      # but warn the user (except for BASH, which is always set by the calling BASH).
8806      if test "xRM" != xBASH; then
8807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8808$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8809      fi
8810      # Try to locate tool using the code snippet
8811      for ac_prog in rm
8812do
8813  # Extract the first word of "$ac_prog", so it can be a program name with args.
8814set dummy $ac_prog; ac_word=$2
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8816$as_echo_n "checking for $ac_word... " >&6; }
8817if ${ac_cv_path_RM+:} false; then :
8818  $as_echo_n "(cached) " >&6
8819else
8820  case $RM in
8821  [\\/]* | ?:[\\/]*)
8822  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8823  ;;
8824  *)
8825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826for as_dir in $PATH
8827do
8828  IFS=$as_save_IFS
8829  test -z "$as_dir" && as_dir=.
8830    for ac_exec_ext in '' $ac_executable_extensions; do
8831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8832    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8834    break 2
8835  fi
8836done
8837  done
8838IFS=$as_save_IFS
8839
8840  ;;
8841esac
8842fi
8843RM=$ac_cv_path_RM
8844if test -n "$RM"; then
8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8846$as_echo "$RM" >&6; }
8847else
8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
8850fi
8851
8852
8853  test -n "$RM" && break
8854done
8855
8856    else
8857      # If it succeeded, then it was overridden by the user. We will use it
8858      # for the tool.
8859
8860      # First remove it from the list of overridden variables, so we can test
8861      # for unknown variables in the end.
8862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8863
8864      # Check if the provided tool contains a complete path.
8865      tool_specified="$RM"
8866      tool_basename="${tool_specified##*/}"
8867      if test "x$tool_basename" = "x$tool_specified"; then
8868        # A command without a complete path is provided, search $PATH.
8869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8870$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8871        # Extract the first word of "$tool_basename", so it can be a program name with args.
8872set dummy $tool_basename; ac_word=$2
8873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874$as_echo_n "checking for $ac_word... " >&6; }
8875if ${ac_cv_path_RM+:} false; then :
8876  $as_echo_n "(cached) " >&6
8877else
8878  case $RM in
8879  [\\/]* | ?:[\\/]*)
8880  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8881  ;;
8882  *)
8883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884for as_dir in $PATH
8885do
8886  IFS=$as_save_IFS
8887  test -z "$as_dir" && as_dir=.
8888    for ac_exec_ext in '' $ac_executable_extensions; do
8889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892    break 2
8893  fi
8894done
8895  done
8896IFS=$as_save_IFS
8897
8898  ;;
8899esac
8900fi
8901RM=$ac_cv_path_RM
8902if test -n "$RM"; then
8903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8904$as_echo "$RM" >&6; }
8905else
8906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
8908fi
8909
8910
8911        if test "x$RM" = x; then
8912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8913        fi
8914      else
8915        # Otherwise we believe it is a complete path. Use it as it is.
8916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8917$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8919$as_echo_n "checking for RM... " >&6; }
8920        if test ! -x "$tool_specified"; then
8921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8922$as_echo "not found" >&6; }
8923          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8924        fi
8925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8926$as_echo "$tool_specified" >&6; }
8927      fi
8928    fi
8929  fi
8930
8931
8932
8933  if test "x$RM" = x; then
8934    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8935  fi
8936
8937
8938
8939
8940
8941  # Publish this variable in the help.
8942
8943
8944  if test "x$SH" = x; then
8945    # The variable is not set by user, try to locate tool using the code snippet
8946    for ac_prog in sh
8947do
8948  # Extract the first word of "$ac_prog", so it can be a program name with args.
8949set dummy $ac_prog; ac_word=$2
8950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8951$as_echo_n "checking for $ac_word... " >&6; }
8952if ${ac_cv_path_SH+:} false; then :
8953  $as_echo_n "(cached) " >&6
8954else
8955  case $SH in
8956  [\\/]* | ?:[\\/]*)
8957  ac_cv_path_SH="$SH" # Let the user override the test with a path.
8958  ;;
8959  *)
8960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8961for as_dir in $PATH
8962do
8963  IFS=$as_save_IFS
8964  test -z "$as_dir" && as_dir=.
8965    for ac_exec_ext in '' $ac_executable_extensions; do
8966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8967    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
8968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8969    break 2
8970  fi
8971done
8972  done
8973IFS=$as_save_IFS
8974
8975  ;;
8976esac
8977fi
8978SH=$ac_cv_path_SH
8979if test -n "$SH"; then
8980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
8981$as_echo "$SH" >&6; }
8982else
8983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8984$as_echo "no" >&6; }
8985fi
8986
8987
8988  test -n "$SH" && break
8989done
8990
8991  else
8992    # The variable is set, but is it from the command line or the environment?
8993
8994    # Try to remove the string !SH! from our list.
8995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
8996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8997      # If it failed, the variable was not from the command line. Ignore it,
8998      # but warn the user (except for BASH, which is always set by the calling BASH).
8999      if test "xSH" != xBASH; then
9000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9001$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9002      fi
9003      # Try to locate tool using the code snippet
9004      for ac_prog in sh
9005do
9006  # Extract the first word of "$ac_prog", so it can be a program name with args.
9007set dummy $ac_prog; ac_word=$2
9008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9009$as_echo_n "checking for $ac_word... " >&6; }
9010if ${ac_cv_path_SH+:} false; then :
9011  $as_echo_n "(cached) " >&6
9012else
9013  case $SH in
9014  [\\/]* | ?:[\\/]*)
9015  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9016  ;;
9017  *)
9018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9019for as_dir in $PATH
9020do
9021  IFS=$as_save_IFS
9022  test -z "$as_dir" && as_dir=.
9023    for ac_exec_ext in '' $ac_executable_extensions; do
9024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9025    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9027    break 2
9028  fi
9029done
9030  done
9031IFS=$as_save_IFS
9032
9033  ;;
9034esac
9035fi
9036SH=$ac_cv_path_SH
9037if test -n "$SH"; then
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9039$as_echo "$SH" >&6; }
9040else
9041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9042$as_echo "no" >&6; }
9043fi
9044
9045
9046  test -n "$SH" && break
9047done
9048
9049    else
9050      # If it succeeded, then it was overridden by the user. We will use it
9051      # for the tool.
9052
9053      # First remove it from the list of overridden variables, so we can test
9054      # for unknown variables in the end.
9055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9056
9057      # Check if the provided tool contains a complete path.
9058      tool_specified="$SH"
9059      tool_basename="${tool_specified##*/}"
9060      if test "x$tool_basename" = "x$tool_specified"; then
9061        # A command without a complete path is provided, search $PATH.
9062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9063$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9064        # Extract the first word of "$tool_basename", so it can be a program name with args.
9065set dummy $tool_basename; ac_word=$2
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067$as_echo_n "checking for $ac_word... " >&6; }
9068if ${ac_cv_path_SH+:} false; then :
9069  $as_echo_n "(cached) " >&6
9070else
9071  case $SH in
9072  [\\/]* | ?:[\\/]*)
9073  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9074  ;;
9075  *)
9076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077for as_dir in $PATH
9078do
9079  IFS=$as_save_IFS
9080  test -z "$as_dir" && as_dir=.
9081    for ac_exec_ext in '' $ac_executable_extensions; do
9082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085    break 2
9086  fi
9087done
9088  done
9089IFS=$as_save_IFS
9090
9091  ;;
9092esac
9093fi
9094SH=$ac_cv_path_SH
9095if test -n "$SH"; then
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9097$as_echo "$SH" >&6; }
9098else
9099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100$as_echo "no" >&6; }
9101fi
9102
9103
9104        if test "x$SH" = x; then
9105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9106        fi
9107      else
9108        # Otherwise we believe it is a complete path. Use it as it is.
9109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9110$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9112$as_echo_n "checking for SH... " >&6; }
9113        if test ! -x "$tool_specified"; then
9114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9115$as_echo "not found" >&6; }
9116          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9117        fi
9118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9119$as_echo "$tool_specified" >&6; }
9120      fi
9121    fi
9122  fi
9123
9124
9125
9126  if test "x$SH" = x; then
9127    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9128  fi
9129
9130
9131
9132
9133
9134  # Publish this variable in the help.
9135
9136
9137  if test "x$SORT" = x; then
9138    # The variable is not set by user, try to locate tool using the code snippet
9139    for ac_prog in sort
9140do
9141  # Extract the first word of "$ac_prog", so it can be a program name with args.
9142set dummy $ac_prog; ac_word=$2
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9144$as_echo_n "checking for $ac_word... " >&6; }
9145if ${ac_cv_path_SORT+:} false; then :
9146  $as_echo_n "(cached) " >&6
9147else
9148  case $SORT in
9149  [\\/]* | ?:[\\/]*)
9150  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9151  ;;
9152  *)
9153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9154for as_dir in $PATH
9155do
9156  IFS=$as_save_IFS
9157  test -z "$as_dir" && as_dir=.
9158    for ac_exec_ext in '' $ac_executable_extensions; do
9159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9160    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9162    break 2
9163  fi
9164done
9165  done
9166IFS=$as_save_IFS
9167
9168  ;;
9169esac
9170fi
9171SORT=$ac_cv_path_SORT
9172if test -n "$SORT"; then
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9174$as_echo "$SORT" >&6; }
9175else
9176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9177$as_echo "no" >&6; }
9178fi
9179
9180
9181  test -n "$SORT" && break
9182done
9183
9184  else
9185    # The variable is set, but is it from the command line or the environment?
9186
9187    # Try to remove the string !SORT! from our list.
9188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9190      # If it failed, the variable was not from the command line. Ignore it,
9191      # but warn the user (except for BASH, which is always set by the calling BASH).
9192      if test "xSORT" != xBASH; then
9193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9194$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9195      fi
9196      # Try to locate tool using the code snippet
9197      for ac_prog in sort
9198do
9199  # Extract the first word of "$ac_prog", so it can be a program name with args.
9200set dummy $ac_prog; ac_word=$2
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9202$as_echo_n "checking for $ac_word... " >&6; }
9203if ${ac_cv_path_SORT+:} false; then :
9204  $as_echo_n "(cached) " >&6
9205else
9206  case $SORT in
9207  [\\/]* | ?:[\\/]*)
9208  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9209  ;;
9210  *)
9211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9212for as_dir in $PATH
9213do
9214  IFS=$as_save_IFS
9215  test -z "$as_dir" && as_dir=.
9216    for ac_exec_ext in '' $ac_executable_extensions; do
9217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9218    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9220    break 2
9221  fi
9222done
9223  done
9224IFS=$as_save_IFS
9225
9226  ;;
9227esac
9228fi
9229SORT=$ac_cv_path_SORT
9230if test -n "$SORT"; then
9231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9232$as_echo "$SORT" >&6; }
9233else
9234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9235$as_echo "no" >&6; }
9236fi
9237
9238
9239  test -n "$SORT" && break
9240done
9241
9242    else
9243      # If it succeeded, then it was overridden by the user. We will use it
9244      # for the tool.
9245
9246      # First remove it from the list of overridden variables, so we can test
9247      # for unknown variables in the end.
9248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9249
9250      # Check if the provided tool contains a complete path.
9251      tool_specified="$SORT"
9252      tool_basename="${tool_specified##*/}"
9253      if test "x$tool_basename" = "x$tool_specified"; then
9254        # A command without a complete path is provided, search $PATH.
9255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9256$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9257        # Extract the first word of "$tool_basename", so it can be a program name with args.
9258set dummy $tool_basename; ac_word=$2
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9260$as_echo_n "checking for $ac_word... " >&6; }
9261if ${ac_cv_path_SORT+:} false; then :
9262  $as_echo_n "(cached) " >&6
9263else
9264  case $SORT in
9265  [\\/]* | ?:[\\/]*)
9266  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9267  ;;
9268  *)
9269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9270for as_dir in $PATH
9271do
9272  IFS=$as_save_IFS
9273  test -z "$as_dir" && as_dir=.
9274    for ac_exec_ext in '' $ac_executable_extensions; do
9275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9276    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9278    break 2
9279  fi
9280done
9281  done
9282IFS=$as_save_IFS
9283
9284  ;;
9285esac
9286fi
9287SORT=$ac_cv_path_SORT
9288if test -n "$SORT"; then
9289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9290$as_echo "$SORT" >&6; }
9291else
9292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9293$as_echo "no" >&6; }
9294fi
9295
9296
9297        if test "x$SORT" = x; then
9298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9299        fi
9300      else
9301        # Otherwise we believe it is a complete path. Use it as it is.
9302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9303$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9305$as_echo_n "checking for SORT... " >&6; }
9306        if test ! -x "$tool_specified"; then
9307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9308$as_echo "not found" >&6; }
9309          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9310        fi
9311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9312$as_echo "$tool_specified" >&6; }
9313      fi
9314    fi
9315  fi
9316
9317
9318
9319  if test "x$SORT" = x; then
9320    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9321  fi
9322
9323
9324
9325
9326
9327  # Publish this variable in the help.
9328
9329
9330  if test "x$TAIL" = x; then
9331    # The variable is not set by user, try to locate tool using the code snippet
9332    for ac_prog in tail
9333do
9334  # Extract the first word of "$ac_prog", so it can be a program name with args.
9335set dummy $ac_prog; ac_word=$2
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9337$as_echo_n "checking for $ac_word... " >&6; }
9338if ${ac_cv_path_TAIL+:} false; then :
9339  $as_echo_n "(cached) " >&6
9340else
9341  case $TAIL in
9342  [\\/]* | ?:[\\/]*)
9343  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9344  ;;
9345  *)
9346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9347for as_dir in $PATH
9348do
9349  IFS=$as_save_IFS
9350  test -z "$as_dir" && as_dir=.
9351    for ac_exec_ext in '' $ac_executable_extensions; do
9352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9353    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9355    break 2
9356  fi
9357done
9358  done
9359IFS=$as_save_IFS
9360
9361  ;;
9362esac
9363fi
9364TAIL=$ac_cv_path_TAIL
9365if test -n "$TAIL"; then
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9367$as_echo "$TAIL" >&6; }
9368else
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9370$as_echo "no" >&6; }
9371fi
9372
9373
9374  test -n "$TAIL" && break
9375done
9376
9377  else
9378    # The variable is set, but is it from the command line or the environment?
9379
9380    # Try to remove the string !TAIL! from our list.
9381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9383      # If it failed, the variable was not from the command line. Ignore it,
9384      # but warn the user (except for BASH, which is always set by the calling BASH).
9385      if test "xTAIL" != xBASH; then
9386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9387$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9388      fi
9389      # Try to locate tool using the code snippet
9390      for ac_prog in tail
9391do
9392  # Extract the first word of "$ac_prog", so it can be a program name with args.
9393set dummy $ac_prog; ac_word=$2
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9395$as_echo_n "checking for $ac_word... " >&6; }
9396if ${ac_cv_path_TAIL+:} false; then :
9397  $as_echo_n "(cached) " >&6
9398else
9399  case $TAIL in
9400  [\\/]* | ?:[\\/]*)
9401  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9402  ;;
9403  *)
9404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9405for as_dir in $PATH
9406do
9407  IFS=$as_save_IFS
9408  test -z "$as_dir" && as_dir=.
9409    for ac_exec_ext in '' $ac_executable_extensions; do
9410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9411    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9413    break 2
9414  fi
9415done
9416  done
9417IFS=$as_save_IFS
9418
9419  ;;
9420esac
9421fi
9422TAIL=$ac_cv_path_TAIL
9423if test -n "$TAIL"; then
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9425$as_echo "$TAIL" >&6; }
9426else
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
9429fi
9430
9431
9432  test -n "$TAIL" && break
9433done
9434
9435    else
9436      # If it succeeded, then it was overridden by the user. We will use it
9437      # for the tool.
9438
9439      # First remove it from the list of overridden variables, so we can test
9440      # for unknown variables in the end.
9441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9442
9443      # Check if the provided tool contains a complete path.
9444      tool_specified="$TAIL"
9445      tool_basename="${tool_specified##*/}"
9446      if test "x$tool_basename" = "x$tool_specified"; then
9447        # A command without a complete path is provided, search $PATH.
9448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9449$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9450        # Extract the first word of "$tool_basename", so it can be a program name with args.
9451set dummy $tool_basename; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_TAIL+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $TAIL in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480TAIL=$ac_cv_path_TAIL
9481if test -n "$TAIL"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9483$as_echo "$TAIL" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490        if test "x$TAIL" = x; then
9491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9492        fi
9493      else
9494        # Otherwise we believe it is a complete path. Use it as it is.
9495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9496$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9498$as_echo_n "checking for TAIL... " >&6; }
9499        if test ! -x "$tool_specified"; then
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9501$as_echo "not found" >&6; }
9502          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9503        fi
9504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9505$as_echo "$tool_specified" >&6; }
9506      fi
9507    fi
9508  fi
9509
9510
9511
9512  if test "x$TAIL" = x; then
9513    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9514  fi
9515
9516
9517
9518
9519
9520  # Publish this variable in the help.
9521
9522
9523  if test "x$TAR" = x; then
9524    # The variable is not set by user, try to locate tool using the code snippet
9525    for ac_prog in tar
9526do
9527  # Extract the first word of "$ac_prog", so it can be a program name with args.
9528set dummy $ac_prog; ac_word=$2
9529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9530$as_echo_n "checking for $ac_word... " >&6; }
9531if ${ac_cv_path_TAR+:} false; then :
9532  $as_echo_n "(cached) " >&6
9533else
9534  case $TAR in
9535  [\\/]* | ?:[\\/]*)
9536  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9537  ;;
9538  *)
9539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9540for as_dir in $PATH
9541do
9542  IFS=$as_save_IFS
9543  test -z "$as_dir" && as_dir=.
9544    for ac_exec_ext in '' $ac_executable_extensions; do
9545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9546    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9548    break 2
9549  fi
9550done
9551  done
9552IFS=$as_save_IFS
9553
9554  ;;
9555esac
9556fi
9557TAR=$ac_cv_path_TAR
9558if test -n "$TAR"; then
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9560$as_echo "$TAR" >&6; }
9561else
9562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9563$as_echo "no" >&6; }
9564fi
9565
9566
9567  test -n "$TAR" && break
9568done
9569
9570  else
9571    # The variable is set, but is it from the command line or the environment?
9572
9573    # Try to remove the string !TAR! from our list.
9574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9576      # If it failed, the variable was not from the command line. Ignore it,
9577      # but warn the user (except for BASH, which is always set by the calling BASH).
9578      if test "xTAR" != xBASH; then
9579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9580$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9581      fi
9582      # Try to locate tool using the code snippet
9583      for ac_prog in tar
9584do
9585  # Extract the first word of "$ac_prog", so it can be a program name with args.
9586set dummy $ac_prog; ac_word=$2
9587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9588$as_echo_n "checking for $ac_word... " >&6; }
9589if ${ac_cv_path_TAR+:} false; then :
9590  $as_echo_n "(cached) " >&6
9591else
9592  case $TAR in
9593  [\\/]* | ?:[\\/]*)
9594  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9595  ;;
9596  *)
9597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9598for as_dir in $PATH
9599do
9600  IFS=$as_save_IFS
9601  test -z "$as_dir" && as_dir=.
9602    for ac_exec_ext in '' $ac_executable_extensions; do
9603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9604    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9606    break 2
9607  fi
9608done
9609  done
9610IFS=$as_save_IFS
9611
9612  ;;
9613esac
9614fi
9615TAR=$ac_cv_path_TAR
9616if test -n "$TAR"; then
9617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9618$as_echo "$TAR" >&6; }
9619else
9620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9621$as_echo "no" >&6; }
9622fi
9623
9624
9625  test -n "$TAR" && break
9626done
9627
9628    else
9629      # If it succeeded, then it was overridden by the user. We will use it
9630      # for the tool.
9631
9632      # First remove it from the list of overridden variables, so we can test
9633      # for unknown variables in the end.
9634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9635
9636      # Check if the provided tool contains a complete path.
9637      tool_specified="$TAR"
9638      tool_basename="${tool_specified##*/}"
9639      if test "x$tool_basename" = "x$tool_specified"; then
9640        # A command without a complete path is provided, search $PATH.
9641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9642$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9643        # Extract the first word of "$tool_basename", so it can be a program name with args.
9644set dummy $tool_basename; ac_word=$2
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646$as_echo_n "checking for $ac_word... " >&6; }
9647if ${ac_cv_path_TAR+:} false; then :
9648  $as_echo_n "(cached) " >&6
9649else
9650  case $TAR in
9651  [\\/]* | ?:[\\/]*)
9652  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9653  ;;
9654  *)
9655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9656for as_dir in $PATH
9657do
9658  IFS=$as_save_IFS
9659  test -z "$as_dir" && as_dir=.
9660    for ac_exec_ext in '' $ac_executable_extensions; do
9661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9662    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9664    break 2
9665  fi
9666done
9667  done
9668IFS=$as_save_IFS
9669
9670  ;;
9671esac
9672fi
9673TAR=$ac_cv_path_TAR
9674if test -n "$TAR"; then
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9676$as_echo "$TAR" >&6; }
9677else
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679$as_echo "no" >&6; }
9680fi
9681
9682
9683        if test "x$TAR" = x; then
9684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9685        fi
9686      else
9687        # Otherwise we believe it is a complete path. Use it as it is.
9688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9689$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9691$as_echo_n "checking for TAR... " >&6; }
9692        if test ! -x "$tool_specified"; then
9693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9694$as_echo "not found" >&6; }
9695          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9696        fi
9697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9698$as_echo "$tool_specified" >&6; }
9699      fi
9700    fi
9701  fi
9702
9703
9704
9705  if test "x$TAR" = x; then
9706    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9707  fi
9708
9709
9710
9711
9712
9713  # Publish this variable in the help.
9714
9715
9716  if test "x$TEE" = x; then
9717    # The variable is not set by user, try to locate tool using the code snippet
9718    for ac_prog in tee
9719do
9720  # Extract the first word of "$ac_prog", so it can be a program name with args.
9721set dummy $ac_prog; ac_word=$2
9722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9723$as_echo_n "checking for $ac_word... " >&6; }
9724if ${ac_cv_path_TEE+:} false; then :
9725  $as_echo_n "(cached) " >&6
9726else
9727  case $TEE in
9728  [\\/]* | ?:[\\/]*)
9729  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9730  ;;
9731  *)
9732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9733for as_dir in $PATH
9734do
9735  IFS=$as_save_IFS
9736  test -z "$as_dir" && as_dir=.
9737    for ac_exec_ext in '' $ac_executable_extensions; do
9738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9739    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9741    break 2
9742  fi
9743done
9744  done
9745IFS=$as_save_IFS
9746
9747  ;;
9748esac
9749fi
9750TEE=$ac_cv_path_TEE
9751if test -n "$TEE"; then
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9753$as_echo "$TEE" >&6; }
9754else
9755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9756$as_echo "no" >&6; }
9757fi
9758
9759
9760  test -n "$TEE" && break
9761done
9762
9763  else
9764    # The variable is set, but is it from the command line or the environment?
9765
9766    # Try to remove the string !TEE! from our list.
9767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9769      # If it failed, the variable was not from the command line. Ignore it,
9770      # but warn the user (except for BASH, which is always set by the calling BASH).
9771      if test "xTEE" != xBASH; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9773$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9774      fi
9775      # Try to locate tool using the code snippet
9776      for ac_prog in tee
9777do
9778  # Extract the first word of "$ac_prog", so it can be a program name with args.
9779set dummy $ac_prog; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_TEE+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $TEE in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808TEE=$ac_cv_path_TEE
9809if test -n "$TEE"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9811$as_echo "$TEE" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818  test -n "$TEE" && break
9819done
9820
9821    else
9822      # If it succeeded, then it was overridden by the user. We will use it
9823      # for the tool.
9824
9825      # First remove it from the list of overridden variables, so we can test
9826      # for unknown variables in the end.
9827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9828
9829      # Check if the provided tool contains a complete path.
9830      tool_specified="$TEE"
9831      tool_basename="${tool_specified##*/}"
9832      if test "x$tool_basename" = "x$tool_specified"; then
9833        # A command without a complete path is provided, search $PATH.
9834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9835$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9836        # Extract the first word of "$tool_basename", so it can be a program name with args.
9837set dummy $tool_basename; ac_word=$2
9838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9839$as_echo_n "checking for $ac_word... " >&6; }
9840if ${ac_cv_path_TEE+:} false; then :
9841  $as_echo_n "(cached) " >&6
9842else
9843  case $TEE in
9844  [\\/]* | ?:[\\/]*)
9845  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9846  ;;
9847  *)
9848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849for as_dir in $PATH
9850do
9851  IFS=$as_save_IFS
9852  test -z "$as_dir" && as_dir=.
9853    for ac_exec_ext in '' $ac_executable_extensions; do
9854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857    break 2
9858  fi
9859done
9860  done
9861IFS=$as_save_IFS
9862
9863  ;;
9864esac
9865fi
9866TEE=$ac_cv_path_TEE
9867if test -n "$TEE"; then
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9869$as_echo "$TEE" >&6; }
9870else
9871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872$as_echo "no" >&6; }
9873fi
9874
9875
9876        if test "x$TEE" = x; then
9877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9878        fi
9879      else
9880        # Otherwise we believe it is a complete path. Use it as it is.
9881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9882$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9884$as_echo_n "checking for TEE... " >&6; }
9885        if test ! -x "$tool_specified"; then
9886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9887$as_echo "not found" >&6; }
9888          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9889        fi
9890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9891$as_echo "$tool_specified" >&6; }
9892      fi
9893    fi
9894  fi
9895
9896
9897
9898  if test "x$TEE" = x; then
9899    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9900  fi
9901
9902
9903
9904
9905
9906  # Publish this variable in the help.
9907
9908
9909  if test "x$TOUCH" = x; then
9910    # The variable is not set by user, try to locate tool using the code snippet
9911    for ac_prog in touch
9912do
9913  # Extract the first word of "$ac_prog", so it can be a program name with args.
9914set dummy $ac_prog; ac_word=$2
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916$as_echo_n "checking for $ac_word... " >&6; }
9917if ${ac_cv_path_TOUCH+:} false; then :
9918  $as_echo_n "(cached) " >&6
9919else
9920  case $TOUCH in
9921  [\\/]* | ?:[\\/]*)
9922  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9923  ;;
9924  *)
9925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9926for as_dir in $PATH
9927do
9928  IFS=$as_save_IFS
9929  test -z "$as_dir" && as_dir=.
9930    for ac_exec_ext in '' $ac_executable_extensions; do
9931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9932    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9934    break 2
9935  fi
9936done
9937  done
9938IFS=$as_save_IFS
9939
9940  ;;
9941esac
9942fi
9943TOUCH=$ac_cv_path_TOUCH
9944if test -n "$TOUCH"; then
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9946$as_echo "$TOUCH" >&6; }
9947else
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
9950fi
9951
9952
9953  test -n "$TOUCH" && break
9954done
9955
9956  else
9957    # The variable is set, but is it from the command line or the environment?
9958
9959    # Try to remove the string !TOUCH! from our list.
9960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
9961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9962      # If it failed, the variable was not from the command line. Ignore it,
9963      # but warn the user (except for BASH, which is always set by the calling BASH).
9964      if test "xTOUCH" != xBASH; then
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
9966$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
9967      fi
9968      # Try to locate tool using the code snippet
9969      for ac_prog in touch
9970do
9971  # Extract the first word of "$ac_prog", so it can be a program name with args.
9972set dummy $ac_prog; ac_word=$2
9973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9974$as_echo_n "checking for $ac_word... " >&6; }
9975if ${ac_cv_path_TOUCH+:} false; then :
9976  $as_echo_n "(cached) " >&6
9977else
9978  case $TOUCH in
9979  [\\/]* | ?:[\\/]*)
9980  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9981  ;;
9982  *)
9983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9984for as_dir in $PATH
9985do
9986  IFS=$as_save_IFS
9987  test -z "$as_dir" && as_dir=.
9988    for ac_exec_ext in '' $ac_executable_extensions; do
9989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9990    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9992    break 2
9993  fi
9994done
9995  done
9996IFS=$as_save_IFS
9997
9998  ;;
9999esac
10000fi
10001TOUCH=$ac_cv_path_TOUCH
10002if test -n "$TOUCH"; then
10003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10004$as_echo "$TOUCH" >&6; }
10005else
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007$as_echo "no" >&6; }
10008fi
10009
10010
10011  test -n "$TOUCH" && break
10012done
10013
10014    else
10015      # If it succeeded, then it was overridden by the user. We will use it
10016      # for the tool.
10017
10018      # First remove it from the list of overridden variables, so we can test
10019      # for unknown variables in the end.
10020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10021
10022      # Check if the provided tool contains a complete path.
10023      tool_specified="$TOUCH"
10024      tool_basename="${tool_specified##*/}"
10025      if test "x$tool_basename" = "x$tool_specified"; then
10026        # A command without a complete path is provided, search $PATH.
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10028$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10029        # Extract the first word of "$tool_basename", so it can be a program name with args.
10030set dummy $tool_basename; ac_word=$2
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10032$as_echo_n "checking for $ac_word... " >&6; }
10033if ${ac_cv_path_TOUCH+:} false; then :
10034  $as_echo_n "(cached) " >&6
10035else
10036  case $TOUCH in
10037  [\\/]* | ?:[\\/]*)
10038  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10039  ;;
10040  *)
10041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10042for as_dir in $PATH
10043do
10044  IFS=$as_save_IFS
10045  test -z "$as_dir" && as_dir=.
10046    for ac_exec_ext in '' $ac_executable_extensions; do
10047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10048    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10050    break 2
10051  fi
10052done
10053  done
10054IFS=$as_save_IFS
10055
10056  ;;
10057esac
10058fi
10059TOUCH=$ac_cv_path_TOUCH
10060if test -n "$TOUCH"; then
10061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10062$as_echo "$TOUCH" >&6; }
10063else
10064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065$as_echo "no" >&6; }
10066fi
10067
10068
10069        if test "x$TOUCH" = x; then
10070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10071        fi
10072      else
10073        # Otherwise we believe it is a complete path. Use it as it is.
10074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10075$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10077$as_echo_n "checking for TOUCH... " >&6; }
10078        if test ! -x "$tool_specified"; then
10079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10080$as_echo "not found" >&6; }
10081          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10082        fi
10083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10084$as_echo "$tool_specified" >&6; }
10085      fi
10086    fi
10087  fi
10088
10089
10090
10091  if test "x$TOUCH" = x; then
10092    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10093  fi
10094
10095
10096
10097
10098
10099  # Publish this variable in the help.
10100
10101
10102  if test "x$TR" = x; then
10103    # The variable is not set by user, try to locate tool using the code snippet
10104    for ac_prog in tr
10105do
10106  # Extract the first word of "$ac_prog", so it can be a program name with args.
10107set dummy $ac_prog; ac_word=$2
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10109$as_echo_n "checking for $ac_word... " >&6; }
10110if ${ac_cv_path_TR+:} false; then :
10111  $as_echo_n "(cached) " >&6
10112else
10113  case $TR in
10114  [\\/]* | ?:[\\/]*)
10115  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10116  ;;
10117  *)
10118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10119for as_dir in $PATH
10120do
10121  IFS=$as_save_IFS
10122  test -z "$as_dir" && as_dir=.
10123    for ac_exec_ext in '' $ac_executable_extensions; do
10124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10125    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10127    break 2
10128  fi
10129done
10130  done
10131IFS=$as_save_IFS
10132
10133  ;;
10134esac
10135fi
10136TR=$ac_cv_path_TR
10137if test -n "$TR"; then
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10139$as_echo "$TR" >&6; }
10140else
10141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10142$as_echo "no" >&6; }
10143fi
10144
10145
10146  test -n "$TR" && break
10147done
10148
10149  else
10150    # The variable is set, but is it from the command line or the environment?
10151
10152    # Try to remove the string !TR! from our list.
10153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10155      # If it failed, the variable was not from the command line. Ignore it,
10156      # but warn the user (except for BASH, which is always set by the calling BASH).
10157      if test "xTR" != xBASH; then
10158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10159$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10160      fi
10161      # Try to locate tool using the code snippet
10162      for ac_prog in tr
10163do
10164  # Extract the first word of "$ac_prog", so it can be a program name with args.
10165set dummy $ac_prog; ac_word=$2
10166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167$as_echo_n "checking for $ac_word... " >&6; }
10168if ${ac_cv_path_TR+:} false; then :
10169  $as_echo_n "(cached) " >&6
10170else
10171  case $TR in
10172  [\\/]* | ?:[\\/]*)
10173  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10174  ;;
10175  *)
10176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10177for as_dir in $PATH
10178do
10179  IFS=$as_save_IFS
10180  test -z "$as_dir" && as_dir=.
10181    for ac_exec_ext in '' $ac_executable_extensions; do
10182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10183    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10185    break 2
10186  fi
10187done
10188  done
10189IFS=$as_save_IFS
10190
10191  ;;
10192esac
10193fi
10194TR=$ac_cv_path_TR
10195if test -n "$TR"; then
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10197$as_echo "$TR" >&6; }
10198else
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
10201fi
10202
10203
10204  test -n "$TR" && break
10205done
10206
10207    else
10208      # If it succeeded, then it was overridden by the user. We will use it
10209      # for the tool.
10210
10211      # First remove it from the list of overridden variables, so we can test
10212      # for unknown variables in the end.
10213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10214
10215      # Check if the provided tool contains a complete path.
10216      tool_specified="$TR"
10217      tool_basename="${tool_specified##*/}"
10218      if test "x$tool_basename" = "x$tool_specified"; then
10219        # A command without a complete path is provided, search $PATH.
10220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10221$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10222        # Extract the first word of "$tool_basename", so it can be a program name with args.
10223set dummy $tool_basename; ac_word=$2
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225$as_echo_n "checking for $ac_word... " >&6; }
10226if ${ac_cv_path_TR+:} false; then :
10227  $as_echo_n "(cached) " >&6
10228else
10229  case $TR in
10230  [\\/]* | ?:[\\/]*)
10231  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10232  ;;
10233  *)
10234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10235for as_dir in $PATH
10236do
10237  IFS=$as_save_IFS
10238  test -z "$as_dir" && as_dir=.
10239    for ac_exec_ext in '' $ac_executable_extensions; do
10240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10241    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10243    break 2
10244  fi
10245done
10246  done
10247IFS=$as_save_IFS
10248
10249  ;;
10250esac
10251fi
10252TR=$ac_cv_path_TR
10253if test -n "$TR"; then
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10255$as_echo "$TR" >&6; }
10256else
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
10259fi
10260
10261
10262        if test "x$TR" = x; then
10263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10264        fi
10265      else
10266        # Otherwise we believe it is a complete path. Use it as it is.
10267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10268$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10270$as_echo_n "checking for TR... " >&6; }
10271        if test ! -x "$tool_specified"; then
10272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10273$as_echo "not found" >&6; }
10274          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10275        fi
10276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10277$as_echo "$tool_specified" >&6; }
10278      fi
10279    fi
10280  fi
10281
10282
10283
10284  if test "x$TR" = x; then
10285    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10286  fi
10287
10288
10289
10290
10291
10292  # Publish this variable in the help.
10293
10294
10295  if test "x$UNAME" = x; then
10296    # The variable is not set by user, try to locate tool using the code snippet
10297    for ac_prog in uname
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_UNAME+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $UNAME in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329UNAME=$ac_cv_path_UNAME
10330if test -n "$UNAME"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10332$as_echo "$UNAME" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$UNAME" && break
10340done
10341
10342  else
10343    # The variable is set, but is it from the command line or the environment?
10344
10345    # Try to remove the string !UNAME! from our list.
10346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10348      # If it failed, the variable was not from the command line. Ignore it,
10349      # but warn the user (except for BASH, which is always set by the calling BASH).
10350      if test "xUNAME" != xBASH; then
10351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10352$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10353      fi
10354      # Try to locate tool using the code snippet
10355      for ac_prog in uname
10356do
10357  # Extract the first word of "$ac_prog", so it can be a program name with args.
10358set dummy $ac_prog; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if ${ac_cv_path_UNAME+:} false; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  case $UNAME in
10365  [\\/]* | ?:[\\/]*)
10366  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10367  ;;
10368  *)
10369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370for as_dir in $PATH
10371do
10372  IFS=$as_save_IFS
10373  test -z "$as_dir" && as_dir=.
10374    for ac_exec_ext in '' $ac_executable_extensions; do
10375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378    break 2
10379  fi
10380done
10381  done
10382IFS=$as_save_IFS
10383
10384  ;;
10385esac
10386fi
10387UNAME=$ac_cv_path_UNAME
10388if test -n "$UNAME"; then
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10390$as_echo "$UNAME" >&6; }
10391else
10392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394fi
10395
10396
10397  test -n "$UNAME" && break
10398done
10399
10400    else
10401      # If it succeeded, then it was overridden by the user. We will use it
10402      # for the tool.
10403
10404      # First remove it from the list of overridden variables, so we can test
10405      # for unknown variables in the end.
10406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10407
10408      # Check if the provided tool contains a complete path.
10409      tool_specified="$UNAME"
10410      tool_basename="${tool_specified##*/}"
10411      if test "x$tool_basename" = "x$tool_specified"; then
10412        # A command without a complete path is provided, search $PATH.
10413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10414$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10415        # Extract the first word of "$tool_basename", so it can be a program name with args.
10416set dummy $tool_basename; ac_word=$2
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418$as_echo_n "checking for $ac_word... " >&6; }
10419if ${ac_cv_path_UNAME+:} false; then :
10420  $as_echo_n "(cached) " >&6
10421else
10422  case $UNAME in
10423  [\\/]* | ?:[\\/]*)
10424  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10425  ;;
10426  *)
10427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428for as_dir in $PATH
10429do
10430  IFS=$as_save_IFS
10431  test -z "$as_dir" && as_dir=.
10432    for ac_exec_ext in '' $ac_executable_extensions; do
10433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436    break 2
10437  fi
10438done
10439  done
10440IFS=$as_save_IFS
10441
10442  ;;
10443esac
10444fi
10445UNAME=$ac_cv_path_UNAME
10446if test -n "$UNAME"; then
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10448$as_echo "$UNAME" >&6; }
10449else
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
10452fi
10453
10454
10455        if test "x$UNAME" = x; then
10456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10457        fi
10458      else
10459        # Otherwise we believe it is a complete path. Use it as it is.
10460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10461$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10463$as_echo_n "checking for UNAME... " >&6; }
10464        if test ! -x "$tool_specified"; then
10465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10466$as_echo "not found" >&6; }
10467          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10468        fi
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10470$as_echo "$tool_specified" >&6; }
10471      fi
10472    fi
10473  fi
10474
10475
10476
10477  if test "x$UNAME" = x; then
10478    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10479  fi
10480
10481
10482
10483
10484
10485  # Publish this variable in the help.
10486
10487
10488  if test "x$UNIQ" = x; then
10489    # The variable is not set by user, try to locate tool using the code snippet
10490    for ac_prog in uniq
10491do
10492  # Extract the first word of "$ac_prog", so it can be a program name with args.
10493set dummy $ac_prog; ac_word=$2
10494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495$as_echo_n "checking for $ac_word... " >&6; }
10496if ${ac_cv_path_UNIQ+:} false; then :
10497  $as_echo_n "(cached) " >&6
10498else
10499  case $UNIQ in
10500  [\\/]* | ?:[\\/]*)
10501  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10502  ;;
10503  *)
10504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505for as_dir in $PATH
10506do
10507  IFS=$as_save_IFS
10508  test -z "$as_dir" && as_dir=.
10509    for ac_exec_ext in '' $ac_executable_extensions; do
10510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513    break 2
10514  fi
10515done
10516  done
10517IFS=$as_save_IFS
10518
10519  ;;
10520esac
10521fi
10522UNIQ=$ac_cv_path_UNIQ
10523if test -n "$UNIQ"; then
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10525$as_echo "$UNIQ" >&6; }
10526else
10527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528$as_echo "no" >&6; }
10529fi
10530
10531
10532  test -n "$UNIQ" && break
10533done
10534
10535  else
10536    # The variable is set, but is it from the command line or the environment?
10537
10538    # Try to remove the string !UNIQ! from our list.
10539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10541      # If it failed, the variable was not from the command line. Ignore it,
10542      # but warn the user (except for BASH, which is always set by the calling BASH).
10543      if test "xUNIQ" != xBASH; then
10544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10545$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10546      fi
10547      # Try to locate tool using the code snippet
10548      for ac_prog in uniq
10549do
10550  # Extract the first word of "$ac_prog", so it can be a program name with args.
10551set dummy $ac_prog; ac_word=$2
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10553$as_echo_n "checking for $ac_word... " >&6; }
10554if ${ac_cv_path_UNIQ+:} false; then :
10555  $as_echo_n "(cached) " >&6
10556else
10557  case $UNIQ in
10558  [\\/]* | ?:[\\/]*)
10559  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10560  ;;
10561  *)
10562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10563for as_dir in $PATH
10564do
10565  IFS=$as_save_IFS
10566  test -z "$as_dir" && as_dir=.
10567    for ac_exec_ext in '' $ac_executable_extensions; do
10568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10569    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10571    break 2
10572  fi
10573done
10574  done
10575IFS=$as_save_IFS
10576
10577  ;;
10578esac
10579fi
10580UNIQ=$ac_cv_path_UNIQ
10581if test -n "$UNIQ"; then
10582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10583$as_echo "$UNIQ" >&6; }
10584else
10585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586$as_echo "no" >&6; }
10587fi
10588
10589
10590  test -n "$UNIQ" && break
10591done
10592
10593    else
10594      # If it succeeded, then it was overridden by the user. We will use it
10595      # for the tool.
10596
10597      # First remove it from the list of overridden variables, so we can test
10598      # for unknown variables in the end.
10599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10600
10601      # Check if the provided tool contains a complete path.
10602      tool_specified="$UNIQ"
10603      tool_basename="${tool_specified##*/}"
10604      if test "x$tool_basename" = "x$tool_specified"; then
10605        # A command without a complete path is provided, search $PATH.
10606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10607$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10608        # Extract the first word of "$tool_basename", so it can be a program name with args.
10609set dummy $tool_basename; ac_word=$2
10610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10611$as_echo_n "checking for $ac_word... " >&6; }
10612if ${ac_cv_path_UNIQ+:} false; then :
10613  $as_echo_n "(cached) " >&6
10614else
10615  case $UNIQ in
10616  [\\/]* | ?:[\\/]*)
10617  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10618  ;;
10619  *)
10620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621for as_dir in $PATH
10622do
10623  IFS=$as_save_IFS
10624  test -z "$as_dir" && as_dir=.
10625    for ac_exec_ext in '' $ac_executable_extensions; do
10626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10627    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10629    break 2
10630  fi
10631done
10632  done
10633IFS=$as_save_IFS
10634
10635  ;;
10636esac
10637fi
10638UNIQ=$ac_cv_path_UNIQ
10639if test -n "$UNIQ"; then
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10641$as_echo "$UNIQ" >&6; }
10642else
10643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644$as_echo "no" >&6; }
10645fi
10646
10647
10648        if test "x$UNIQ" = x; then
10649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10650        fi
10651      else
10652        # Otherwise we believe it is a complete path. Use it as it is.
10653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10654$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10656$as_echo_n "checking for UNIQ... " >&6; }
10657        if test ! -x "$tool_specified"; then
10658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10659$as_echo "not found" >&6; }
10660          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10661        fi
10662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10663$as_echo "$tool_specified" >&6; }
10664      fi
10665    fi
10666  fi
10667
10668
10669
10670  if test "x$UNIQ" = x; then
10671    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10672  fi
10673
10674
10675
10676
10677
10678  # Publish this variable in the help.
10679
10680
10681  if test "x$WC" = x; then
10682    # The variable is not set by user, try to locate tool using the code snippet
10683    for ac_prog in wc
10684do
10685  # Extract the first word of "$ac_prog", so it can be a program name with args.
10686set dummy $ac_prog; ac_word=$2
10687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10688$as_echo_n "checking for $ac_word... " >&6; }
10689if ${ac_cv_path_WC+:} false; then :
10690  $as_echo_n "(cached) " >&6
10691else
10692  case $WC in
10693  [\\/]* | ?:[\\/]*)
10694  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10695  ;;
10696  *)
10697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10698for as_dir in $PATH
10699do
10700  IFS=$as_save_IFS
10701  test -z "$as_dir" && as_dir=.
10702    for ac_exec_ext in '' $ac_executable_extensions; do
10703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10704    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10706    break 2
10707  fi
10708done
10709  done
10710IFS=$as_save_IFS
10711
10712  ;;
10713esac
10714fi
10715WC=$ac_cv_path_WC
10716if test -n "$WC"; then
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10718$as_echo "$WC" >&6; }
10719else
10720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10721$as_echo "no" >&6; }
10722fi
10723
10724
10725  test -n "$WC" && break
10726done
10727
10728  else
10729    # The variable is set, but is it from the command line or the environment?
10730
10731    # Try to remove the string !WC! from our list.
10732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10734      # If it failed, the variable was not from the command line. Ignore it,
10735      # but warn the user (except for BASH, which is always set by the calling BASH).
10736      if test "xWC" != xBASH; then
10737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10738$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10739      fi
10740      # Try to locate tool using the code snippet
10741      for ac_prog in wc
10742do
10743  # Extract the first word of "$ac_prog", so it can be a program name with args.
10744set dummy $ac_prog; ac_word=$2
10745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10746$as_echo_n "checking for $ac_word... " >&6; }
10747if ${ac_cv_path_WC+:} false; then :
10748  $as_echo_n "(cached) " >&6
10749else
10750  case $WC in
10751  [\\/]* | ?:[\\/]*)
10752  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10753  ;;
10754  *)
10755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10756for as_dir in $PATH
10757do
10758  IFS=$as_save_IFS
10759  test -z "$as_dir" && as_dir=.
10760    for ac_exec_ext in '' $ac_executable_extensions; do
10761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10762    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10764    break 2
10765  fi
10766done
10767  done
10768IFS=$as_save_IFS
10769
10770  ;;
10771esac
10772fi
10773WC=$ac_cv_path_WC
10774if test -n "$WC"; then
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10776$as_echo "$WC" >&6; }
10777else
10778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10779$as_echo "no" >&6; }
10780fi
10781
10782
10783  test -n "$WC" && break
10784done
10785
10786    else
10787      # If it succeeded, then it was overridden by the user. We will use it
10788      # for the tool.
10789
10790      # First remove it from the list of overridden variables, so we can test
10791      # for unknown variables in the end.
10792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10793
10794      # Check if the provided tool contains a complete path.
10795      tool_specified="$WC"
10796      tool_basename="${tool_specified##*/}"
10797      if test "x$tool_basename" = "x$tool_specified"; then
10798        # A command without a complete path is provided, search $PATH.
10799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10800$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10801        # Extract the first word of "$tool_basename", so it can be a program name with args.
10802set dummy $tool_basename; ac_word=$2
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10804$as_echo_n "checking for $ac_word... " >&6; }
10805if ${ac_cv_path_WC+:} false; then :
10806  $as_echo_n "(cached) " >&6
10807else
10808  case $WC in
10809  [\\/]* | ?:[\\/]*)
10810  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10811  ;;
10812  *)
10813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10814for as_dir in $PATH
10815do
10816  IFS=$as_save_IFS
10817  test -z "$as_dir" && as_dir=.
10818    for ac_exec_ext in '' $ac_executable_extensions; do
10819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10820    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10822    break 2
10823  fi
10824done
10825  done
10826IFS=$as_save_IFS
10827
10828  ;;
10829esac
10830fi
10831WC=$ac_cv_path_WC
10832if test -n "$WC"; then
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10834$as_echo "$WC" >&6; }
10835else
10836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10837$as_echo "no" >&6; }
10838fi
10839
10840
10841        if test "x$WC" = x; then
10842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10843        fi
10844      else
10845        # Otherwise we believe it is a complete path. Use it as it is.
10846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10847$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10849$as_echo_n "checking for WC... " >&6; }
10850        if test ! -x "$tool_specified"; then
10851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10852$as_echo "not found" >&6; }
10853          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10854        fi
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10856$as_echo "$tool_specified" >&6; }
10857      fi
10858    fi
10859  fi
10860
10861
10862
10863  if test "x$WC" = x; then
10864    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10865  fi
10866
10867
10868
10869
10870
10871  # Publish this variable in the help.
10872
10873
10874  if test "x$WHICH" = x; then
10875    # The variable is not set by user, try to locate tool using the code snippet
10876    for ac_prog in which
10877do
10878  # Extract the first word of "$ac_prog", so it can be a program name with args.
10879set dummy $ac_prog; ac_word=$2
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881$as_echo_n "checking for $ac_word... " >&6; }
10882if ${ac_cv_path_WHICH+:} false; then :
10883  $as_echo_n "(cached) " >&6
10884else
10885  case $WHICH in
10886  [\\/]* | ?:[\\/]*)
10887  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10888  ;;
10889  *)
10890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891for as_dir in $PATH
10892do
10893  IFS=$as_save_IFS
10894  test -z "$as_dir" && as_dir=.
10895    for ac_exec_ext in '' $ac_executable_extensions; do
10896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899    break 2
10900  fi
10901done
10902  done
10903IFS=$as_save_IFS
10904
10905  ;;
10906esac
10907fi
10908WHICH=$ac_cv_path_WHICH
10909if test -n "$WHICH"; then
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10911$as_echo "$WHICH" >&6; }
10912else
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914$as_echo "no" >&6; }
10915fi
10916
10917
10918  test -n "$WHICH" && break
10919done
10920
10921  else
10922    # The variable is set, but is it from the command line or the environment?
10923
10924    # Try to remove the string !WHICH! from our list.
10925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10927      # If it failed, the variable was not from the command line. Ignore it,
10928      # but warn the user (except for BASH, which is always set by the calling BASH).
10929      if test "xWHICH" != xBASH; then
10930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10931$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10932      fi
10933      # Try to locate tool using the code snippet
10934      for ac_prog in which
10935do
10936  # Extract the first word of "$ac_prog", so it can be a program name with args.
10937set dummy $ac_prog; ac_word=$2
10938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939$as_echo_n "checking for $ac_word... " >&6; }
10940if ${ac_cv_path_WHICH+:} false; then :
10941  $as_echo_n "(cached) " >&6
10942else
10943  case $WHICH in
10944  [\\/]* | ?:[\\/]*)
10945  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10946  ;;
10947  *)
10948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949for as_dir in $PATH
10950do
10951  IFS=$as_save_IFS
10952  test -z "$as_dir" && as_dir=.
10953    for ac_exec_ext in '' $ac_executable_extensions; do
10954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957    break 2
10958  fi
10959done
10960  done
10961IFS=$as_save_IFS
10962
10963  ;;
10964esac
10965fi
10966WHICH=$ac_cv_path_WHICH
10967if test -n "$WHICH"; then
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10969$as_echo "$WHICH" >&6; }
10970else
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972$as_echo "no" >&6; }
10973fi
10974
10975
10976  test -n "$WHICH" && break
10977done
10978
10979    else
10980      # If it succeeded, then it was overridden by the user. We will use it
10981      # for the tool.
10982
10983      # First remove it from the list of overridden variables, so we can test
10984      # for unknown variables in the end.
10985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10986
10987      # Check if the provided tool contains a complete path.
10988      tool_specified="$WHICH"
10989      tool_basename="${tool_specified##*/}"
10990      if test "x$tool_basename" = "x$tool_specified"; then
10991        # A command without a complete path is provided, search $PATH.
10992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
10993$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
10994        # Extract the first word of "$tool_basename", so it can be a program name with args.
10995set dummy $tool_basename; ac_word=$2
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997$as_echo_n "checking for $ac_word... " >&6; }
10998if ${ac_cv_path_WHICH+:} false; then :
10999  $as_echo_n "(cached) " >&6
11000else
11001  case $WHICH in
11002  [\\/]* | ?:[\\/]*)
11003  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11004  ;;
11005  *)
11006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007for as_dir in $PATH
11008do
11009  IFS=$as_save_IFS
11010  test -z "$as_dir" && as_dir=.
11011    for ac_exec_ext in '' $ac_executable_extensions; do
11012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11013    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11015    break 2
11016  fi
11017done
11018  done
11019IFS=$as_save_IFS
11020
11021  ;;
11022esac
11023fi
11024WHICH=$ac_cv_path_WHICH
11025if test -n "$WHICH"; then
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11027$as_echo "$WHICH" >&6; }
11028else
11029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
11031fi
11032
11033
11034        if test "x$WHICH" = x; then
11035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11036        fi
11037      else
11038        # Otherwise we believe it is a complete path. Use it as it is.
11039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11040$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11042$as_echo_n "checking for WHICH... " >&6; }
11043        if test ! -x "$tool_specified"; then
11044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11045$as_echo "not found" >&6; }
11046          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11047        fi
11048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11049$as_echo "$tool_specified" >&6; }
11050      fi
11051    fi
11052  fi
11053
11054
11055
11056  if test "x$WHICH" = x; then
11057    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11058  fi
11059
11060
11061
11062
11063
11064  # Publish this variable in the help.
11065
11066
11067  if test "x$XARGS" = x; then
11068    # The variable is not set by user, try to locate tool using the code snippet
11069    for ac_prog in xargs
11070do
11071  # Extract the first word of "$ac_prog", so it can be a program name with args.
11072set dummy $ac_prog; ac_word=$2
11073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11074$as_echo_n "checking for $ac_word... " >&6; }
11075if ${ac_cv_path_XARGS+:} false; then :
11076  $as_echo_n "(cached) " >&6
11077else
11078  case $XARGS in
11079  [\\/]* | ?:[\\/]*)
11080  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11081  ;;
11082  *)
11083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11084for as_dir in $PATH
11085do
11086  IFS=$as_save_IFS
11087  test -z "$as_dir" && as_dir=.
11088    for ac_exec_ext in '' $ac_executable_extensions; do
11089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11090    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11092    break 2
11093  fi
11094done
11095  done
11096IFS=$as_save_IFS
11097
11098  ;;
11099esac
11100fi
11101XARGS=$ac_cv_path_XARGS
11102if test -n "$XARGS"; then
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11104$as_echo "$XARGS" >&6; }
11105else
11106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11107$as_echo "no" >&6; }
11108fi
11109
11110
11111  test -n "$XARGS" && break
11112done
11113
11114  else
11115    # The variable is set, but is it from the command line or the environment?
11116
11117    # Try to remove the string !XARGS! from our list.
11118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11120      # If it failed, the variable was not from the command line. Ignore it,
11121      # but warn the user (except for BASH, which is always set by the calling BASH).
11122      if test "xXARGS" != xBASH; then
11123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11124$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11125      fi
11126      # Try to locate tool using the code snippet
11127      for ac_prog in xargs
11128do
11129  # Extract the first word of "$ac_prog", so it can be a program name with args.
11130set dummy $ac_prog; ac_word=$2
11131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132$as_echo_n "checking for $ac_word... " >&6; }
11133if ${ac_cv_path_XARGS+:} false; then :
11134  $as_echo_n "(cached) " >&6
11135else
11136  case $XARGS in
11137  [\\/]* | ?:[\\/]*)
11138  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11139  ;;
11140  *)
11141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142for as_dir in $PATH
11143do
11144  IFS=$as_save_IFS
11145  test -z "$as_dir" && as_dir=.
11146    for ac_exec_ext in '' $ac_executable_extensions; do
11147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11148    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150    break 2
11151  fi
11152done
11153  done
11154IFS=$as_save_IFS
11155
11156  ;;
11157esac
11158fi
11159XARGS=$ac_cv_path_XARGS
11160if test -n "$XARGS"; then
11161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11162$as_echo "$XARGS" >&6; }
11163else
11164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11165$as_echo "no" >&6; }
11166fi
11167
11168
11169  test -n "$XARGS" && break
11170done
11171
11172    else
11173      # If it succeeded, then it was overridden by the user. We will use it
11174      # for the tool.
11175
11176      # First remove it from the list of overridden variables, so we can test
11177      # for unknown variables in the end.
11178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11179
11180      # Check if the provided tool contains a complete path.
11181      tool_specified="$XARGS"
11182      tool_basename="${tool_specified##*/}"
11183      if test "x$tool_basename" = "x$tool_specified"; then
11184        # A command without a complete path is provided, search $PATH.
11185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11186$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11187        # Extract the first word of "$tool_basename", so it can be a program name with args.
11188set dummy $tool_basename; ac_word=$2
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190$as_echo_n "checking for $ac_word... " >&6; }
11191if ${ac_cv_path_XARGS+:} false; then :
11192  $as_echo_n "(cached) " >&6
11193else
11194  case $XARGS in
11195  [\\/]* | ?:[\\/]*)
11196  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11197  ;;
11198  *)
11199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200for as_dir in $PATH
11201do
11202  IFS=$as_save_IFS
11203  test -z "$as_dir" && as_dir=.
11204    for ac_exec_ext in '' $ac_executable_extensions; do
11205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208    break 2
11209  fi
11210done
11211  done
11212IFS=$as_save_IFS
11213
11214  ;;
11215esac
11216fi
11217XARGS=$ac_cv_path_XARGS
11218if test -n "$XARGS"; then
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11220$as_echo "$XARGS" >&6; }
11221else
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224fi
11225
11226
11227        if test "x$XARGS" = x; then
11228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11229        fi
11230      else
11231        # Otherwise we believe it is a complete path. Use it as it is.
11232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11233$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11235$as_echo_n "checking for XARGS... " >&6; }
11236        if test ! -x "$tool_specified"; then
11237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11238$as_echo "not found" >&6; }
11239          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11240        fi
11241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11242$as_echo "$tool_specified" >&6; }
11243      fi
11244    fi
11245  fi
11246
11247
11248
11249  if test "x$XARGS" = x; then
11250    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11251  fi
11252
11253
11254
11255  # Then required tools that require some special treatment.
11256
11257
11258  # Publish this variable in the help.
11259
11260
11261  if test "x$AWK" = x; then
11262    # The variable is not set by user, try to locate tool using the code snippet
11263    for ac_prog in gawk mawk nawk awk
11264do
11265  # Extract the first word of "$ac_prog", so it can be a program name with args.
11266set dummy $ac_prog; ac_word=$2
11267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11268$as_echo_n "checking for $ac_word... " >&6; }
11269if ${ac_cv_prog_AWK+:} false; then :
11270  $as_echo_n "(cached) " >&6
11271else
11272  if test -n "$AWK"; then
11273  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11274else
11275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_prog_AWK="$ac_prog"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290fi
11291fi
11292AWK=$ac_cv_prog_AWK
11293if test -n "$AWK"; then
11294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11295$as_echo "$AWK" >&6; }
11296else
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299fi
11300
11301
11302  test -n "$AWK" && break
11303done
11304
11305  else
11306    # The variable is set, but is it from the command line or the environment?
11307
11308    # Try to remove the string !AWK! from our list.
11309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11311      # If it failed, the variable was not from the command line. Ignore it,
11312      # but warn the user (except for BASH, which is always set by the calling BASH).
11313      if test "xAWK" != xBASH; then
11314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11315$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11316      fi
11317      # Try to locate tool using the code snippet
11318      for ac_prog in gawk mawk nawk awk
11319do
11320  # Extract the first word of "$ac_prog", so it can be a program name with args.
11321set dummy $ac_prog; ac_word=$2
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11323$as_echo_n "checking for $ac_word... " >&6; }
11324if ${ac_cv_prog_AWK+:} false; then :
11325  $as_echo_n "(cached) " >&6
11326else
11327  if test -n "$AWK"; then
11328  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11329else
11330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11331for as_dir in $PATH
11332do
11333  IFS=$as_save_IFS
11334  test -z "$as_dir" && as_dir=.
11335    for ac_exec_ext in '' $ac_executable_extensions; do
11336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11337    ac_cv_prog_AWK="$ac_prog"
11338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11339    break 2
11340  fi
11341done
11342  done
11343IFS=$as_save_IFS
11344
11345fi
11346fi
11347AWK=$ac_cv_prog_AWK
11348if test -n "$AWK"; then
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11350$as_echo "$AWK" >&6; }
11351else
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
11354fi
11355
11356
11357  test -n "$AWK" && break
11358done
11359
11360    else
11361      # If it succeeded, then it was overridden by the user. We will use it
11362      # for the tool.
11363
11364      # First remove it from the list of overridden variables, so we can test
11365      # for unknown variables in the end.
11366      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11367
11368      # Check if the provided tool contains a complete path.
11369      tool_specified="$AWK"
11370      tool_basename="${tool_specified##*/}"
11371      if test "x$tool_basename" = "x$tool_specified"; then
11372        # A command without a complete path is provided, search $PATH.
11373        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11374$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11375        # Extract the first word of "$tool_basename", so it can be a program name with args.
11376set dummy $tool_basename; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_path_AWK+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  case $AWK in
11383  [\\/]* | ?:[\\/]*)
11384  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11385  ;;
11386  *)
11387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402  ;;
11403esac
11404fi
11405AWK=$ac_cv_path_AWK
11406if test -n "$AWK"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11408$as_echo "$AWK" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415        if test "x$AWK" = x; then
11416          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11417        fi
11418      else
11419        # Otherwise we believe it is a complete path. Use it as it is.
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11421$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11423$as_echo_n "checking for AWK... " >&6; }
11424        if test ! -x "$tool_specified"; then
11425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11426$as_echo "not found" >&6; }
11427          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11428        fi
11429        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11430$as_echo "$tool_specified" >&6; }
11431      fi
11432    fi
11433  fi
11434
11435
11436  if test "x$AWK" = x; then
11437    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11438  fi
11439
11440
11441
11442
11443  # Publish this variable in the help.
11444
11445
11446  if test "x$GREP" = x; then
11447    # The variable is not set by user, try to locate tool using the code snippet
11448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11449$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11450if ${ac_cv_path_GREP+:} false; then :
11451  $as_echo_n "(cached) " >&6
11452else
11453  if test -z "$GREP"; then
11454  ac_path_GREP_found=false
11455  # Loop through the user's path and test for each of PROGNAME-LIST
11456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11458do
11459  IFS=$as_save_IFS
11460  test -z "$as_dir" && as_dir=.
11461    for ac_prog in grep ggrep; do
11462    for ac_exec_ext in '' $ac_executable_extensions; do
11463      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11464      as_fn_executable_p "$ac_path_GREP" || continue
11465# Check for GNU ac_path_GREP and select it if it is found.
11466  # Check for GNU $ac_path_GREP
11467case `"$ac_path_GREP" --version 2>&1` in
11468*GNU*)
11469  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11470*)
11471  ac_count=0
11472  $as_echo_n 0123456789 >"conftest.in"
11473  while :
11474  do
11475    cat "conftest.in" "conftest.in" >"conftest.tmp"
11476    mv "conftest.tmp" "conftest.in"
11477    cp "conftest.in" "conftest.nl"
11478    $as_echo 'GREP' >> "conftest.nl"
11479    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11480    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11481    as_fn_arith $ac_count + 1 && ac_count=$as_val
11482    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11483      # Best one so far, save it but keep looking for a better one
11484      ac_cv_path_GREP="$ac_path_GREP"
11485      ac_path_GREP_max=$ac_count
11486    fi
11487    # 10*(2^10) chars as input seems more than enough
11488    test $ac_count -gt 10 && break
11489  done
11490  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11491esac
11492
11493      $ac_path_GREP_found && break 3
11494    done
11495  done
11496  done
11497IFS=$as_save_IFS
11498  if test -z "$ac_cv_path_GREP"; then
11499    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11500  fi
11501else
11502  ac_cv_path_GREP=$GREP
11503fi
11504
11505fi
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11507$as_echo "$ac_cv_path_GREP" >&6; }
11508 GREP="$ac_cv_path_GREP"
11509
11510
11511  else
11512    # The variable is set, but is it from the command line or the environment?
11513
11514    # Try to remove the string !GREP! from our list.
11515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11517      # If it failed, the variable was not from the command line. Ignore it,
11518      # but warn the user (except for BASH, which is always set by the calling BASH).
11519      if test "xGREP" != xBASH; then
11520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11521$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11522      fi
11523      # Try to locate tool using the code snippet
11524      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11525$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11526if ${ac_cv_path_GREP+:} false; then :
11527  $as_echo_n "(cached) " >&6
11528else
11529  if test -z "$GREP"; then
11530  ac_path_GREP_found=false
11531  # Loop through the user's path and test for each of PROGNAME-LIST
11532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11533for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11534do
11535  IFS=$as_save_IFS
11536  test -z "$as_dir" && as_dir=.
11537    for ac_prog in grep ggrep; do
11538    for ac_exec_ext in '' $ac_executable_extensions; do
11539      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11540      as_fn_executable_p "$ac_path_GREP" || continue
11541# Check for GNU ac_path_GREP and select it if it is found.
11542  # Check for GNU $ac_path_GREP
11543case `"$ac_path_GREP" --version 2>&1` in
11544*GNU*)
11545  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11546*)
11547  ac_count=0
11548  $as_echo_n 0123456789 >"conftest.in"
11549  while :
11550  do
11551    cat "conftest.in" "conftest.in" >"conftest.tmp"
11552    mv "conftest.tmp" "conftest.in"
11553    cp "conftest.in" "conftest.nl"
11554    $as_echo 'GREP' >> "conftest.nl"
11555    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11556    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11557    as_fn_arith $ac_count + 1 && ac_count=$as_val
11558    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11559      # Best one so far, save it but keep looking for a better one
11560      ac_cv_path_GREP="$ac_path_GREP"
11561      ac_path_GREP_max=$ac_count
11562    fi
11563    # 10*(2^10) chars as input seems more than enough
11564    test $ac_count -gt 10 && break
11565  done
11566  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11567esac
11568
11569      $ac_path_GREP_found && break 3
11570    done
11571  done
11572  done
11573IFS=$as_save_IFS
11574  if test -z "$ac_cv_path_GREP"; then
11575    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11576  fi
11577else
11578  ac_cv_path_GREP=$GREP
11579fi
11580
11581fi
11582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11583$as_echo "$ac_cv_path_GREP" >&6; }
11584 GREP="$ac_cv_path_GREP"
11585
11586
11587    else
11588      # If it succeeded, then it was overridden by the user. We will use it
11589      # for the tool.
11590
11591      # First remove it from the list of overridden variables, so we can test
11592      # for unknown variables in the end.
11593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11594
11595      # Check if the provided tool contains a complete path.
11596      tool_specified="$GREP"
11597      tool_basename="${tool_specified##*/}"
11598      if test "x$tool_basename" = "x$tool_specified"; then
11599        # A command without a complete path is provided, search $PATH.
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11601$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11602        # Extract the first word of "$tool_basename", so it can be a program name with args.
11603set dummy $tool_basename; ac_word=$2
11604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11605$as_echo_n "checking for $ac_word... " >&6; }
11606if ${ac_cv_path_GREP+:} false; then :
11607  $as_echo_n "(cached) " >&6
11608else
11609  case $GREP in
11610  [\\/]* | ?:[\\/]*)
11611  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11612  ;;
11613  *)
11614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615for as_dir in $PATH
11616do
11617  IFS=$as_save_IFS
11618  test -z "$as_dir" && as_dir=.
11619    for ac_exec_ext in '' $ac_executable_extensions; do
11620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11621    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11623    break 2
11624  fi
11625done
11626  done
11627IFS=$as_save_IFS
11628
11629  ;;
11630esac
11631fi
11632GREP=$ac_cv_path_GREP
11633if test -n "$GREP"; then
11634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11635$as_echo "$GREP" >&6; }
11636else
11637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11638$as_echo "no" >&6; }
11639fi
11640
11641
11642        if test "x$GREP" = x; then
11643          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11644        fi
11645      else
11646        # Otherwise we believe it is a complete path. Use it as it is.
11647        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11648$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11650$as_echo_n "checking for GREP... " >&6; }
11651        if test ! -x "$tool_specified"; then
11652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11653$as_echo "not found" >&6; }
11654          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11655        fi
11656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11657$as_echo "$tool_specified" >&6; }
11658      fi
11659    fi
11660  fi
11661
11662
11663  if test "x$GREP" = x; then
11664    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11665  fi
11666
11667
11668
11669
11670  # Publish this variable in the help.
11671
11672
11673  if test "x$EGREP" = x; then
11674    # The variable is not set by user, try to locate tool using the code snippet
11675    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11676$as_echo_n "checking for egrep... " >&6; }
11677if ${ac_cv_path_EGREP+:} false; then :
11678  $as_echo_n "(cached) " >&6
11679else
11680  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11681   then ac_cv_path_EGREP="$GREP -E"
11682   else
11683     if test -z "$EGREP"; then
11684  ac_path_EGREP_found=false
11685  # Loop through the user's path and test for each of PROGNAME-LIST
11686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11687for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11688do
11689  IFS=$as_save_IFS
11690  test -z "$as_dir" && as_dir=.
11691    for ac_prog in egrep; do
11692    for ac_exec_ext in '' $ac_executable_extensions; do
11693      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11694      as_fn_executable_p "$ac_path_EGREP" || continue
11695# Check for GNU ac_path_EGREP and select it if it is found.
11696  # Check for GNU $ac_path_EGREP
11697case `"$ac_path_EGREP" --version 2>&1` in
11698*GNU*)
11699  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11700*)
11701  ac_count=0
11702  $as_echo_n 0123456789 >"conftest.in"
11703  while :
11704  do
11705    cat "conftest.in" "conftest.in" >"conftest.tmp"
11706    mv "conftest.tmp" "conftest.in"
11707    cp "conftest.in" "conftest.nl"
11708    $as_echo 'EGREP' >> "conftest.nl"
11709    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11710    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11711    as_fn_arith $ac_count + 1 && ac_count=$as_val
11712    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11713      # Best one so far, save it but keep looking for a better one
11714      ac_cv_path_EGREP="$ac_path_EGREP"
11715      ac_path_EGREP_max=$ac_count
11716    fi
11717    # 10*(2^10) chars as input seems more than enough
11718    test $ac_count -gt 10 && break
11719  done
11720  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11721esac
11722
11723      $ac_path_EGREP_found && break 3
11724    done
11725  done
11726  done
11727IFS=$as_save_IFS
11728  if test -z "$ac_cv_path_EGREP"; then
11729    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11730  fi
11731else
11732  ac_cv_path_EGREP=$EGREP
11733fi
11734
11735   fi
11736fi
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11738$as_echo "$ac_cv_path_EGREP" >&6; }
11739 EGREP="$ac_cv_path_EGREP"
11740
11741
11742  else
11743    # The variable is set, but is it from the command line or the environment?
11744
11745    # Try to remove the string !EGREP! from our list.
11746    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11747    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11748      # If it failed, the variable was not from the command line. Ignore it,
11749      # but warn the user (except for BASH, which is always set by the calling BASH).
11750      if test "xEGREP" != xBASH; then
11751        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11752$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11753      fi
11754      # Try to locate tool using the code snippet
11755      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11756$as_echo_n "checking for egrep... " >&6; }
11757if ${ac_cv_path_EGREP+:} false; then :
11758  $as_echo_n "(cached) " >&6
11759else
11760  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11761   then ac_cv_path_EGREP="$GREP -E"
11762   else
11763     if test -z "$EGREP"; then
11764  ac_path_EGREP_found=false
11765  # Loop through the user's path and test for each of PROGNAME-LIST
11766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11767for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11768do
11769  IFS=$as_save_IFS
11770  test -z "$as_dir" && as_dir=.
11771    for ac_prog in egrep; do
11772    for ac_exec_ext in '' $ac_executable_extensions; do
11773      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11774      as_fn_executable_p "$ac_path_EGREP" || continue
11775# Check for GNU ac_path_EGREP and select it if it is found.
11776  # Check for GNU $ac_path_EGREP
11777case `"$ac_path_EGREP" --version 2>&1` in
11778*GNU*)
11779  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11780*)
11781  ac_count=0
11782  $as_echo_n 0123456789 >"conftest.in"
11783  while :
11784  do
11785    cat "conftest.in" "conftest.in" >"conftest.tmp"
11786    mv "conftest.tmp" "conftest.in"
11787    cp "conftest.in" "conftest.nl"
11788    $as_echo 'EGREP' >> "conftest.nl"
11789    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11790    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11791    as_fn_arith $ac_count + 1 && ac_count=$as_val
11792    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11793      # Best one so far, save it but keep looking for a better one
11794      ac_cv_path_EGREP="$ac_path_EGREP"
11795      ac_path_EGREP_max=$ac_count
11796    fi
11797    # 10*(2^10) chars as input seems more than enough
11798    test $ac_count -gt 10 && break
11799  done
11800  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11801esac
11802
11803      $ac_path_EGREP_found && break 3
11804    done
11805  done
11806  done
11807IFS=$as_save_IFS
11808  if test -z "$ac_cv_path_EGREP"; then
11809    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11810  fi
11811else
11812  ac_cv_path_EGREP=$EGREP
11813fi
11814
11815   fi
11816fi
11817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11818$as_echo "$ac_cv_path_EGREP" >&6; }
11819 EGREP="$ac_cv_path_EGREP"
11820
11821
11822    else
11823      # If it succeeded, then it was overridden by the user. We will use it
11824      # for the tool.
11825
11826      # First remove it from the list of overridden variables, so we can test
11827      # for unknown variables in the end.
11828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11829
11830      # Check if the provided tool contains a complete path.
11831      tool_specified="$EGREP"
11832      tool_basename="${tool_specified##*/}"
11833      if test "x$tool_basename" = "x$tool_specified"; then
11834        # A command without a complete path is provided, search $PATH.
11835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11836$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11837        # Extract the first word of "$tool_basename", so it can be a program name with args.
11838set dummy $tool_basename; ac_word=$2
11839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11840$as_echo_n "checking for $ac_word... " >&6; }
11841if ${ac_cv_path_EGREP+:} false; then :
11842  $as_echo_n "(cached) " >&6
11843else
11844  case $EGREP in
11845  [\\/]* | ?:[\\/]*)
11846  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11847  ;;
11848  *)
11849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11850for as_dir in $PATH
11851do
11852  IFS=$as_save_IFS
11853  test -z "$as_dir" && as_dir=.
11854    for ac_exec_ext in '' $ac_executable_extensions; do
11855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11856    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11858    break 2
11859  fi
11860done
11861  done
11862IFS=$as_save_IFS
11863
11864  ;;
11865esac
11866fi
11867EGREP=$ac_cv_path_EGREP
11868if test -n "$EGREP"; then
11869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11870$as_echo "$EGREP" >&6; }
11871else
11872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11873$as_echo "no" >&6; }
11874fi
11875
11876
11877        if test "x$EGREP" = x; then
11878          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11879        fi
11880      else
11881        # Otherwise we believe it is a complete path. Use it as it is.
11882        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11883$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11885$as_echo_n "checking for EGREP... " >&6; }
11886        if test ! -x "$tool_specified"; then
11887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11888$as_echo "not found" >&6; }
11889          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11890        fi
11891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11892$as_echo "$tool_specified" >&6; }
11893      fi
11894    fi
11895  fi
11896
11897
11898  if test "x$EGREP" = x; then
11899    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11900  fi
11901
11902
11903
11904
11905  # Publish this variable in the help.
11906
11907
11908  if test "x$FGREP" = x; then
11909    # The variable is not set by user, try to locate tool using the code snippet
11910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11911$as_echo_n "checking for fgrep... " >&6; }
11912if ${ac_cv_path_FGREP+:} false; then :
11913  $as_echo_n "(cached) " >&6
11914else
11915  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11916   then ac_cv_path_FGREP="$GREP -F"
11917   else
11918     if test -z "$FGREP"; then
11919  ac_path_FGREP_found=false
11920  # Loop through the user's path and test for each of PROGNAME-LIST
11921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11922for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11923do
11924  IFS=$as_save_IFS
11925  test -z "$as_dir" && as_dir=.
11926    for ac_prog in fgrep; do
11927    for ac_exec_ext in '' $ac_executable_extensions; do
11928      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11929      as_fn_executable_p "$ac_path_FGREP" || continue
11930# Check for GNU ac_path_FGREP and select it if it is found.
11931  # Check for GNU $ac_path_FGREP
11932case `"$ac_path_FGREP" --version 2>&1` in
11933*GNU*)
11934  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11935*)
11936  ac_count=0
11937  $as_echo_n 0123456789 >"conftest.in"
11938  while :
11939  do
11940    cat "conftest.in" "conftest.in" >"conftest.tmp"
11941    mv "conftest.tmp" "conftest.in"
11942    cp "conftest.in" "conftest.nl"
11943    $as_echo 'FGREP' >> "conftest.nl"
11944    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11945    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11946    as_fn_arith $ac_count + 1 && ac_count=$as_val
11947    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11948      # Best one so far, save it but keep looking for a better one
11949      ac_cv_path_FGREP="$ac_path_FGREP"
11950      ac_path_FGREP_max=$ac_count
11951    fi
11952    # 10*(2^10) chars as input seems more than enough
11953    test $ac_count -gt 10 && break
11954  done
11955  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11956esac
11957
11958      $ac_path_FGREP_found && break 3
11959    done
11960  done
11961  done
11962IFS=$as_save_IFS
11963  if test -z "$ac_cv_path_FGREP"; then
11964    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11965  fi
11966else
11967  ac_cv_path_FGREP=$FGREP
11968fi
11969
11970   fi
11971fi
11972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
11973$as_echo "$ac_cv_path_FGREP" >&6; }
11974 FGREP="$ac_cv_path_FGREP"
11975
11976
11977  else
11978    # The variable is set, but is it from the command line or the environment?
11979
11980    # Try to remove the string !FGREP! from our list.
11981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
11982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11983      # If it failed, the variable was not from the command line. Ignore it,
11984      # but warn the user (except for BASH, which is always set by the calling BASH).
11985      if test "xFGREP" != xBASH; then
11986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
11987$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
11988      fi
11989      # Try to locate tool using the code snippet
11990      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11991$as_echo_n "checking for fgrep... " >&6; }
11992if ${ac_cv_path_FGREP+:} false; then :
11993  $as_echo_n "(cached) " >&6
11994else
11995  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11996   then ac_cv_path_FGREP="$GREP -F"
11997   else
11998     if test -z "$FGREP"; then
11999  ac_path_FGREP_found=false
12000  # Loop through the user's path and test for each of PROGNAME-LIST
12001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12003do
12004  IFS=$as_save_IFS
12005  test -z "$as_dir" && as_dir=.
12006    for ac_prog in fgrep; do
12007    for ac_exec_ext in '' $ac_executable_extensions; do
12008      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12009      as_fn_executable_p "$ac_path_FGREP" || continue
12010# Check for GNU ac_path_FGREP and select it if it is found.
12011  # Check for GNU $ac_path_FGREP
12012case `"$ac_path_FGREP" --version 2>&1` in
12013*GNU*)
12014  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12015*)
12016  ac_count=0
12017  $as_echo_n 0123456789 >"conftest.in"
12018  while :
12019  do
12020    cat "conftest.in" "conftest.in" >"conftest.tmp"
12021    mv "conftest.tmp" "conftest.in"
12022    cp "conftest.in" "conftest.nl"
12023    $as_echo 'FGREP' >> "conftest.nl"
12024    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12025    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12026    as_fn_arith $ac_count + 1 && ac_count=$as_val
12027    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12028      # Best one so far, save it but keep looking for a better one
12029      ac_cv_path_FGREP="$ac_path_FGREP"
12030      ac_path_FGREP_max=$ac_count
12031    fi
12032    # 10*(2^10) chars as input seems more than enough
12033    test $ac_count -gt 10 && break
12034  done
12035  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12036esac
12037
12038      $ac_path_FGREP_found && break 3
12039    done
12040  done
12041  done
12042IFS=$as_save_IFS
12043  if test -z "$ac_cv_path_FGREP"; then
12044    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12045  fi
12046else
12047  ac_cv_path_FGREP=$FGREP
12048fi
12049
12050   fi
12051fi
12052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12053$as_echo "$ac_cv_path_FGREP" >&6; }
12054 FGREP="$ac_cv_path_FGREP"
12055
12056
12057    else
12058      # If it succeeded, then it was overridden by the user. We will use it
12059      # for the tool.
12060
12061      # First remove it from the list of overridden variables, so we can test
12062      # for unknown variables in the end.
12063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12064
12065      # Check if the provided tool contains a complete path.
12066      tool_specified="$FGREP"
12067      tool_basename="${tool_specified##*/}"
12068      if test "x$tool_basename" = "x$tool_specified"; then
12069        # A command without a complete path is provided, search $PATH.
12070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12071$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12072        # Extract the first word of "$tool_basename", so it can be a program name with args.
12073set dummy $tool_basename; ac_word=$2
12074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12075$as_echo_n "checking for $ac_word... " >&6; }
12076if ${ac_cv_path_FGREP+:} false; then :
12077  $as_echo_n "(cached) " >&6
12078else
12079  case $FGREP in
12080  [\\/]* | ?:[\\/]*)
12081  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12082  ;;
12083  *)
12084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12085for as_dir in $PATH
12086do
12087  IFS=$as_save_IFS
12088  test -z "$as_dir" && as_dir=.
12089    for ac_exec_ext in '' $ac_executable_extensions; do
12090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12091    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12093    break 2
12094  fi
12095done
12096  done
12097IFS=$as_save_IFS
12098
12099  ;;
12100esac
12101fi
12102FGREP=$ac_cv_path_FGREP
12103if test -n "$FGREP"; then
12104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12105$as_echo "$FGREP" >&6; }
12106else
12107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12108$as_echo "no" >&6; }
12109fi
12110
12111
12112        if test "x$FGREP" = x; then
12113          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12114        fi
12115      else
12116        # Otherwise we believe it is a complete path. Use it as it is.
12117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12118$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12120$as_echo_n "checking for FGREP... " >&6; }
12121        if test ! -x "$tool_specified"; then
12122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12123$as_echo "not found" >&6; }
12124          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12125        fi
12126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12127$as_echo "$tool_specified" >&6; }
12128      fi
12129    fi
12130  fi
12131
12132
12133  if test "x$FGREP" = x; then
12134    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12135  fi
12136
12137
12138
12139
12140  # Publish this variable in the help.
12141
12142
12143  if test "x$SED" = x; then
12144    # The variable is not set by user, try to locate tool using the code snippet
12145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12146$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12147if ${ac_cv_path_SED+:} false; then :
12148  $as_echo_n "(cached) " >&6
12149else
12150            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12151     for ac_i in 1 2 3 4 5 6 7; do
12152       ac_script="$ac_script$as_nl$ac_script"
12153     done
12154     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12155     { ac_script=; unset ac_script;}
12156     if test -z "$SED"; then
12157  ac_path_SED_found=false
12158  # Loop through the user's path and test for each of PROGNAME-LIST
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_prog in sed gsed; do
12165    for ac_exec_ext in '' $ac_executable_extensions; do
12166      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12167      as_fn_executable_p "$ac_path_SED" || continue
12168# Check for GNU ac_path_SED and select it if it is found.
12169  # Check for GNU $ac_path_SED
12170case `"$ac_path_SED" --version 2>&1` in
12171*GNU*)
12172  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12173*)
12174  ac_count=0
12175  $as_echo_n 0123456789 >"conftest.in"
12176  while :
12177  do
12178    cat "conftest.in" "conftest.in" >"conftest.tmp"
12179    mv "conftest.tmp" "conftest.in"
12180    cp "conftest.in" "conftest.nl"
12181    $as_echo '' >> "conftest.nl"
12182    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12183    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12184    as_fn_arith $ac_count + 1 && ac_count=$as_val
12185    if test $ac_count -gt ${ac_path_SED_max-0}; then
12186      # Best one so far, save it but keep looking for a better one
12187      ac_cv_path_SED="$ac_path_SED"
12188      ac_path_SED_max=$ac_count
12189    fi
12190    # 10*(2^10) chars as input seems more than enough
12191    test $ac_count -gt 10 && break
12192  done
12193  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12194esac
12195
12196      $ac_path_SED_found && break 3
12197    done
12198  done
12199  done
12200IFS=$as_save_IFS
12201  if test -z "$ac_cv_path_SED"; then
12202    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12203  fi
12204else
12205  ac_cv_path_SED=$SED
12206fi
12207
12208fi
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12210$as_echo "$ac_cv_path_SED" >&6; }
12211 SED="$ac_cv_path_SED"
12212  rm -f conftest.sed
12213
12214  else
12215    # The variable is set, but is it from the command line or the environment?
12216
12217    # Try to remove the string !SED! from our list.
12218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12220      # If it failed, the variable was not from the command line. Ignore it,
12221      # but warn the user (except for BASH, which is always set by the calling BASH).
12222      if test "xSED" != xBASH; then
12223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12224$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12225      fi
12226      # Try to locate tool using the code snippet
12227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12228$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12229if ${ac_cv_path_SED+:} false; then :
12230  $as_echo_n "(cached) " >&6
12231else
12232            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12233     for ac_i in 1 2 3 4 5 6 7; do
12234       ac_script="$ac_script$as_nl$ac_script"
12235     done
12236     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12237     { ac_script=; unset ac_script;}
12238     if test -z "$SED"; then
12239  ac_path_SED_found=false
12240  # Loop through the user's path and test for each of PROGNAME-LIST
12241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12242for as_dir in $PATH
12243do
12244  IFS=$as_save_IFS
12245  test -z "$as_dir" && as_dir=.
12246    for ac_prog in sed gsed; do
12247    for ac_exec_ext in '' $ac_executable_extensions; do
12248      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12249      as_fn_executable_p "$ac_path_SED" || continue
12250# Check for GNU ac_path_SED and select it if it is found.
12251  # Check for GNU $ac_path_SED
12252case `"$ac_path_SED" --version 2>&1` in
12253*GNU*)
12254  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12255*)
12256  ac_count=0
12257  $as_echo_n 0123456789 >"conftest.in"
12258  while :
12259  do
12260    cat "conftest.in" "conftest.in" >"conftest.tmp"
12261    mv "conftest.tmp" "conftest.in"
12262    cp "conftest.in" "conftest.nl"
12263    $as_echo '' >> "conftest.nl"
12264    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12265    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12266    as_fn_arith $ac_count + 1 && ac_count=$as_val
12267    if test $ac_count -gt ${ac_path_SED_max-0}; then
12268      # Best one so far, save it but keep looking for a better one
12269      ac_cv_path_SED="$ac_path_SED"
12270      ac_path_SED_max=$ac_count
12271    fi
12272    # 10*(2^10) chars as input seems more than enough
12273    test $ac_count -gt 10 && break
12274  done
12275  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12276esac
12277
12278      $ac_path_SED_found && break 3
12279    done
12280  done
12281  done
12282IFS=$as_save_IFS
12283  if test -z "$ac_cv_path_SED"; then
12284    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12285  fi
12286else
12287  ac_cv_path_SED=$SED
12288fi
12289
12290fi
12291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12292$as_echo "$ac_cv_path_SED" >&6; }
12293 SED="$ac_cv_path_SED"
12294  rm -f conftest.sed
12295
12296    else
12297      # If it succeeded, then it was overridden by the user. We will use it
12298      # for the tool.
12299
12300      # First remove it from the list of overridden variables, so we can test
12301      # for unknown variables in the end.
12302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12303
12304      # Check if the provided tool contains a complete path.
12305      tool_specified="$SED"
12306      tool_basename="${tool_specified##*/}"
12307      if test "x$tool_basename" = "x$tool_specified"; then
12308        # A command without a complete path is provided, search $PATH.
12309        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12310$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12311        # Extract the first word of "$tool_basename", so it can be a program name with args.
12312set dummy $tool_basename; ac_word=$2
12313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12314$as_echo_n "checking for $ac_word... " >&6; }
12315if ${ac_cv_path_SED+:} false; then :
12316  $as_echo_n "(cached) " >&6
12317else
12318  case $SED in
12319  [\\/]* | ?:[\\/]*)
12320  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12321  ;;
12322  *)
12323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12324for as_dir in $PATH
12325do
12326  IFS=$as_save_IFS
12327  test -z "$as_dir" && as_dir=.
12328    for ac_exec_ext in '' $ac_executable_extensions; do
12329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12330    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12332    break 2
12333  fi
12334done
12335  done
12336IFS=$as_save_IFS
12337
12338  ;;
12339esac
12340fi
12341SED=$ac_cv_path_SED
12342if test -n "$SED"; then
12343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12344$as_echo "$SED" >&6; }
12345else
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
12348fi
12349
12350
12351        if test "x$SED" = x; then
12352          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12353        fi
12354      else
12355        # Otherwise we believe it is a complete path. Use it as it is.
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12357$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12359$as_echo_n "checking for SED... " >&6; }
12360        if test ! -x "$tool_specified"; then
12361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12362$as_echo "not found" >&6; }
12363          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12364        fi
12365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12366$as_echo "$tool_specified" >&6; }
12367      fi
12368    fi
12369  fi
12370
12371
12372  if test "x$SED" = x; then
12373    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12374  fi
12375
12376
12377
12378  # Always force rm.
12379  RM="$RM -f"
12380
12381  # pwd behaves differently on various platforms and some don't support the -L flag.
12382  # Always use the bash builtin pwd to get uniform behavior.
12383  THEPWDCMD=pwd
12384
12385  # These are not required on all platforms
12386
12387
12388  # Publish this variable in the help.
12389
12390
12391  if test "x$CYGPATH" = x; then
12392    # The variable is not set by user, try to locate tool using the code snippet
12393    for ac_prog in cygpath
12394do
12395  # Extract the first word of "$ac_prog", so it can be a program name with args.
12396set dummy $ac_prog; ac_word=$2
12397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12398$as_echo_n "checking for $ac_word... " >&6; }
12399if ${ac_cv_path_CYGPATH+:} false; then :
12400  $as_echo_n "(cached) " >&6
12401else
12402  case $CYGPATH in
12403  [\\/]* | ?:[\\/]*)
12404  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12405  ;;
12406  *)
12407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12408for as_dir in $PATH
12409do
12410  IFS=$as_save_IFS
12411  test -z "$as_dir" && as_dir=.
12412    for ac_exec_ext in '' $ac_executable_extensions; do
12413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12414    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12416    break 2
12417  fi
12418done
12419  done
12420IFS=$as_save_IFS
12421
12422  ;;
12423esac
12424fi
12425CYGPATH=$ac_cv_path_CYGPATH
12426if test -n "$CYGPATH"; then
12427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12428$as_echo "$CYGPATH" >&6; }
12429else
12430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12431$as_echo "no" >&6; }
12432fi
12433
12434
12435  test -n "$CYGPATH" && break
12436done
12437
12438  else
12439    # The variable is set, but is it from the command line or the environment?
12440
12441    # Try to remove the string !CYGPATH! from our list.
12442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12444      # If it failed, the variable was not from the command line. Ignore it,
12445      # but warn the user (except for BASH, which is always set by the calling BASH).
12446      if test "xCYGPATH" != xBASH; then
12447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12448$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12449      fi
12450      # Try to locate tool using the code snippet
12451      for ac_prog in cygpath
12452do
12453  # Extract the first word of "$ac_prog", so it can be a program name with args.
12454set dummy $ac_prog; ac_word=$2
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456$as_echo_n "checking for $ac_word... " >&6; }
12457if ${ac_cv_path_CYGPATH+:} false; then :
12458  $as_echo_n "(cached) " >&6
12459else
12460  case $CYGPATH in
12461  [\\/]* | ?:[\\/]*)
12462  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12463  ;;
12464  *)
12465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466for as_dir in $PATH
12467do
12468  IFS=$as_save_IFS
12469  test -z "$as_dir" && as_dir=.
12470    for ac_exec_ext in '' $ac_executable_extensions; do
12471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12472    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474    break 2
12475  fi
12476done
12477  done
12478IFS=$as_save_IFS
12479
12480  ;;
12481esac
12482fi
12483CYGPATH=$ac_cv_path_CYGPATH
12484if test -n "$CYGPATH"; then
12485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12486$as_echo "$CYGPATH" >&6; }
12487else
12488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489$as_echo "no" >&6; }
12490fi
12491
12492
12493  test -n "$CYGPATH" && break
12494done
12495
12496    else
12497      # If it succeeded, then it was overridden by the user. We will use it
12498      # for the tool.
12499
12500      # First remove it from the list of overridden variables, so we can test
12501      # for unknown variables in the end.
12502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12503
12504      # Check if the provided tool contains a complete path.
12505      tool_specified="$CYGPATH"
12506      tool_basename="${tool_specified##*/}"
12507      if test "x$tool_basename" = "x$tool_specified"; then
12508        # A command without a complete path is provided, search $PATH.
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12510$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12511        # Extract the first word of "$tool_basename", so it can be a program name with args.
12512set dummy $tool_basename; ac_word=$2
12513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12514$as_echo_n "checking for $ac_word... " >&6; }
12515if ${ac_cv_path_CYGPATH+:} false; then :
12516  $as_echo_n "(cached) " >&6
12517else
12518  case $CYGPATH in
12519  [\\/]* | ?:[\\/]*)
12520  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12521  ;;
12522  *)
12523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12524for as_dir in $PATH
12525do
12526  IFS=$as_save_IFS
12527  test -z "$as_dir" && as_dir=.
12528    for ac_exec_ext in '' $ac_executable_extensions; do
12529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12530    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12532    break 2
12533  fi
12534done
12535  done
12536IFS=$as_save_IFS
12537
12538  ;;
12539esac
12540fi
12541CYGPATH=$ac_cv_path_CYGPATH
12542if test -n "$CYGPATH"; then
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12544$as_echo "$CYGPATH" >&6; }
12545else
12546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12547$as_echo "no" >&6; }
12548fi
12549
12550
12551        if test "x$CYGPATH" = x; then
12552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12553        fi
12554      else
12555        # Otherwise we believe it is a complete path. Use it as it is.
12556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12557$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12559$as_echo_n "checking for CYGPATH... " >&6; }
12560        if test ! -x "$tool_specified"; then
12561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12562$as_echo "not found" >&6; }
12563          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12564        fi
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12566$as_echo "$tool_specified" >&6; }
12567      fi
12568    fi
12569  fi
12570
12571
12572
12573
12574  # Publish this variable in the help.
12575
12576
12577  if test "x$READLINK" = x; then
12578    # The variable is not set by user, try to locate tool using the code snippet
12579    for ac_prog in greadlink readlink
12580do
12581  # Extract the first word of "$ac_prog", so it can be a program name with args.
12582set dummy $ac_prog; ac_word=$2
12583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584$as_echo_n "checking for $ac_word... " >&6; }
12585if ${ac_cv_path_READLINK+:} false; then :
12586  $as_echo_n "(cached) " >&6
12587else
12588  case $READLINK in
12589  [\\/]* | ?:[\\/]*)
12590  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12591  ;;
12592  *)
12593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12594for as_dir in $PATH
12595do
12596  IFS=$as_save_IFS
12597  test -z "$as_dir" && as_dir=.
12598    for ac_exec_ext in '' $ac_executable_extensions; do
12599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12600    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12602    break 2
12603  fi
12604done
12605  done
12606IFS=$as_save_IFS
12607
12608  ;;
12609esac
12610fi
12611READLINK=$ac_cv_path_READLINK
12612if test -n "$READLINK"; then
12613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12614$as_echo "$READLINK" >&6; }
12615else
12616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617$as_echo "no" >&6; }
12618fi
12619
12620
12621  test -n "$READLINK" && break
12622done
12623
12624  else
12625    # The variable is set, but is it from the command line or the environment?
12626
12627    # Try to remove the string !READLINK! from our list.
12628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12630      # If it failed, the variable was not from the command line. Ignore it,
12631      # but warn the user (except for BASH, which is always set by the calling BASH).
12632      if test "xREADLINK" != xBASH; then
12633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12634$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12635      fi
12636      # Try to locate tool using the code snippet
12637      for ac_prog in greadlink readlink
12638do
12639  # Extract the first word of "$ac_prog", so it can be a program name with args.
12640set dummy $ac_prog; ac_word=$2
12641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12642$as_echo_n "checking for $ac_word... " >&6; }
12643if ${ac_cv_path_READLINK+:} false; then :
12644  $as_echo_n "(cached) " >&6
12645else
12646  case $READLINK in
12647  [\\/]* | ?:[\\/]*)
12648  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12649  ;;
12650  *)
12651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12652for as_dir in $PATH
12653do
12654  IFS=$as_save_IFS
12655  test -z "$as_dir" && as_dir=.
12656    for ac_exec_ext in '' $ac_executable_extensions; do
12657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12658    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12660    break 2
12661  fi
12662done
12663  done
12664IFS=$as_save_IFS
12665
12666  ;;
12667esac
12668fi
12669READLINK=$ac_cv_path_READLINK
12670if test -n "$READLINK"; then
12671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12672$as_echo "$READLINK" >&6; }
12673else
12674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12675$as_echo "no" >&6; }
12676fi
12677
12678
12679  test -n "$READLINK" && break
12680done
12681
12682    else
12683      # If it succeeded, then it was overridden by the user. We will use it
12684      # for the tool.
12685
12686      # First remove it from the list of overridden variables, so we can test
12687      # for unknown variables in the end.
12688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12689
12690      # Check if the provided tool contains a complete path.
12691      tool_specified="$READLINK"
12692      tool_basename="${tool_specified##*/}"
12693      if test "x$tool_basename" = "x$tool_specified"; then
12694        # A command without a complete path is provided, search $PATH.
12695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12696$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12697        # Extract the first word of "$tool_basename", so it can be a program name with args.
12698set dummy $tool_basename; ac_word=$2
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700$as_echo_n "checking for $ac_word... " >&6; }
12701if ${ac_cv_path_READLINK+:} false; then :
12702  $as_echo_n "(cached) " >&6
12703else
12704  case $READLINK in
12705  [\\/]* | ?:[\\/]*)
12706  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12707  ;;
12708  *)
12709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712  IFS=$as_save_IFS
12713  test -z "$as_dir" && as_dir=.
12714    for ac_exec_ext in '' $ac_executable_extensions; do
12715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718    break 2
12719  fi
12720done
12721  done
12722IFS=$as_save_IFS
12723
12724  ;;
12725esac
12726fi
12727READLINK=$ac_cv_path_READLINK
12728if test -n "$READLINK"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12730$as_echo "$READLINK" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737        if test "x$READLINK" = x; then
12738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12739        fi
12740      else
12741        # Otherwise we believe it is a complete path. Use it as it is.
12742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12743$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12745$as_echo_n "checking for READLINK... " >&6; }
12746        if test ! -x "$tool_specified"; then
12747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12748$as_echo "not found" >&6; }
12749          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12750        fi
12751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12752$as_echo "$tool_specified" >&6; }
12753      fi
12754    fi
12755  fi
12756
12757
12758
12759
12760  # Publish this variable in the help.
12761
12762
12763  if test "x$DF" = x; then
12764    # The variable is not set by user, try to locate tool using the code snippet
12765    for ac_prog in df
12766do
12767  # Extract the first word of "$ac_prog", so it can be a program name with args.
12768set dummy $ac_prog; ac_word=$2
12769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12770$as_echo_n "checking for $ac_word... " >&6; }
12771if ${ac_cv_path_DF+:} false; then :
12772  $as_echo_n "(cached) " >&6
12773else
12774  case $DF in
12775  [\\/]* | ?:[\\/]*)
12776  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12777  ;;
12778  *)
12779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780for as_dir in $PATH
12781do
12782  IFS=$as_save_IFS
12783  test -z "$as_dir" && as_dir=.
12784    for ac_exec_ext in '' $ac_executable_extensions; do
12785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12786    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12788    break 2
12789  fi
12790done
12791  done
12792IFS=$as_save_IFS
12793
12794  ;;
12795esac
12796fi
12797DF=$ac_cv_path_DF
12798if test -n "$DF"; then
12799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12800$as_echo "$DF" >&6; }
12801else
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12803$as_echo "no" >&6; }
12804fi
12805
12806
12807  test -n "$DF" && break
12808done
12809
12810  else
12811    # The variable is set, but is it from the command line or the environment?
12812
12813    # Try to remove the string !DF! from our list.
12814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12816      # If it failed, the variable was not from the command line. Ignore it,
12817      # but warn the user (except for BASH, which is always set by the calling BASH).
12818      if test "xDF" != xBASH; then
12819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12820$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12821      fi
12822      # Try to locate tool using the code snippet
12823      for ac_prog in df
12824do
12825  # Extract the first word of "$ac_prog", so it can be a program name with args.
12826set dummy $ac_prog; ac_word=$2
12827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12828$as_echo_n "checking for $ac_word... " >&6; }
12829if ${ac_cv_path_DF+:} false; then :
12830  $as_echo_n "(cached) " >&6
12831else
12832  case $DF in
12833  [\\/]* | ?:[\\/]*)
12834  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12835  ;;
12836  *)
12837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12838for as_dir in $PATH
12839do
12840  IFS=$as_save_IFS
12841  test -z "$as_dir" && as_dir=.
12842    for ac_exec_ext in '' $ac_executable_extensions; do
12843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12844    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12846    break 2
12847  fi
12848done
12849  done
12850IFS=$as_save_IFS
12851
12852  ;;
12853esac
12854fi
12855DF=$ac_cv_path_DF
12856if test -n "$DF"; then
12857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12858$as_echo "$DF" >&6; }
12859else
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
12862fi
12863
12864
12865  test -n "$DF" && break
12866done
12867
12868    else
12869      # If it succeeded, then it was overridden by the user. We will use it
12870      # for the tool.
12871
12872      # First remove it from the list of overridden variables, so we can test
12873      # for unknown variables in the end.
12874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12875
12876      # Check if the provided tool contains a complete path.
12877      tool_specified="$DF"
12878      tool_basename="${tool_specified##*/}"
12879      if test "x$tool_basename" = "x$tool_specified"; then
12880        # A command without a complete path is provided, search $PATH.
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12882$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12883        # Extract the first word of "$tool_basename", so it can be a program name with args.
12884set dummy $tool_basename; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_DF+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $DF in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913DF=$ac_cv_path_DF
12914if test -n "$DF"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12916$as_echo "$DF" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923        if test "x$DF" = x; then
12924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12925        fi
12926      else
12927        # Otherwise we believe it is a complete path. Use it as it is.
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12929$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12931$as_echo_n "checking for DF... " >&6; }
12932        if test ! -x "$tool_specified"; then
12933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12936        fi
12937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12938$as_echo "$tool_specified" >&6; }
12939      fi
12940    fi
12941  fi
12942
12943
12944
12945
12946  # Publish this variable in the help.
12947
12948
12949  if test "x$SETFILE" = x; then
12950    # The variable is not set by user, try to locate tool using the code snippet
12951    for ac_prog in SetFile
12952do
12953  # Extract the first word of "$ac_prog", so it can be a program name with args.
12954set dummy $ac_prog; ac_word=$2
12955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12956$as_echo_n "checking for $ac_word... " >&6; }
12957if ${ac_cv_path_SETFILE+:} false; then :
12958  $as_echo_n "(cached) " >&6
12959else
12960  case $SETFILE in
12961  [\\/]* | ?:[\\/]*)
12962  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12963  ;;
12964  *)
12965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12966for as_dir in $PATH
12967do
12968  IFS=$as_save_IFS
12969  test -z "$as_dir" && as_dir=.
12970    for ac_exec_ext in '' $ac_executable_extensions; do
12971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12972    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
12973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12974    break 2
12975  fi
12976done
12977  done
12978IFS=$as_save_IFS
12979
12980  ;;
12981esac
12982fi
12983SETFILE=$ac_cv_path_SETFILE
12984if test -n "$SETFILE"; then
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
12986$as_echo "$SETFILE" >&6; }
12987else
12988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12989$as_echo "no" >&6; }
12990fi
12991
12992
12993  test -n "$SETFILE" && break
12994done
12995
12996  else
12997    # The variable is set, but is it from the command line or the environment?
12998
12999    # Try to remove the string !SETFILE! from our list.
13000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13002      # If it failed, the variable was not from the command line. Ignore it,
13003      # but warn the user (except for BASH, which is always set by the calling BASH).
13004      if test "xSETFILE" != xBASH; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13006$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13007      fi
13008      # Try to locate tool using the code snippet
13009      for ac_prog in SetFile
13010do
13011  # Extract the first word of "$ac_prog", so it can be a program name with args.
13012set dummy $ac_prog; ac_word=$2
13013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13014$as_echo_n "checking for $ac_word... " >&6; }
13015if ${ac_cv_path_SETFILE+:} false; then :
13016  $as_echo_n "(cached) " >&6
13017else
13018  case $SETFILE in
13019  [\\/]* | ?:[\\/]*)
13020  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13021  ;;
13022  *)
13023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13024for as_dir in $PATH
13025do
13026  IFS=$as_save_IFS
13027  test -z "$as_dir" && as_dir=.
13028    for ac_exec_ext in '' $ac_executable_extensions; do
13029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13030    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13032    break 2
13033  fi
13034done
13035  done
13036IFS=$as_save_IFS
13037
13038  ;;
13039esac
13040fi
13041SETFILE=$ac_cv_path_SETFILE
13042if test -n "$SETFILE"; then
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13044$as_echo "$SETFILE" >&6; }
13045else
13046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13047$as_echo "no" >&6; }
13048fi
13049
13050
13051  test -n "$SETFILE" && break
13052done
13053
13054    else
13055      # If it succeeded, then it was overridden by the user. We will use it
13056      # for the tool.
13057
13058      # First remove it from the list of overridden variables, so we can test
13059      # for unknown variables in the end.
13060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13061
13062      # Check if the provided tool contains a complete path.
13063      tool_specified="$SETFILE"
13064      tool_basename="${tool_specified##*/}"
13065      if test "x$tool_basename" = "x$tool_specified"; then
13066        # A command without a complete path is provided, search $PATH.
13067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13068$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13069        # Extract the first word of "$tool_basename", so it can be a program name with args.
13070set dummy $tool_basename; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_SETFILE+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $SETFILE in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099SETFILE=$ac_cv_path_SETFILE
13100if test -n "$SETFILE"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13102$as_echo "$SETFILE" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109        if test "x$SETFILE" = x; then
13110          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13111        fi
13112      else
13113        # Otherwise we believe it is a complete path. Use it as it is.
13114        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13115$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13117$as_echo_n "checking for SETFILE... " >&6; }
13118        if test ! -x "$tool_specified"; then
13119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13120$as_echo "not found" >&6; }
13121          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13122        fi
13123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13124$as_echo "$tool_specified" >&6; }
13125      fi
13126    fi
13127  fi
13128
13129
13130
13131
13132# Now we can determine OpenJDK build and target platforms. This is required to
13133# have early on.
13134# Make sure we can run config.sub.
13135$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13136  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13137
13138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13139$as_echo_n "checking build system type... " >&6; }
13140if ${ac_cv_build+:} false; then :
13141  $as_echo_n "(cached) " >&6
13142else
13143  ac_build_alias=$build_alias
13144test "x$ac_build_alias" = x &&
13145  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13146test "x$ac_build_alias" = x &&
13147  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13148ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13149  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13150
13151fi
13152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13153$as_echo "$ac_cv_build" >&6; }
13154case $ac_cv_build in
13155*-*-*) ;;
13156*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13157esac
13158build=$ac_cv_build
13159ac_save_IFS=$IFS; IFS='-'
13160set x $ac_cv_build
13161shift
13162build_cpu=$1
13163build_vendor=$2
13164shift; shift
13165# Remember, the first character of IFS is used to create $*,
13166# except with old shells:
13167build_os=$*
13168IFS=$ac_save_IFS
13169case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13170
13171
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13173$as_echo_n "checking host system type... " >&6; }
13174if ${ac_cv_host+:} false; then :
13175  $as_echo_n "(cached) " >&6
13176else
13177  if test "x$host_alias" = x; then
13178  ac_cv_host=$ac_cv_build
13179else
13180  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13181    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13182fi
13183
13184fi
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13186$as_echo "$ac_cv_host" >&6; }
13187case $ac_cv_host in
13188*-*-*) ;;
13189*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13190esac
13191host=$ac_cv_host
13192ac_save_IFS=$IFS; IFS='-'
13193set x $ac_cv_host
13194shift
13195host_cpu=$1
13196host_vendor=$2
13197shift; shift
13198# Remember, the first character of IFS is used to create $*,
13199# except with old shells:
13200host_os=$*
13201IFS=$ac_save_IFS
13202case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13203
13204
13205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13206$as_echo_n "checking target system type... " >&6; }
13207if ${ac_cv_target+:} false; then :
13208  $as_echo_n "(cached) " >&6
13209else
13210  if test "x$target_alias" = x; then
13211  ac_cv_target=$ac_cv_host
13212else
13213  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13214    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13215fi
13216
13217fi
13218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13219$as_echo "$ac_cv_target" >&6; }
13220case $ac_cv_target in
13221*-*-*) ;;
13222*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13223esac
13224target=$ac_cv_target
13225ac_save_IFS=$IFS; IFS='-'
13226set x $ac_cv_target
13227shift
13228target_cpu=$1
13229target_vendor=$2
13230shift; shift
13231# Remember, the first character of IFS is used to create $*,
13232# except with old shells:
13233target_os=$*
13234IFS=$ac_save_IFS
13235case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13236
13237
13238# The aliases save the names the user supplied, while $host etc.
13239# will get canonicalized.
13240test -n "$target_alias" &&
13241  test "$program_prefix$program_suffix$program_transform_name" = \
13242    NONENONEs,x,x, &&
13243  program_prefix=${target_alias}-
13244
13245  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13246  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13247  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13248  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13249  # to use the configure naming style.
13250
13251
13252
13253
13254
13255  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13256  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13257  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13258  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13259  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13260  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13261
13262
13263
13264  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13265
13266  case "$build_os" in
13267    *linux*)
13268      VAR_OS=linux
13269      VAR_OS_API=posix
13270      VAR_OS_ENV=linux
13271      ;;
13272    *solaris*)
13273      VAR_OS=solaris
13274      VAR_OS_API=posix
13275      VAR_OS_ENV=solaris
13276      ;;
13277    *darwin*)
13278      VAR_OS=macosx
13279      VAR_OS_API=posix
13280      VAR_OS_ENV=macosx
13281      ;;
13282    *bsd*)
13283      VAR_OS=bsd
13284      VAR_OS_API=posix
13285      VAR_OS_ENV=bsd
13286      ;;
13287    *cygwin*)
13288      VAR_OS=windows
13289      VAR_OS_API=winapi
13290      VAR_OS_ENV=windows.cygwin
13291      ;;
13292    *mingw*)
13293      VAR_OS=windows
13294      VAR_OS_API=winapi
13295      VAR_OS_ENV=windows.msys
13296      ;;
13297    *aix*)
13298      VAR_OS=aix
13299      VAR_OS_API=posix
13300      VAR_OS_ENV=aix
13301      ;;
13302    *)
13303      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13304      ;;
13305  esac
13306
13307
13308  # First argument is the cpu name from the trip/quad
13309  case "$build_cpu" in
13310    x86_64)
13311      VAR_CPU=x86_64
13312      VAR_CPU_ARCH=x86
13313      VAR_CPU_BITS=64
13314      VAR_CPU_ENDIAN=little
13315      ;;
13316    i?86)
13317      VAR_CPU=x86
13318      VAR_CPU_ARCH=x86
13319      VAR_CPU_BITS=32
13320      VAR_CPU_ENDIAN=little
13321      ;;
13322    arm*)
13323      VAR_CPU=arm
13324      VAR_CPU_ARCH=arm
13325      VAR_CPU_BITS=32
13326      VAR_CPU_ENDIAN=little
13327      ;;
13328    powerpc)
13329      VAR_CPU=ppc
13330      VAR_CPU_ARCH=ppc
13331      VAR_CPU_BITS=32
13332      VAR_CPU_ENDIAN=big
13333      ;;
13334    powerpc64)
13335      VAR_CPU=ppc64
13336      VAR_CPU_ARCH=ppc
13337      VAR_CPU_BITS=64
13338      VAR_CPU_ENDIAN=big
13339      ;;
13340    s390)
13341      VAR_CPU=s390
13342      VAR_CPU_ARCH=s390
13343      VAR_CPU_BITS=32
13344      VAR_CPU_ENDIAN=big
13345      ;;
13346    s390x)
13347      VAR_CPU=s390x
13348      VAR_CPU_ARCH=s390
13349      VAR_CPU_BITS=64
13350      VAR_CPU_ENDIAN=big
13351      ;;
13352    sparc)
13353      VAR_CPU=sparc
13354      VAR_CPU_ARCH=sparc
13355      VAR_CPU_BITS=32
13356      VAR_CPU_ENDIAN=big
13357      ;;
13358    sparcv9)
13359      VAR_CPU=sparcv9
13360      VAR_CPU_ARCH=sparc
13361      VAR_CPU_BITS=64
13362      VAR_CPU_ENDIAN=big
13363      ;;
13364    *)
13365      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13366      ;;
13367  esac
13368
13369  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13370  OPENJDK_BUILD_OS="$VAR_OS"
13371  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13372  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13373  OPENJDK_BUILD_CPU="$VAR_CPU"
13374  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13375  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13376  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13377
13378
13379
13380
13381
13382
13383
13384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13385$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13387$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13388
13389  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13390
13391  case "$host_os" in
13392    *linux*)
13393      VAR_OS=linux
13394      VAR_OS_API=posix
13395      VAR_OS_ENV=linux
13396      ;;
13397    *solaris*)
13398      VAR_OS=solaris
13399      VAR_OS_API=posix
13400      VAR_OS_ENV=solaris
13401      ;;
13402    *darwin*)
13403      VAR_OS=macosx
13404      VAR_OS_API=posix
13405      VAR_OS_ENV=macosx
13406      ;;
13407    *bsd*)
13408      VAR_OS=bsd
13409      VAR_OS_API=posix
13410      VAR_OS_ENV=bsd
13411      ;;
13412    *cygwin*)
13413      VAR_OS=windows
13414      VAR_OS_API=winapi
13415      VAR_OS_ENV=windows.cygwin
13416      ;;
13417    *mingw*)
13418      VAR_OS=windows
13419      VAR_OS_API=winapi
13420      VAR_OS_ENV=windows.msys
13421      ;;
13422    *aix*)
13423      VAR_OS=aix
13424      VAR_OS_API=posix
13425      VAR_OS_ENV=aix
13426      ;;
13427    *)
13428      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13429      ;;
13430  esac
13431
13432
13433  # First argument is the cpu name from the trip/quad
13434  case "$host_cpu" in
13435    x86_64)
13436      VAR_CPU=x86_64
13437      VAR_CPU_ARCH=x86
13438      VAR_CPU_BITS=64
13439      VAR_CPU_ENDIAN=little
13440      ;;
13441    i?86)
13442      VAR_CPU=x86
13443      VAR_CPU_ARCH=x86
13444      VAR_CPU_BITS=32
13445      VAR_CPU_ENDIAN=little
13446      ;;
13447    arm*)
13448      VAR_CPU=arm
13449      VAR_CPU_ARCH=arm
13450      VAR_CPU_BITS=32
13451      VAR_CPU_ENDIAN=little
13452      ;;
13453    powerpc)
13454      VAR_CPU=ppc
13455      VAR_CPU_ARCH=ppc
13456      VAR_CPU_BITS=32
13457      VAR_CPU_ENDIAN=big
13458      ;;
13459    powerpc64)
13460      VAR_CPU=ppc64
13461      VAR_CPU_ARCH=ppc
13462      VAR_CPU_BITS=64
13463      VAR_CPU_ENDIAN=big
13464      ;;
13465    s390)
13466      VAR_CPU=s390
13467      VAR_CPU_ARCH=s390
13468      VAR_CPU_BITS=32
13469      VAR_CPU_ENDIAN=big
13470      ;;
13471    s390x)
13472      VAR_CPU=s390x
13473      VAR_CPU_ARCH=s390
13474      VAR_CPU_BITS=64
13475      VAR_CPU_ENDIAN=big
13476      ;;
13477    sparc)
13478      VAR_CPU=sparc
13479      VAR_CPU_ARCH=sparc
13480      VAR_CPU_BITS=32
13481      VAR_CPU_ENDIAN=big
13482      ;;
13483    sparcv9)
13484      VAR_CPU=sparcv9
13485      VAR_CPU_ARCH=sparc
13486      VAR_CPU_BITS=64
13487      VAR_CPU_ENDIAN=big
13488      ;;
13489    *)
13490      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13491      ;;
13492  esac
13493
13494  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13495  OPENJDK_TARGET_OS="$VAR_OS"
13496  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13497  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13498  OPENJDK_TARGET_CPU="$VAR_CPU"
13499  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13500  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13501  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13502
13503
13504
13505
13506
13507
13508
13509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13510$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13512$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13513
13514
13515
13516# Check whether --with-target-bits was given.
13517if test "${with_target_bits+set}" = set; then :
13518  withval=$with_target_bits;
13519fi
13520
13521
13522  # We have three types of compiles:
13523  # native  == normal compilation, target system == build system
13524  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13525  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13526  #
13527  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13528    # We're doing a proper cross-compilation
13529    COMPILE_TYPE="cross"
13530  else
13531    COMPILE_TYPE="native"
13532  fi
13533
13534  if test "x$with_target_bits" != x; then
13535    if test "x$COMPILE_TYPE" = "xcross"; then
13536      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13537    fi
13538
13539    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13540      # A reduced build is requested
13541      COMPILE_TYPE="reduced"
13542      OPENJDK_TARGET_CPU_BITS=32
13543      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13544        OPENJDK_TARGET_CPU=x86
13545      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13546        OPENJDK_TARGET_CPU=sparc
13547      else
13548        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13549      fi
13550    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13551      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
13552    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13553      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13554$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13555    else
13556      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13557    fi
13558  fi
13559
13560
13561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13562$as_echo_n "checking compilation type... " >&6; }
13563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13564$as_echo "$COMPILE_TYPE" >&6; }
13565
13566
13567  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13568    REQUIRED_OS_NAME=SunOS
13569    REQUIRED_OS_VERSION=5.10
13570  fi
13571  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13572    REQUIRED_OS_NAME=Linux
13573    REQUIRED_OS_VERSION=2.6
13574  fi
13575  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13576    REQUIRED_OS_NAME=Windows
13577    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13578      REQUIRED_OS_VERSION=5.2
13579    else
13580      REQUIRED_OS_VERSION=5.1
13581    fi
13582  fi
13583  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13584    REQUIRED_OS_NAME=Darwin
13585    REQUIRED_OS_VERSION=11.2
13586  fi
13587
13588
13589
13590
13591
13592  # Also store the legacy naming of the cpu.
13593  # Ie i586 and amd64 instead of x86 and x86_64
13594  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13595  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13596    OPENJDK_TARGET_CPU_LEGACY="i586"
13597  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13598    # On all platforms except MacOSX replace x86_64 with amd64.
13599    OPENJDK_TARGET_CPU_LEGACY="amd64"
13600  fi
13601
13602
13603  # And the second legacy naming of the cpu.
13604  # Ie i386 and amd64 instead of x86 and x86_64.
13605  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13606  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13607    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13608  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13609    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13610  fi
13611
13612
13613  # This is the name of the cpu (but using i386 and amd64 instead of
13614  # x86 and x86_64, respectively), preceeded by a /, to be used when
13615  # locating libraries. On macosx, it's empty, though.
13616  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13617  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13618    OPENJDK_TARGET_CPU_LIBDIR=""
13619  fi
13620
13621
13622  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13623  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13624  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13625  OPENJDK_TARGET_CPU_ISADIR=""
13626  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13627    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13628      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13629    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13630      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13631    fi
13632  fi
13633
13634
13635  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13636  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13637  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13638    # On linux only, we replace x86 with i386.
13639    OPENJDK_TARGET_CPU_OSARCH="i386"
13640  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13641    # On all platforms except macosx, we replace x86_64 with amd64.
13642    OPENJDK_TARGET_CPU_OSARCH="amd64"
13643  fi
13644
13645
13646  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13647  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13648    OPENJDK_TARGET_CPU_JLI="i386"
13649  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13650    # On all platforms except macosx, we replace x86_64 with amd64.
13651    OPENJDK_TARGET_CPU_JLI="amd64"
13652  fi
13653  # Now setup the -D flags for building libjli.
13654  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13655  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13656    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13657      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13658    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13659      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13660    fi
13661  fi
13662
13663
13664  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13665  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13666    OPENJDK_TARGET_OS_API_DIR="solaris"
13667  fi
13668  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13669    OPENJDK_TARGET_OS_API_DIR="windows"
13670  fi
13671
13672
13673  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13674      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13675  else
13676      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13677  fi
13678
13679
13680  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13681    A_LP64="LP64:="
13682    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13683    # unpack200.exe
13684    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13685      ADD_LP64="-D_LP64=1"
13686    fi
13687  fi
13688  LP64=$A_LP64
13689
13690
13691  if test "x$COMPILE_TYPE" = "xcross"; then
13692    # FIXME: ... or should this include reduced builds..?
13693    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13694  else
13695    DEFINE_CROSS_COMPILE_ARCH=""
13696  fi
13697
13698
13699  # ZERO_ARCHDEF is used to enable architecture-specific code
13700  case "${OPENJDK_TARGET_CPU}" in
13701    ppc*)    ZERO_ARCHDEF=PPC   ;;
13702    s390*)   ZERO_ARCHDEF=S390  ;;
13703    sparc*)  ZERO_ARCHDEF=SPARC ;;
13704    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13705    x86)     ZERO_ARCHDEF=IA32  ;;
13706    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13707  esac
13708
13709
13710
13711
13712# Continue setting up basic stuff. Most remaining code require fundamental tools.
13713
13714  # Locate the directory of this script.
13715  SCRIPT="$0"
13716  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13717
13718  # Where is the source? It is located two levels above the configure script.
13719  CURDIR="$PWD"
13720  cd "$AUTOCONF_DIR/../.."
13721  SRC_ROOT="`$THEPWDCMD -L`"
13722
13723  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13724    PATH_SEP=";"
13725
13726  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13727  if test $SRC_ROOT_LENGTH -gt 100; then
13728    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13729  fi
13730
13731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13733$as_echo_n "checking cygwin release... " >&6; }
13734    CYGWIN_VERSION=`$UNAME -r`
13735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13736$as_echo "$CYGWIN_VERSION" >&6; }
13737    WINDOWS_ENV_VENDOR='cygwin'
13738    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13739
13740    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13741    if test "x$CYGWIN_VERSION_OK" = x; then
13742      { $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
13743$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;}
13744      as_fn_error $? "Cannot continue" "$LINENO" 5
13745    fi
13746    if test "x$CYGPATH" = x; then
13747      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13748    fi
13749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13750$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13751    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13752    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13753    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13754    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13756$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13757    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13758    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13759    if test "x$test_cygdrive_prefix" = x; then
13760      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13761    fi
13762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13764$as_echo_n "checking msys release... " >&6; }
13765    MSYS_VERSION=`$UNAME -r`
13766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13767$as_echo "$MSYS_VERSION" >&6; }
13768
13769    WINDOWS_ENV_VENDOR='msys'
13770    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13771
13772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13773$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13774    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13775    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13776
13777  windows_path="$MSYS_ROOT_PATH"
13778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13779    unix_path=`$CYGPATH -u "$windows_path"`
13780    MSYS_ROOT_PATH="$unix_path"
13781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13783    MSYS_ROOT_PATH="$unix_path"
13784  fi
13785
13786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13787$as_echo "$MSYS_ROOT_PATH" >&6; }
13788    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13789  else
13790    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13791  fi
13792
13793  # Test if windows or unix (cygwin/msys) find is first in path.
13794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13795$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13796  FIND_BINARY_OUTPUT=`find --version 2>&1`
13797  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13799$as_echo "unix style" >&6; }
13800  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13802$as_echo "Windows" >&6; }
13803    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13804$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13805    { $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
13806$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13807    as_fn_error $? "Cannot continue" "$LINENO" 5
13808  else
13809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13810$as_echo "unknown" >&6; }
13811    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13812$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13813  fi
13814
13815  else
13816    PATH_SEP=":"
13817  fi
13818
13819
13820
13821  cd "$CURDIR"
13822
13823
13824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13825
13826  # Input might be given as Windows format, start by converting to
13827  # unix format.
13828  path="$SRC_ROOT"
13829  new_path=`$CYGPATH -u "$path"`
13830
13831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13834  # "foo.exe" is OK but "foo" is an error.
13835  #
13836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13837  # It is also a way to make sure we got the proper file name for the real test later on.
13838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13839  if test "x$test_shortpath" = x; then
13840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13841$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13842    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13843  fi
13844
13845  # Call helper function which possibly converts this using DOS-style short mode.
13846  # If so, the updated path is stored in $new_path.
13847
13848  input_path="$new_path"
13849  # Check if we need to convert this using DOS-style short mode. If the path
13850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13851  # take no chances and rewrite it.
13852  # Note: m4 eats our [], so we need to use [ and ] instead.
13853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13854  if test "x$has_forbidden_chars" != x; then
13855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13859      # Going to short mode and back again did indeed matter. Since short mode is
13860      # case insensitive, let's make it lowercase to improve readability.
13861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13862      # Now convert it back to Unix-stile (cygpath)
13863      input_path=`$CYGPATH -u "$shortmode_path"`
13864      new_path="$input_path"
13865    fi
13866  fi
13867
13868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13869  if test "x$test_cygdrive_prefix" = x; then
13870    # As a simple fix, exclude /usr/bin since it's not a real path.
13871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13873      # a path prefixed by /cygdrive for fixpath to work.
13874      new_path="$CYGWIN_ROOT_PATH$input_path"
13875    fi
13876  fi
13877
13878
13879  if test "x$path" != "x$new_path"; then
13880    SRC_ROOT="$new_path"
13881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13882$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13883  fi
13884
13885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13886
13887  path="$SRC_ROOT"
13888  has_colon=`$ECHO $path | $GREP ^.:`
13889  new_path="$path"
13890  if test "x$has_colon" = x; then
13891    # Not in mixed or Windows style, start by that.
13892    new_path=`cmd //c echo $path`
13893  fi
13894
13895
13896  input_path="$new_path"
13897  # Check if we need to convert this using DOS-style short mode. If the path
13898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13899  # take no chances and rewrite it.
13900  # Note: m4 eats our [], so we need to use [ and ] instead.
13901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13902  if test "x$has_forbidden_chars" != x; then
13903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13905  fi
13906
13907
13908  windows_path="$new_path"
13909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13910    unix_path=`$CYGPATH -u "$windows_path"`
13911    new_path="$unix_path"
13912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13914    new_path="$unix_path"
13915  fi
13916
13917  if test "x$path" != "x$new_path"; then
13918    SRC_ROOT="$new_path"
13919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13920$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13921  fi
13922
13923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13925
13926  else
13927    # We're on a posix platform. Hooray! :)
13928    path="$SRC_ROOT"
13929    has_space=`$ECHO "$path" | $GREP " "`
13930    if test "x$has_space" != x; then
13931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13932$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13933      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13934    fi
13935
13936    # Use eval to expand a potential ~
13937    eval path="$path"
13938    if test ! -f "$path" && test ! -d "$path"; then
13939      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
13940    fi
13941
13942    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
13943  fi
13944
13945
13946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13947
13948  # Input might be given as Windows format, start by converting to
13949  # unix format.
13950  path="$CURDIR"
13951  new_path=`$CYGPATH -u "$path"`
13952
13953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13956  # "foo.exe" is OK but "foo" is an error.
13957  #
13958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13959  # It is also a way to make sure we got the proper file name for the real test later on.
13960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13961  if test "x$test_shortpath" = x; then
13962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13963$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13964    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13965  fi
13966
13967  # Call helper function which possibly converts this using DOS-style short mode.
13968  # If so, the updated path is stored in $new_path.
13969
13970  input_path="$new_path"
13971  # Check if we need to convert this using DOS-style short mode. If the path
13972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13973  # take no chances and rewrite it.
13974  # Note: m4 eats our [], so we need to use [ and ] instead.
13975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13976  if test "x$has_forbidden_chars" != x; then
13977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13981      # Going to short mode and back again did indeed matter. Since short mode is
13982      # case insensitive, let's make it lowercase to improve readability.
13983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13984      # Now convert it back to Unix-stile (cygpath)
13985      input_path=`$CYGPATH -u "$shortmode_path"`
13986      new_path="$input_path"
13987    fi
13988  fi
13989
13990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13991  if test "x$test_cygdrive_prefix" = x; then
13992    # As a simple fix, exclude /usr/bin since it's not a real path.
13993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13995      # a path prefixed by /cygdrive for fixpath to work.
13996      new_path="$CYGWIN_ROOT_PATH$input_path"
13997    fi
13998  fi
13999
14000
14001  if test "x$path" != "x$new_path"; then
14002    CURDIR="$new_path"
14003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14004$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14005  fi
14006
14007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14008
14009  path="$CURDIR"
14010  has_colon=`$ECHO $path | $GREP ^.:`
14011  new_path="$path"
14012  if test "x$has_colon" = x; then
14013    # Not in mixed or Windows style, start by that.
14014    new_path=`cmd //c echo $path`
14015  fi
14016
14017
14018  input_path="$new_path"
14019  # Check if we need to convert this using DOS-style short mode. If the path
14020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14021  # take no chances and rewrite it.
14022  # Note: m4 eats our [], so we need to use [ and ] instead.
14023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14024  if test "x$has_forbidden_chars" != x; then
14025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14027  fi
14028
14029
14030  windows_path="$new_path"
14031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14032    unix_path=`$CYGPATH -u "$windows_path"`
14033    new_path="$unix_path"
14034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14036    new_path="$unix_path"
14037  fi
14038
14039  if test "x$path" != "x$new_path"; then
14040    CURDIR="$new_path"
14041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14042$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14043  fi
14044
14045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14047
14048  else
14049    # We're on a posix platform. Hooray! :)
14050    path="$CURDIR"
14051    has_space=`$ECHO "$path" | $GREP " "`
14052    if test "x$has_space" != x; then
14053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14054$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14055      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14056    fi
14057
14058    # Use eval to expand a potential ~
14059    eval path="$path"
14060    if test ! -f "$path" && test ! -d "$path"; then
14061      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14062    fi
14063
14064    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14065  fi
14066
14067
14068  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14069    # Add extra search paths on solaris for utilities like ar and as etc...
14070    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14071  fi
14072
14073  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14074  # is not correct.
14075
14076# Check whether --with-sys-root was given.
14077if test "${with_sys_root+set}" = set; then :
14078  withval=$with_sys_root;
14079fi
14080
14081
14082  if test "x$with_sys_root" != x; then
14083    SYS_ROOT=$with_sys_root
14084  else
14085    SYS_ROOT=/
14086  fi
14087
14088
14089
14090# Check whether --with-tools-dir was given.
14091if test "${with_tools_dir+set}" = set; then :
14092  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14093
14094fi
14095
14096
14097
14098# Check whether --with-devkit was given.
14099if test "${with_devkit+set}" = set; then :
14100  withval=$with_devkit;
14101        if test "x$with_sys_root" != x; then
14102          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14103        fi
14104
14105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14106
14107  # Input might be given as Windows format, start by converting to
14108  # unix format.
14109  path="$with_devkit"
14110  new_path=`$CYGPATH -u "$path"`
14111
14112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14115  # "foo.exe" is OK but "foo" is an error.
14116  #
14117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14118  # It is also a way to make sure we got the proper file name for the real test later on.
14119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14120  if test "x$test_shortpath" = x; then
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14122$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14123    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14124  fi
14125
14126  # Call helper function which possibly converts this using DOS-style short mode.
14127  # If so, the updated path is stored in $new_path.
14128
14129  input_path="$new_path"
14130  # Check if we need to convert this using DOS-style short mode. If the path
14131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14132  # take no chances and rewrite it.
14133  # Note: m4 eats our [], so we need to use [ and ] instead.
14134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14135  if test "x$has_forbidden_chars" != x; then
14136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14140      # Going to short mode and back again did indeed matter. Since short mode is
14141      # case insensitive, let's make it lowercase to improve readability.
14142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14143      # Now convert it back to Unix-stile (cygpath)
14144      input_path=`$CYGPATH -u "$shortmode_path"`
14145      new_path="$input_path"
14146    fi
14147  fi
14148
14149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14150  if test "x$test_cygdrive_prefix" = x; then
14151    # As a simple fix, exclude /usr/bin since it's not a real path.
14152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14154      # a path prefixed by /cygdrive for fixpath to work.
14155      new_path="$CYGWIN_ROOT_PATH$input_path"
14156    fi
14157  fi
14158
14159
14160  if test "x$path" != "x$new_path"; then
14161    with_devkit="$new_path"
14162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14163$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14164  fi
14165
14166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14167
14168  path="$with_devkit"
14169  has_colon=`$ECHO $path | $GREP ^.:`
14170  new_path="$path"
14171  if test "x$has_colon" = x; then
14172    # Not in mixed or Windows style, start by that.
14173    new_path=`cmd //c echo $path`
14174  fi
14175
14176
14177  input_path="$new_path"
14178  # Check if we need to convert this using DOS-style short mode. If the path
14179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14180  # take no chances and rewrite it.
14181  # Note: m4 eats our [], so we need to use [ and ] instead.
14182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14183  if test "x$has_forbidden_chars" != x; then
14184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14186  fi
14187
14188
14189  windows_path="$new_path"
14190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14191    unix_path=`$CYGPATH -u "$windows_path"`
14192    new_path="$unix_path"
14193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14195    new_path="$unix_path"
14196  fi
14197
14198  if test "x$path" != "x$new_path"; then
14199    with_devkit="$new_path"
14200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14201$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14202  fi
14203
14204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14206
14207  else
14208    # We're on a posix platform. Hooray! :)
14209    path="$with_devkit"
14210    has_space=`$ECHO "$path" | $GREP " "`
14211    if test "x$has_space" != x; then
14212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14213$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14214      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14215    fi
14216
14217    # Use eval to expand a potential ~
14218    eval path="$path"
14219    if test ! -f "$path" && test ! -d "$path"; then
14220      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14221    fi
14222
14223    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14224  fi
14225
14226
14227  if test "x$TOOLS_DIR" = x; then
14228    TOOLS_DIR="$with_devkit/bin"
14229  else
14230    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14231  fi
14232
14233        if test -d "$with_devkit/$host_alias/libc"; then
14234          SYS_ROOT=$with_devkit/$host_alias/libc
14235        elif test -d "$with_devkit/$host/sys-root"; then
14236          SYS_ROOT=$with_devkit/$host/sys-root
14237        fi
14238
14239fi
14240
14241
14242
14243  # Setup default logging of stdout and stderr to build.log in the output root.
14244  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14245  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14246  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14247
14248
14249
14250
14251
14252# Check if it's a pure open build or if custom sources are to be used.
14253
14254  # Check whether --enable-openjdk-only was given.
14255if test "${enable_openjdk_only+set}" = set; then :
14256  enableval=$enable_openjdk_only;
14257else
14258  enable_openjdk_only="no"
14259fi
14260
14261
14262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14263$as_echo_n "checking for presence of closed sources... " >&6; }
14264  if test -d "$SRC_ROOT/jdk/src/closed"; then
14265    CLOSED_SOURCE_PRESENT=yes
14266  else
14267    CLOSED_SOURCE_PRESENT=no
14268  fi
14269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14270$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14271
14272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14273$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14274  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14276$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14277
14278  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14279    OPENJDK=true
14280    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14281      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14282$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14283    fi
14284  else
14285    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14286      OPENJDK=true
14287    else
14288      OPENJDK=false
14289    fi
14290  fi
14291
14292  if test "x$OPENJDK" = "xtrue"; then
14293    SET_OPENJDK="OPENJDK=true"
14294  fi
14295
14296
14297
14298  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14299  # the IncludeCustomExtension macro.
14300
14301
14302# Check whether --with-custom-make-dir was given.
14303if test "${with_custom_make_dir+set}" = set; then :
14304  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
14305$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14306fi
14307
14308
14309
14310
14311# These are needed to be able to create a configuration name (and thus the output directory)
14312
14313  ###############################################################################
14314  #
14315  # Check which variant of the JDK that we want to build.
14316  # Currently we have:
14317  #    normal:   standard edition
14318  # but the custom make system may add other variants
14319  #
14320  # Effectively the JDK variant gives a name to a specific set of
14321  # modules to compile into the JDK. In the future, these modules
14322  # might even be Jigsaw modules.
14323  #
14324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14325$as_echo_n "checking which variant of the JDK to build... " >&6; }
14326
14327# Check whether --with-jdk-variant was given.
14328if test "${with_jdk_variant+set}" = set; then :
14329  withval=$with_jdk_variant;
14330fi
14331
14332
14333  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14334    JDK_VARIANT="normal"
14335  else
14336    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14337  fi
14338
14339
14340
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14342$as_echo "$JDK_VARIANT" >&6; }
14343
14344
14345###############################################################################
14346#
14347# Check which interpreter of the JVM we want to build.
14348# Currently we have:
14349#    template: Template interpreter (the default)
14350#    cpp     : C++ interpreter
14351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14352$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14353
14354# Check whether --with-jvm-interpreter was given.
14355if test "${with_jvm_interpreter+set}" = set; then :
14356  withval=$with_jvm_interpreter;
14357fi
14358
14359
14360if test "x$with_jvm_interpreter" = x; then
14361     with_jvm_interpreter="template"
14362fi
14363
14364JVM_INTERPRETER="$with_jvm_interpreter"
14365
14366if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14367   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14368fi
14369
14370
14371
14372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14373$as_echo "$with_jvm_interpreter" >&6; }
14374
14375
14376
14377  ###############################################################################
14378  #
14379  # Check which variants of the JVM that we want to build.
14380  # Currently we have:
14381  #    server: normal interpreter and a tiered C1/C2 compiler
14382  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14383  #    minimal1: reduced form of client with optional VM services and features stripped out
14384  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14385  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14386  #    zero: no machine code interpreter, no compiler
14387  #    zeroshark: zero interpreter and shark/llvm compiler backend
14388#    core: interpreter only, no compiler (only works on some platforms)
14389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14390$as_echo_n "checking which variants of the JVM to build... " >&6; }
14391
14392# Check whether --with-jvm-variants was given.
14393if test "${with_jvm_variants+set}" = set; then :
14394  withval=$with_jvm_variants;
14395fi
14396
14397
14398  if test "x$with_jvm_variants" = x; then
14399    with_jvm_variants="server"
14400  fi
14401
14402  JVM_VARIANTS=",$with_jvm_variants,"
14403  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,//'`
14404
14405  if test "x$TEST_VARIANTS" != "x,"; then
14406     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14407  fi
14408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14409$as_echo "$with_jvm_variants" >&6; }
14410
14411  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14412  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14413  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14414  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14415  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14416  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14417  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14418
14419  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14420    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14421      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14422    fi
14423  fi
14424  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14425    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14426      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14427    fi
14428  fi
14429  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14430    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14431      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14432    fi
14433  fi
14434
14435  # Replace the commas with AND for use in the build directory name.
14436  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14437  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/'`
14438  if test "x$COUNT_VARIANTS" != "x,1"; then
14439    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14440  else
14441    BUILDING_MULTIPLE_JVM_VARIANTS=no
14442  fi
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453  INCLUDE_SA=true
14454  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14455    INCLUDE_SA=false
14456  fi
14457  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14458    INCLUDE_SA=false
14459  fi
14460  if test "x$VAR_CPU" = xppc64 ; then
14461    INCLUDE_SA=false
14462  fi
14463
14464
14465  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14466    MACOSX_UNIVERSAL="true"
14467  fi
14468
14469
14470
14471
14472  ###############################################################################
14473  #
14474  # Set the debug level
14475  #    release: no debug information, all optimizations, no asserts.
14476  #    fastdebug: debug information (-g), all optimizations, all asserts
14477  #    slowdebug: debug information (-g), no optimizations, all asserts
14478  #
14479  DEBUG_LEVEL="release"
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14481$as_echo_n "checking which debug level to use... " >&6; }
14482  # Check whether --enable-debug was given.
14483if test "${enable_debug+set}" = set; then :
14484  enableval=$enable_debug;
14485        ENABLE_DEBUG="${enableval}"
14486        DEBUG_LEVEL="fastdebug"
14487
14488else
14489  ENABLE_DEBUG="no"
14490fi
14491
14492
14493
14494# Check whether --with-debug-level was given.
14495if test "${with_debug_level+set}" = set; then :
14496  withval=$with_debug_level;
14497        DEBUG_LEVEL="${withval}"
14498        if test "x$ENABLE_DEBUG" = xyes; then
14499          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14500        fi
14501
14502fi
14503
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14505$as_echo "$DEBUG_LEVEL" >&6; }
14506
14507  if test "x$DEBUG_LEVEL" != xrelease && \
14508      test "x$DEBUG_LEVEL" != xfastdebug && \
14509      test "x$DEBUG_LEVEL" != xslowdebug; then
14510    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14511  fi
14512
14513
14514  ###############################################################################
14515  #
14516  # Setup legacy vars/targets and new vars to deal with different debug levels.
14517  #
14518
14519  case $DEBUG_LEVEL in
14520    release )
14521      VARIANT="OPT"
14522      FASTDEBUG="false"
14523      DEBUG_CLASSFILES="false"
14524      BUILD_VARIANT_RELEASE=""
14525      HOTSPOT_DEBUG_LEVEL="product"
14526      HOTSPOT_EXPORT="product"
14527      ;;
14528    fastdebug )
14529      VARIANT="DBG"
14530      FASTDEBUG="true"
14531      DEBUG_CLASSFILES="true"
14532      BUILD_VARIANT_RELEASE="-fastdebug"
14533      HOTSPOT_DEBUG_LEVEL="fastdebug"
14534      HOTSPOT_EXPORT="fastdebug"
14535      ;;
14536    slowdebug )
14537      VARIANT="DBG"
14538      FASTDEBUG="false"
14539      DEBUG_CLASSFILES="true"
14540      BUILD_VARIANT_RELEASE="-debug"
14541      HOTSPOT_DEBUG_LEVEL="jvmg"
14542      HOTSPOT_EXPORT="debug"
14543      ;;
14544  esac
14545
14546  #####
14547  # Generate the legacy makefile targets for hotspot.
14548  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14549  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14550  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14551  # But until then ...
14552  HOTSPOT_TARGET=""
14553
14554  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14555    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14556  fi
14557
14558  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14559    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14560  fi
14561
14562  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14563    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14564  fi
14565
14566  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14567    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14568  fi
14569
14570  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14571    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14572  fi
14573
14574  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14575    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14576  fi
14577
14578  if test "x$JVM_VARIANT_CORE" = xtrue; then
14579    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14580  fi
14581
14582  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14583
14584  # On Macosx universal binaries are produced, but they only contain
14585  # 64 bit intel. This invalidates control of which jvms are built
14586  # from configure, but only server is valid anyway. Fix this
14587  # when hotspot makefiles are rewritten.
14588  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14589    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14590  fi
14591
14592  #####
14593
14594
14595
14596
14597
14598
14599
14600
14601# With basic setup done, call the custom early hook.
14602
14603
14604# To properly create a configuration name, we need to have the OpenJDK target
14605# and options (variants and debug level) parsed.
14606
14607
14608
14609# Check whether --with-conf-name was given.
14610if test "${with_conf_name+set}" = set; then :
14611  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14612fi
14613
14614
14615  # Test from where we are running configure, in or outside of src root.
14616  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14617      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14618      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14619    # We are running configure from the src root.
14620    # Create a default ./build/target-variant-debuglevel output root.
14621    if test "x${CONF_NAME}" = x; then
14622      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14623    fi
14624    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14625    $MKDIR -p "$OUTPUT_ROOT"
14626    if test ! -d "$OUTPUT_ROOT"; then
14627      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14628    fi
14629  else
14630    # We are running configure from outside of the src dir.
14631    # Then use the current directory as output dir!
14632    # If configuration is situated in normal build directory, just use the build
14633    # directory name as configuration name, otherwise use the complete path.
14634    if test "x${CONF_NAME}" = x; then
14635      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14636    fi
14637    OUTPUT_ROOT="$CURDIR"
14638
14639    # WARNING: This might be a bad thing to do. You need to be sure you want to
14640    # have a configuration in this directory. Do some sanity checks!
14641
14642    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14643      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14644      # other files
14645      files_present=`$LS $OUTPUT_ROOT`
14646      # Configure has already touched config.log and confdefs.h in the current dir when this check
14647      # is performed.
14648      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14649      | $TR -d '\n'`
14650      if test "x$filtered_files" != x; then
14651        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14652$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14653        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14654$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14655        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14656$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14657        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14658$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14659        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14660$as_echo "$as_me: seriously mess up just about everything." >&6;}
14661        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14662$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14663        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14664$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14665        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14666      fi
14667    fi
14668  fi
14669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14670$as_echo_n "checking what configuration name to use... " >&6; }
14671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14672$as_echo "$CONF_NAME" >&6; }
14673
14674
14675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14676
14677  # Input might be given as Windows format, start by converting to
14678  # unix format.
14679  path="$OUTPUT_ROOT"
14680  new_path=`$CYGPATH -u "$path"`
14681
14682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14685  # "foo.exe" is OK but "foo" is an error.
14686  #
14687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14688  # It is also a way to make sure we got the proper file name for the real test later on.
14689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14690  if test "x$test_shortpath" = x; then
14691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14692$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14693    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14694  fi
14695
14696  # Call helper function which possibly converts this using DOS-style short mode.
14697  # If so, the updated path is stored in $new_path.
14698
14699  input_path="$new_path"
14700  # Check if we need to convert this using DOS-style short mode. If the path
14701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14702  # take no chances and rewrite it.
14703  # Note: m4 eats our [], so we need to use [ and ] instead.
14704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14705  if test "x$has_forbidden_chars" != x; then
14706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14710      # Going to short mode and back again did indeed matter. Since short mode is
14711      # case insensitive, let's make it lowercase to improve readability.
14712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14713      # Now convert it back to Unix-stile (cygpath)
14714      input_path=`$CYGPATH -u "$shortmode_path"`
14715      new_path="$input_path"
14716    fi
14717  fi
14718
14719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14720  if test "x$test_cygdrive_prefix" = x; then
14721    # As a simple fix, exclude /usr/bin since it's not a real path.
14722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14724      # a path prefixed by /cygdrive for fixpath to work.
14725      new_path="$CYGWIN_ROOT_PATH$input_path"
14726    fi
14727  fi
14728
14729
14730  if test "x$path" != "x$new_path"; then
14731    OUTPUT_ROOT="$new_path"
14732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14733$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14734  fi
14735
14736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14737
14738  path="$OUTPUT_ROOT"
14739  has_colon=`$ECHO $path | $GREP ^.:`
14740  new_path="$path"
14741  if test "x$has_colon" = x; then
14742    # Not in mixed or Windows style, start by that.
14743    new_path=`cmd //c echo $path`
14744  fi
14745
14746
14747  input_path="$new_path"
14748  # Check if we need to convert this using DOS-style short mode. If the path
14749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14750  # take no chances and rewrite it.
14751  # Note: m4 eats our [], so we need to use [ and ] instead.
14752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14753  if test "x$has_forbidden_chars" != x; then
14754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14756  fi
14757
14758
14759  windows_path="$new_path"
14760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14761    unix_path=`$CYGPATH -u "$windows_path"`
14762    new_path="$unix_path"
14763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14765    new_path="$unix_path"
14766  fi
14767
14768  if test "x$path" != "x$new_path"; then
14769    OUTPUT_ROOT="$new_path"
14770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14771$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14772  fi
14773
14774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14776
14777  else
14778    # We're on a posix platform. Hooray! :)
14779    path="$OUTPUT_ROOT"
14780    has_space=`$ECHO "$path" | $GREP " "`
14781    if test "x$has_space" != x; then
14782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14783$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14785    fi
14786
14787    # Use eval to expand a potential ~
14788    eval path="$path"
14789    if test ! -f "$path" && test ! -d "$path"; then
14790      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14791    fi
14792
14793    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14794  fi
14795
14796
14797  SPEC=$OUTPUT_ROOT/spec.gmk
14798
14799  CONF_NAME=$CONF_NAME
14800
14801  OUTPUT_ROOT=$OUTPUT_ROOT
14802
14803
14804  # Most of the probed defines are put into config.h
14805  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14806
14807  # The spec.gmk file contains all variables for the make system.
14808  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14809
14810  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14811  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14812
14813  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14814  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14815
14816  # The compare.sh is used to compare the build output to other builds.
14817  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14818
14819  # Spec.sh is currently used by compare-objects.sh
14820  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14821
14822  # The generated Makefile knows where the spec.gmk is and where the source is.
14823  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14824  # which will look for generated configurations
14825  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14826
14827
14828  # Save the arguments given to us
14829  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
14830
14831
14832# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14833
14834  for ac_prog in apt-get yum port pkgutil pkgadd
14835do
14836  # Extract the first word of "$ac_prog", so it can be a program name with args.
14837set dummy $ac_prog; ac_word=$2
14838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14839$as_echo_n "checking for $ac_word... " >&6; }
14840if ${ac_cv_prog_PKGHANDLER+:} false; then :
14841  $as_echo_n "(cached) " >&6
14842else
14843  if test -n "$PKGHANDLER"; then
14844  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14845else
14846as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14847for as_dir in $PATH
14848do
14849  IFS=$as_save_IFS
14850  test -z "$as_dir" && as_dir=.
14851    for ac_exec_ext in '' $ac_executable_extensions; do
14852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14853    ac_cv_prog_PKGHANDLER="$ac_prog"
14854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14855    break 2
14856  fi
14857done
14858  done
14859IFS=$as_save_IFS
14860
14861fi
14862fi
14863PKGHANDLER=$ac_cv_prog_PKGHANDLER
14864if test -n "$PKGHANDLER"; then
14865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14866$as_echo "$PKGHANDLER" >&6; }
14867else
14868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14869$as_echo "no" >&6; }
14870fi
14871
14872
14873  test -n "$PKGHANDLER" && break
14874done
14875
14876
14877
14878# Setup tools that requires more complex handling, or that is not needed by the configure script.
14879
14880
14881  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14882  if test "x$MAKE" != x; then
14883    # User has supplied a make, test it.
14884    if test ! -f "$MAKE"; then
14885      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14886    fi
14887
14888  MAKE_CANDIDATE=""$MAKE""
14889  DESCRIPTION="user supplied MAKE=$MAKE"
14890  if test "x$MAKE_CANDIDATE" != x; then
14891    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14892$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14893    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14894    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14895    if test "x$IS_GNU_MAKE" = x; then
14896      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14897$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14898    else
14899      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14900      if test "x$IS_MODERN_MAKE" = x; then
14901        { $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
14902$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;}
14903      else
14904        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14905          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14906            MAKE_EXPECTED_ENV='cygwin'
14907          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14908            MAKE_EXPECTED_ENV='msys'
14909          else
14910            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14911          fi
14912          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14913          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14914        else
14915          # Not relevant for non-Windows
14916          IS_MAKE_CORRECT_ENV=true
14917        fi
14918        if test "x$IS_MAKE_CORRECT_ENV" = x; then
14919          { $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
14920$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;}
14921        else
14922          FOUND_MAKE=$MAKE_CANDIDATE
14923
14924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14925
14926  # First separate the path from the arguments. This will split at the first
14927  # space.
14928  complete="$FOUND_MAKE"
14929  path="${complete%% *}"
14930  tmp="$complete EOL"
14931  arguments="${tmp#* }"
14932
14933  # Input might be given as Windows format, start by converting to
14934  # unix format.
14935  new_path=`$CYGPATH -u "$path"`
14936
14937  # Now try to locate executable using which
14938  new_path=`$WHICH "$new_path" 2> /dev/null`
14939  # bat and cmd files are not always considered executable in cygwin causing which
14940  # to not find them
14941  if test "x$new_path" = x \
14942      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14943      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14944    new_path=`$CYGPATH -u "$path"`
14945  fi
14946  if test "x$new_path" = x; then
14947    # Oops. Which didn't find the executable.
14948    # The splitting of arguments from the executable at a space might have been incorrect,
14949    # since paths with space are more likely in Windows. Give it another try with the whole
14950    # argument.
14951    path="$complete"
14952    arguments="EOL"
14953    new_path=`$CYGPATH -u "$path"`
14954    new_path=`$WHICH "$new_path" 2> /dev/null`
14955    # bat and cmd files are not always considered executable in cygwin causing which
14956    # to not find them
14957    if test "x$new_path" = x \
14958        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14959        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14960      new_path=`$CYGPATH -u "$path"`
14961    fi
14962    if test "x$new_path" = x; then
14963      # It's still not found. Now this is an unrecoverable error.
14964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14966      has_space=`$ECHO "$complete" | $GREP " "`
14967      if test "x$has_space" != x; then
14968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14970      fi
14971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14972    fi
14973  fi
14974
14975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14978  # "foo.exe" is OK but "foo" is an error.
14979  #
14980  # This test is therefore slightly more accurate than "test -f" to check for file presence.
14981  # It is also a way to make sure we got the proper file name for the real test later on.
14982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14983  if test "x$test_shortpath" = x; then
14984    # Short path failed, file does not exist as specified.
14985    # Try adding .exe or .cmd
14986    if test -f "${new_path}.exe"; then
14987      input_to_shortpath="${new_path}.exe"
14988    elif test -f "${new_path}.cmd"; then
14989      input_to_shortpath="${new_path}.cmd"
14990    else
14991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
14992$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
14993      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
14994$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
14995      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14996    fi
14997  else
14998    input_to_shortpath="$new_path"
14999  fi
15000
15001  # Call helper function which possibly converts this using DOS-style short mode.
15002  # If so, the updated path is stored in $new_path.
15003  new_path="$input_to_shortpath"
15004
15005  input_path="$input_to_shortpath"
15006  # Check if we need to convert this using DOS-style short mode. If the path
15007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15008  # take no chances and rewrite it.
15009  # Note: m4 eats our [], so we need to use [ and ] instead.
15010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15011  if test "x$has_forbidden_chars" != x; then
15012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15016      # Going to short mode and back again did indeed matter. Since short mode is
15017      # case insensitive, let's make it lowercase to improve readability.
15018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15019      # Now convert it back to Unix-stile (cygpath)
15020      input_path=`$CYGPATH -u "$shortmode_path"`
15021      new_path="$input_path"
15022    fi
15023  fi
15024
15025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15026  if test "x$test_cygdrive_prefix" = x; then
15027    # As a simple fix, exclude /usr/bin since it's not a real path.
15028    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15030      # a path prefixed by /cygdrive for fixpath to work.
15031      new_path="$CYGWIN_ROOT_PATH$input_path"
15032    fi
15033  fi
15034
15035  # remove trailing .exe if any
15036  new_path="${new_path/%.exe/}"
15037
15038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15039
15040  # First separate the path from the arguments. This will split at the first
15041  # space.
15042  complete="$FOUND_MAKE"
15043  path="${complete%% *}"
15044  tmp="$complete EOL"
15045  arguments="${tmp#* }"
15046
15047  # Input might be given as Windows format, start by converting to
15048  # unix format.
15049  new_path="$path"
15050
15051  windows_path="$new_path"
15052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15053    unix_path=`$CYGPATH -u "$windows_path"`
15054    new_path="$unix_path"
15055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15057    new_path="$unix_path"
15058  fi
15059
15060
15061  # Now try to locate executable using which
15062  new_path=`$WHICH "$new_path" 2> /dev/null`
15063
15064  if test "x$new_path" = x; then
15065    # Oops. Which didn't find the executable.
15066    # The splitting of arguments from the executable at a space might have been incorrect,
15067    # since paths with space are more likely in Windows. Give it another try with the whole
15068    # argument.
15069    path="$complete"
15070    arguments="EOL"
15071    new_path="$path"
15072
15073  windows_path="$new_path"
15074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15075    unix_path=`$CYGPATH -u "$windows_path"`
15076    new_path="$unix_path"
15077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15079    new_path="$unix_path"
15080  fi
15081
15082
15083    new_path=`$WHICH "$new_path" 2> /dev/null`
15084
15085    if test "x$new_path" = x; then
15086      # It's still not found. Now this is an unrecoverable error.
15087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15088$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15089      has_space=`$ECHO "$complete" | $GREP " "`
15090      if test "x$has_space" != x; then
15091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15093      fi
15094      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15095    fi
15096  fi
15097
15098  # Now new_path has a complete unix path to the binary
15099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15100    # Keep paths in /bin as-is, but remove trailing .exe if any
15101    new_path="${new_path/%.exe/}"
15102    # Do not save /bin paths to all_fixpath_prefixes!
15103  else
15104    # Not in mixed or Windows style, start by that.
15105    new_path=`cmd //c echo $new_path`
15106
15107  input_path="$new_path"
15108  # Check if we need to convert this using DOS-style short mode. If the path
15109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15110  # take no chances and rewrite it.
15111  # Note: m4 eats our [], so we need to use [ and ] instead.
15112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15113  if test "x$has_forbidden_chars" != x; then
15114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15116  fi
15117
15118    # Output is in $new_path
15119
15120  windows_path="$new_path"
15121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15122    unix_path=`$CYGPATH -u "$windows_path"`
15123    new_path="$unix_path"
15124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15126    new_path="$unix_path"
15127  fi
15128
15129    # remove trailing .exe if any
15130    new_path="${new_path/%.exe/}"
15131
15132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15134  fi
15135
15136  else
15137    # We're on a posix platform. Hooray! :)
15138    # First separate the path from the arguments. This will split at the first
15139    # space.
15140    complete="$FOUND_MAKE"
15141    path="${complete%% *}"
15142    tmp="$complete EOL"
15143    arguments="${tmp#* }"
15144
15145    # Cannot rely on the command "which" here since it doesn't always work.
15146    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15147    if test -z "$is_absolute_path"; then
15148      # Path to executable is not absolute. Find it.
15149      IFS_save="$IFS"
15150      IFS=:
15151      for p in $PATH; do
15152        if test -f "$p/$path" && test -x "$p/$path"; then
15153          new_path="$p/$path"
15154          break
15155        fi
15156      done
15157      IFS="$IFS_save"
15158    else
15159      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15160$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15161      new_path="$path"
15162    fi
15163
15164    if test "x$new_path" = x; then
15165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15166$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15167      has_space=`$ECHO "$complete" | $GREP " "`
15168      if test "x$has_space" != x; then
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15170$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15171      fi
15172      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15173    fi
15174  fi
15175
15176  # Now join together the path and the arguments once again
15177  if test "x$arguments" != xEOL; then
15178    new_complete="$new_path ${arguments% *}"
15179  else
15180    new_complete="$new_path"
15181  fi
15182
15183  if test "x$complete" != "x$new_complete"; then
15184    FOUND_MAKE="$new_complete"
15185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15186$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15187  fi
15188
15189        fi
15190      fi
15191    fi
15192  fi
15193
15194    if test "x$FOUND_MAKE" = x; then
15195      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15196    fi
15197  else
15198    # Try our hardest to locate a correct version of GNU make
15199    for ac_prog in gmake
15200do
15201  # Extract the first word of "$ac_prog", so it can be a program name with args.
15202set dummy $ac_prog; ac_word=$2
15203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15204$as_echo_n "checking for $ac_word... " >&6; }
15205if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15206  $as_echo_n "(cached) " >&6
15207else
15208  case $CHECK_GMAKE in
15209  [\\/]* | ?:[\\/]*)
15210  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15211  ;;
15212  *)
15213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15214for as_dir in $PATH
15215do
15216  IFS=$as_save_IFS
15217  test -z "$as_dir" && as_dir=.
15218    for ac_exec_ext in '' $ac_executable_extensions; do
15219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15220    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15222    break 2
15223  fi
15224done
15225  done
15226IFS=$as_save_IFS
15227
15228  ;;
15229esac
15230fi
15231CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15232if test -n "$CHECK_GMAKE"; then
15233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15234$as_echo "$CHECK_GMAKE" >&6; }
15235else
15236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15237$as_echo "no" >&6; }
15238fi
15239
15240
15241  test -n "$CHECK_GMAKE" && break
15242done
15243
15244
15245  MAKE_CANDIDATE=""$CHECK_GMAKE""
15246  DESCRIPTION="gmake in PATH"
15247  if test "x$MAKE_CANDIDATE" != x; then
15248    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15249$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15250    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15251    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15252    if test "x$IS_GNU_MAKE" = x; then
15253      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15254$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15255    else
15256      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15257      if test "x$IS_MODERN_MAKE" = x; then
15258        { $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
15259$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;}
15260      else
15261        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15262          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15263            MAKE_EXPECTED_ENV='cygwin'
15264          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15265            MAKE_EXPECTED_ENV='msys'
15266          else
15267            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15268          fi
15269          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15270          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15271        else
15272          # Not relevant for non-Windows
15273          IS_MAKE_CORRECT_ENV=true
15274        fi
15275        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15276          { $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
15277$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;}
15278        else
15279          FOUND_MAKE=$MAKE_CANDIDATE
15280
15281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15282
15283  # First separate the path from the arguments. This will split at the first
15284  # space.
15285  complete="$FOUND_MAKE"
15286  path="${complete%% *}"
15287  tmp="$complete EOL"
15288  arguments="${tmp#* }"
15289
15290  # Input might be given as Windows format, start by converting to
15291  # unix format.
15292  new_path=`$CYGPATH -u "$path"`
15293
15294  # Now try to locate executable using which
15295  new_path=`$WHICH "$new_path" 2> /dev/null`
15296  # bat and cmd files are not always considered executable in cygwin causing which
15297  # to not find them
15298  if test "x$new_path" = x \
15299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15301    new_path=`$CYGPATH -u "$path"`
15302  fi
15303  if test "x$new_path" = x; then
15304    # Oops. Which didn't find the executable.
15305    # The splitting of arguments from the executable at a space might have been incorrect,
15306    # since paths with space are more likely in Windows. Give it another try with the whole
15307    # argument.
15308    path="$complete"
15309    arguments="EOL"
15310    new_path=`$CYGPATH -u "$path"`
15311    new_path=`$WHICH "$new_path" 2> /dev/null`
15312    # bat and cmd files are not always considered executable in cygwin causing which
15313    # to not find them
15314    if test "x$new_path" = x \
15315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15317      new_path=`$CYGPATH -u "$path"`
15318    fi
15319    if test "x$new_path" = x; then
15320      # It's still not found. Now this is an unrecoverable error.
15321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15322$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15323      has_space=`$ECHO "$complete" | $GREP " "`
15324      if test "x$has_space" != x; then
15325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15327      fi
15328      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15329    fi
15330  fi
15331
15332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15335  # "foo.exe" is OK but "foo" is an error.
15336  #
15337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15338  # It is also a way to make sure we got the proper file name for the real test later on.
15339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15340  if test "x$test_shortpath" = x; then
15341    # Short path failed, file does not exist as specified.
15342    # Try adding .exe or .cmd
15343    if test -f "${new_path}.exe"; then
15344      input_to_shortpath="${new_path}.exe"
15345    elif test -f "${new_path}.cmd"; then
15346      input_to_shortpath="${new_path}.cmd"
15347    else
15348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15349$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15352      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15353    fi
15354  else
15355    input_to_shortpath="$new_path"
15356  fi
15357
15358  # Call helper function which possibly converts this using DOS-style short mode.
15359  # If so, the updated path is stored in $new_path.
15360  new_path="$input_to_shortpath"
15361
15362  input_path="$input_to_shortpath"
15363  # Check if we need to convert this using DOS-style short mode. If the path
15364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15365  # take no chances and rewrite it.
15366  # Note: m4 eats our [], so we need to use [ and ] instead.
15367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15368  if test "x$has_forbidden_chars" != x; then
15369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15373      # Going to short mode and back again did indeed matter. Since short mode is
15374      # case insensitive, let's make it lowercase to improve readability.
15375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15376      # Now convert it back to Unix-stile (cygpath)
15377      input_path=`$CYGPATH -u "$shortmode_path"`
15378      new_path="$input_path"
15379    fi
15380  fi
15381
15382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15383  if test "x$test_cygdrive_prefix" = x; then
15384    # As a simple fix, exclude /usr/bin since it's not a real path.
15385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15387      # a path prefixed by /cygdrive for fixpath to work.
15388      new_path="$CYGWIN_ROOT_PATH$input_path"
15389    fi
15390  fi
15391
15392  # remove trailing .exe if any
15393  new_path="${new_path/%.exe/}"
15394
15395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15396
15397  # First separate the path from the arguments. This will split at the first
15398  # space.
15399  complete="$FOUND_MAKE"
15400  path="${complete%% *}"
15401  tmp="$complete EOL"
15402  arguments="${tmp#* }"
15403
15404  # Input might be given as Windows format, start by converting to
15405  # unix format.
15406  new_path="$path"
15407
15408  windows_path="$new_path"
15409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15410    unix_path=`$CYGPATH -u "$windows_path"`
15411    new_path="$unix_path"
15412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15414    new_path="$unix_path"
15415  fi
15416
15417
15418  # Now try to locate executable using which
15419  new_path=`$WHICH "$new_path" 2> /dev/null`
15420
15421  if test "x$new_path" = x; then
15422    # Oops. Which didn't find the executable.
15423    # The splitting of arguments from the executable at a space might have been incorrect,
15424    # since paths with space are more likely in Windows. Give it another try with the whole
15425    # argument.
15426    path="$complete"
15427    arguments="EOL"
15428    new_path="$path"
15429
15430  windows_path="$new_path"
15431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15432    unix_path=`$CYGPATH -u "$windows_path"`
15433    new_path="$unix_path"
15434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15436    new_path="$unix_path"
15437  fi
15438
15439
15440    new_path=`$WHICH "$new_path" 2> /dev/null`
15441
15442    if test "x$new_path" = x; then
15443      # It's still not found. Now this is an unrecoverable error.
15444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15445$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15446      has_space=`$ECHO "$complete" | $GREP " "`
15447      if test "x$has_space" != x; then
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15450      fi
15451      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15452    fi
15453  fi
15454
15455  # Now new_path has a complete unix path to the binary
15456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15457    # Keep paths in /bin as-is, but remove trailing .exe if any
15458    new_path="${new_path/%.exe/}"
15459    # Do not save /bin paths to all_fixpath_prefixes!
15460  else
15461    # Not in mixed or Windows style, start by that.
15462    new_path=`cmd //c echo $new_path`
15463
15464  input_path="$new_path"
15465  # Check if we need to convert this using DOS-style short mode. If the path
15466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15467  # take no chances and rewrite it.
15468  # Note: m4 eats our [], so we need to use [ and ] instead.
15469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15470  if test "x$has_forbidden_chars" != x; then
15471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15473  fi
15474
15475    # Output is in $new_path
15476
15477  windows_path="$new_path"
15478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15479    unix_path=`$CYGPATH -u "$windows_path"`
15480    new_path="$unix_path"
15481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15483    new_path="$unix_path"
15484  fi
15485
15486    # remove trailing .exe if any
15487    new_path="${new_path/%.exe/}"
15488
15489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15491  fi
15492
15493  else
15494    # We're on a posix platform. Hooray! :)
15495    # First separate the path from the arguments. This will split at the first
15496    # space.
15497    complete="$FOUND_MAKE"
15498    path="${complete%% *}"
15499    tmp="$complete EOL"
15500    arguments="${tmp#* }"
15501
15502    # Cannot rely on the command "which" here since it doesn't always work.
15503    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15504    if test -z "$is_absolute_path"; then
15505      # Path to executable is not absolute. Find it.
15506      IFS_save="$IFS"
15507      IFS=:
15508      for p in $PATH; do
15509        if test -f "$p/$path" && test -x "$p/$path"; then
15510          new_path="$p/$path"
15511          break
15512        fi
15513      done
15514      IFS="$IFS_save"
15515    else
15516      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15517$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15518      new_path="$path"
15519    fi
15520
15521    if test "x$new_path" = x; then
15522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15523$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15524      has_space=`$ECHO "$complete" | $GREP " "`
15525      if test "x$has_space" != x; then
15526        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15527$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15528      fi
15529      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15530    fi
15531  fi
15532
15533  # Now join together the path and the arguments once again
15534  if test "x$arguments" != xEOL; then
15535    new_complete="$new_path ${arguments% *}"
15536  else
15537    new_complete="$new_path"
15538  fi
15539
15540  if test "x$complete" != "x$new_complete"; then
15541    FOUND_MAKE="$new_complete"
15542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15543$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15544  fi
15545
15546        fi
15547      fi
15548    fi
15549  fi
15550
15551
15552    if test "x$FOUND_MAKE" = x; then
15553      for ac_prog in make
15554do
15555  # Extract the first word of "$ac_prog", so it can be a program name with args.
15556set dummy $ac_prog; ac_word=$2
15557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15558$as_echo_n "checking for $ac_word... " >&6; }
15559if ${ac_cv_path_CHECK_MAKE+:} false; then :
15560  $as_echo_n "(cached) " >&6
15561else
15562  case $CHECK_MAKE in
15563  [\\/]* | ?:[\\/]*)
15564  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15565  ;;
15566  *)
15567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15568for as_dir in $PATH
15569do
15570  IFS=$as_save_IFS
15571  test -z "$as_dir" && as_dir=.
15572    for ac_exec_ext in '' $ac_executable_extensions; do
15573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15574    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15576    break 2
15577  fi
15578done
15579  done
15580IFS=$as_save_IFS
15581
15582  ;;
15583esac
15584fi
15585CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15586if test -n "$CHECK_MAKE"; then
15587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15588$as_echo "$CHECK_MAKE" >&6; }
15589else
15590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591$as_echo "no" >&6; }
15592fi
15593
15594
15595  test -n "$CHECK_MAKE" && break
15596done
15597
15598
15599  MAKE_CANDIDATE=""$CHECK_MAKE""
15600  DESCRIPTION="make in PATH"
15601  if test "x$MAKE_CANDIDATE" != x; then
15602    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15603$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15604    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15605    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15606    if test "x$IS_GNU_MAKE" = x; then
15607      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15608$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15609    else
15610      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15611      if test "x$IS_MODERN_MAKE" = x; then
15612        { $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
15613$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;}
15614      else
15615        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15616          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15617            MAKE_EXPECTED_ENV='cygwin'
15618          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15619            MAKE_EXPECTED_ENV='msys'
15620          else
15621            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15622          fi
15623          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15624          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15625        else
15626          # Not relevant for non-Windows
15627          IS_MAKE_CORRECT_ENV=true
15628        fi
15629        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15630          { $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
15631$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;}
15632        else
15633          FOUND_MAKE=$MAKE_CANDIDATE
15634
15635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15636
15637  # First separate the path from the arguments. This will split at the first
15638  # space.
15639  complete="$FOUND_MAKE"
15640  path="${complete%% *}"
15641  tmp="$complete EOL"
15642  arguments="${tmp#* }"
15643
15644  # Input might be given as Windows format, start by converting to
15645  # unix format.
15646  new_path=`$CYGPATH -u "$path"`
15647
15648  # Now try to locate executable using which
15649  new_path=`$WHICH "$new_path" 2> /dev/null`
15650  # bat and cmd files are not always considered executable in cygwin causing which
15651  # to not find them
15652  if test "x$new_path" = x \
15653      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15654      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15655    new_path=`$CYGPATH -u "$path"`
15656  fi
15657  if test "x$new_path" = x; then
15658    # Oops. Which didn't find the executable.
15659    # The splitting of arguments from the executable at a space might have been incorrect,
15660    # since paths with space are more likely in Windows. Give it another try with the whole
15661    # argument.
15662    path="$complete"
15663    arguments="EOL"
15664    new_path=`$CYGPATH -u "$path"`
15665    new_path=`$WHICH "$new_path" 2> /dev/null`
15666    # bat and cmd files are not always considered executable in cygwin causing which
15667    # to not find them
15668    if test "x$new_path" = x \
15669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15671      new_path=`$CYGPATH -u "$path"`
15672    fi
15673    if test "x$new_path" = x; then
15674      # It's still not found. Now this is an unrecoverable error.
15675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15677      has_space=`$ECHO "$complete" | $GREP " "`
15678      if test "x$has_space" != x; then
15679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15681      fi
15682      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15683    fi
15684  fi
15685
15686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15689  # "foo.exe" is OK but "foo" is an error.
15690  #
15691  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15692  # It is also a way to make sure we got the proper file name for the real test later on.
15693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15694  if test "x$test_shortpath" = x; then
15695    # Short path failed, file does not exist as specified.
15696    # Try adding .exe or .cmd
15697    if test -f "${new_path}.exe"; then
15698      input_to_shortpath="${new_path}.exe"
15699    elif test -f "${new_path}.cmd"; then
15700      input_to_shortpath="${new_path}.cmd"
15701    else
15702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15703$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15704      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15705$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15706      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15707    fi
15708  else
15709    input_to_shortpath="$new_path"
15710  fi
15711
15712  # Call helper function which possibly converts this using DOS-style short mode.
15713  # If so, the updated path is stored in $new_path.
15714  new_path="$input_to_shortpath"
15715
15716  input_path="$input_to_shortpath"
15717  # Check if we need to convert this using DOS-style short mode. If the path
15718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15719  # take no chances and rewrite it.
15720  # Note: m4 eats our [], so we need to use [ and ] instead.
15721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15722  if test "x$has_forbidden_chars" != x; then
15723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15724    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15725    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15726    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15727      # Going to short mode and back again did indeed matter. Since short mode is
15728      # case insensitive, let's make it lowercase to improve readability.
15729      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15730      # Now convert it back to Unix-stile (cygpath)
15731      input_path=`$CYGPATH -u "$shortmode_path"`
15732      new_path="$input_path"
15733    fi
15734  fi
15735
15736  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15737  if test "x$test_cygdrive_prefix" = x; then
15738    # As a simple fix, exclude /usr/bin since it's not a real path.
15739    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15740      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15741      # a path prefixed by /cygdrive for fixpath to work.
15742      new_path="$CYGWIN_ROOT_PATH$input_path"
15743    fi
15744  fi
15745
15746  # remove trailing .exe if any
15747  new_path="${new_path/%.exe/}"
15748
15749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15750
15751  # First separate the path from the arguments. This will split at the first
15752  # space.
15753  complete="$FOUND_MAKE"
15754  path="${complete%% *}"
15755  tmp="$complete EOL"
15756  arguments="${tmp#* }"
15757
15758  # Input might be given as Windows format, start by converting to
15759  # unix format.
15760  new_path="$path"
15761
15762  windows_path="$new_path"
15763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15764    unix_path=`$CYGPATH -u "$windows_path"`
15765    new_path="$unix_path"
15766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15768    new_path="$unix_path"
15769  fi
15770
15771
15772  # Now try to locate executable using which
15773  new_path=`$WHICH "$new_path" 2> /dev/null`
15774
15775  if test "x$new_path" = x; then
15776    # Oops. Which didn't find the executable.
15777    # The splitting of arguments from the executable at a space might have been incorrect,
15778    # since paths with space are more likely in Windows. Give it another try with the whole
15779    # argument.
15780    path="$complete"
15781    arguments="EOL"
15782    new_path="$path"
15783
15784  windows_path="$new_path"
15785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15786    unix_path=`$CYGPATH -u "$windows_path"`
15787    new_path="$unix_path"
15788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15790    new_path="$unix_path"
15791  fi
15792
15793
15794    new_path=`$WHICH "$new_path" 2> /dev/null`
15795
15796    if test "x$new_path" = x; then
15797      # It's still not found. Now this is an unrecoverable error.
15798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15799$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15800      has_space=`$ECHO "$complete" | $GREP " "`
15801      if test "x$has_space" != x; then
15802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15804      fi
15805      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15806    fi
15807  fi
15808
15809  # Now new_path has a complete unix path to the binary
15810  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15811    # Keep paths in /bin as-is, but remove trailing .exe if any
15812    new_path="${new_path/%.exe/}"
15813    # Do not save /bin paths to all_fixpath_prefixes!
15814  else
15815    # Not in mixed or Windows style, start by that.
15816    new_path=`cmd //c echo $new_path`
15817
15818  input_path="$new_path"
15819  # Check if we need to convert this using DOS-style short mode. If the path
15820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15821  # take no chances and rewrite it.
15822  # Note: m4 eats our [], so we need to use [ and ] instead.
15823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15824  if test "x$has_forbidden_chars" != x; then
15825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15827  fi
15828
15829    # Output is in $new_path
15830
15831  windows_path="$new_path"
15832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15833    unix_path=`$CYGPATH -u "$windows_path"`
15834    new_path="$unix_path"
15835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15837    new_path="$unix_path"
15838  fi
15839
15840    # remove trailing .exe if any
15841    new_path="${new_path/%.exe/}"
15842
15843    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15844    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15845  fi
15846
15847  else
15848    # We're on a posix platform. Hooray! :)
15849    # First separate the path from the arguments. This will split at the first
15850    # space.
15851    complete="$FOUND_MAKE"
15852    path="${complete%% *}"
15853    tmp="$complete EOL"
15854    arguments="${tmp#* }"
15855
15856    # Cannot rely on the command "which" here since it doesn't always work.
15857    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15858    if test -z "$is_absolute_path"; then
15859      # Path to executable is not absolute. Find it.
15860      IFS_save="$IFS"
15861      IFS=:
15862      for p in $PATH; do
15863        if test -f "$p/$path" && test -x "$p/$path"; then
15864          new_path="$p/$path"
15865          break
15866        fi
15867      done
15868      IFS="$IFS_save"
15869    else
15870      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15871$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15872      new_path="$path"
15873    fi
15874
15875    if test "x$new_path" = x; then
15876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15878      has_space=`$ECHO "$complete" | $GREP " "`
15879      if test "x$has_space" != x; then
15880        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15882      fi
15883      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15884    fi
15885  fi
15886
15887  # Now join together the path and the arguments once again
15888  if test "x$arguments" != xEOL; then
15889    new_complete="$new_path ${arguments% *}"
15890  else
15891    new_complete="$new_path"
15892  fi
15893
15894  if test "x$complete" != "x$new_complete"; then
15895    FOUND_MAKE="$new_complete"
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15897$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15898  fi
15899
15900        fi
15901      fi
15902    fi
15903  fi
15904
15905    fi
15906
15907    if test "x$FOUND_MAKE" = x; then
15908      if test "x$TOOLS_DIR" != x; then
15909        # We have a tools-dir, check that as well before giving up.
15910        OLD_PATH=$PATH
15911        PATH=$TOOLS_DIR:$PATH
15912        for ac_prog in gmake
15913do
15914  # Extract the first word of "$ac_prog", so it can be a program name with args.
15915set dummy $ac_prog; ac_word=$2
15916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15917$as_echo_n "checking for $ac_word... " >&6; }
15918if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15919  $as_echo_n "(cached) " >&6
15920else
15921  case $CHECK_TOOLSDIR_GMAKE in
15922  [\\/]* | ?:[\\/]*)
15923  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15924  ;;
15925  *)
15926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15927for as_dir in $PATH
15928do
15929  IFS=$as_save_IFS
15930  test -z "$as_dir" && as_dir=.
15931    for ac_exec_ext in '' $ac_executable_extensions; do
15932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15933    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15935    break 2
15936  fi
15937done
15938  done
15939IFS=$as_save_IFS
15940
15941  ;;
15942esac
15943fi
15944CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15945if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15947$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15948else
15949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15950$as_echo "no" >&6; }
15951fi
15952
15953
15954  test -n "$CHECK_TOOLSDIR_GMAKE" && break
15955done
15956
15957
15958  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15959  DESCRIPTION="gmake in tools-dir"
15960  if test "x$MAKE_CANDIDATE" != x; then
15961    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15962$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15963    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15964    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15965    if test "x$IS_GNU_MAKE" = x; then
15966      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15967$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15968    else
15969      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15970      if test "x$IS_MODERN_MAKE" = x; then
15971        { $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
15972$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;}
15973      else
15974        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15975          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15976            MAKE_EXPECTED_ENV='cygwin'
15977          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15978            MAKE_EXPECTED_ENV='msys'
15979          else
15980            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15981          fi
15982          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15983          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15984        else
15985          # Not relevant for non-Windows
15986          IS_MAKE_CORRECT_ENV=true
15987        fi
15988        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15989          { $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
15990$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;}
15991        else
15992          FOUND_MAKE=$MAKE_CANDIDATE
15993
15994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15995
15996  # First separate the path from the arguments. This will split at the first
15997  # space.
15998  complete="$FOUND_MAKE"
15999  path="${complete%% *}"
16000  tmp="$complete EOL"
16001  arguments="${tmp#* }"
16002
16003  # Input might be given as Windows format, start by converting to
16004  # unix format.
16005  new_path=`$CYGPATH -u "$path"`
16006
16007  # Now try to locate executable using which
16008  new_path=`$WHICH "$new_path" 2> /dev/null`
16009  # bat and cmd files are not always considered executable in cygwin causing which
16010  # to not find them
16011  if test "x$new_path" = x \
16012      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16013      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16014    new_path=`$CYGPATH -u "$path"`
16015  fi
16016  if test "x$new_path" = x; then
16017    # Oops. Which didn't find the executable.
16018    # The splitting of arguments from the executable at a space might have been incorrect,
16019    # since paths with space are more likely in Windows. Give it another try with the whole
16020    # argument.
16021    path="$complete"
16022    arguments="EOL"
16023    new_path=`$CYGPATH -u "$path"`
16024    new_path=`$WHICH "$new_path" 2> /dev/null`
16025    # bat and cmd files are not always considered executable in cygwin causing which
16026    # to not find them
16027    if test "x$new_path" = x \
16028        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16029        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16030      new_path=`$CYGPATH -u "$path"`
16031    fi
16032    if test "x$new_path" = x; then
16033      # It's still not found. Now this is an unrecoverable error.
16034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16035$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16036      has_space=`$ECHO "$complete" | $GREP " "`
16037      if test "x$has_space" != x; then
16038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16040      fi
16041      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16042    fi
16043  fi
16044
16045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16048  # "foo.exe" is OK but "foo" is an error.
16049  #
16050  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16051  # It is also a way to make sure we got the proper file name for the real test later on.
16052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16053  if test "x$test_shortpath" = x; then
16054    # Short path failed, file does not exist as specified.
16055    # Try adding .exe or .cmd
16056    if test -f "${new_path}.exe"; then
16057      input_to_shortpath="${new_path}.exe"
16058    elif test -f "${new_path}.cmd"; then
16059      input_to_shortpath="${new_path}.cmd"
16060    else
16061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16062$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16063      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16064$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16066    fi
16067  else
16068    input_to_shortpath="$new_path"
16069  fi
16070
16071  # Call helper function which possibly converts this using DOS-style short mode.
16072  # If so, the updated path is stored in $new_path.
16073  new_path="$input_to_shortpath"
16074
16075  input_path="$input_to_shortpath"
16076  # Check if we need to convert this using DOS-style short mode. If the path
16077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16078  # take no chances and rewrite it.
16079  # Note: m4 eats our [], so we need to use [ and ] instead.
16080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16081  if test "x$has_forbidden_chars" != x; then
16082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16086      # Going to short mode and back again did indeed matter. Since short mode is
16087      # case insensitive, let's make it lowercase to improve readability.
16088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16089      # Now convert it back to Unix-stile (cygpath)
16090      input_path=`$CYGPATH -u "$shortmode_path"`
16091      new_path="$input_path"
16092    fi
16093  fi
16094
16095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16096  if test "x$test_cygdrive_prefix" = x; then
16097    # As a simple fix, exclude /usr/bin since it's not a real path.
16098    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16100      # a path prefixed by /cygdrive for fixpath to work.
16101      new_path="$CYGWIN_ROOT_PATH$input_path"
16102    fi
16103  fi
16104
16105  # remove trailing .exe if any
16106  new_path="${new_path/%.exe/}"
16107
16108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16109
16110  # First separate the path from the arguments. This will split at the first
16111  # space.
16112  complete="$FOUND_MAKE"
16113  path="${complete%% *}"
16114  tmp="$complete EOL"
16115  arguments="${tmp#* }"
16116
16117  # Input might be given as Windows format, start by converting to
16118  # unix format.
16119  new_path="$path"
16120
16121  windows_path="$new_path"
16122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16123    unix_path=`$CYGPATH -u "$windows_path"`
16124    new_path="$unix_path"
16125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16127    new_path="$unix_path"
16128  fi
16129
16130
16131  # Now try to locate executable using which
16132  new_path=`$WHICH "$new_path" 2> /dev/null`
16133
16134  if test "x$new_path" = x; then
16135    # Oops. Which didn't find the executable.
16136    # The splitting of arguments from the executable at a space might have been incorrect,
16137    # since paths with space are more likely in Windows. Give it another try with the whole
16138    # argument.
16139    path="$complete"
16140    arguments="EOL"
16141    new_path="$path"
16142
16143  windows_path="$new_path"
16144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16145    unix_path=`$CYGPATH -u "$windows_path"`
16146    new_path="$unix_path"
16147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16149    new_path="$unix_path"
16150  fi
16151
16152
16153    new_path=`$WHICH "$new_path" 2> /dev/null`
16154
16155    if test "x$new_path" = x; then
16156      # It's still not found. Now this is an unrecoverable error.
16157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16158$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16159      has_space=`$ECHO "$complete" | $GREP " "`
16160      if test "x$has_space" != x; then
16161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16163      fi
16164      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16165    fi
16166  fi
16167
16168  # Now new_path has a complete unix path to the binary
16169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16170    # Keep paths in /bin as-is, but remove trailing .exe if any
16171    new_path="${new_path/%.exe/}"
16172    # Do not save /bin paths to all_fixpath_prefixes!
16173  else
16174    # Not in mixed or Windows style, start by that.
16175    new_path=`cmd //c echo $new_path`
16176
16177  input_path="$new_path"
16178  # Check if we need to convert this using DOS-style short mode. If the path
16179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16180  # take no chances and rewrite it.
16181  # Note: m4 eats our [], so we need to use [ and ] instead.
16182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16183  if test "x$has_forbidden_chars" != x; then
16184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16186  fi
16187
16188    # Output is in $new_path
16189
16190  windows_path="$new_path"
16191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16192    unix_path=`$CYGPATH -u "$windows_path"`
16193    new_path="$unix_path"
16194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16196    new_path="$unix_path"
16197  fi
16198
16199    # remove trailing .exe if any
16200    new_path="${new_path/%.exe/}"
16201
16202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16204  fi
16205
16206  else
16207    # We're on a posix platform. Hooray! :)
16208    # First separate the path from the arguments. This will split at the first
16209    # space.
16210    complete="$FOUND_MAKE"
16211    path="${complete%% *}"
16212    tmp="$complete EOL"
16213    arguments="${tmp#* }"
16214
16215    # Cannot rely on the command "which" here since it doesn't always work.
16216    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16217    if test -z "$is_absolute_path"; then
16218      # Path to executable is not absolute. Find it.
16219      IFS_save="$IFS"
16220      IFS=:
16221      for p in $PATH; do
16222        if test -f "$p/$path" && test -x "$p/$path"; then
16223          new_path="$p/$path"
16224          break
16225        fi
16226      done
16227      IFS="$IFS_save"
16228    else
16229      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16230$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16231      new_path="$path"
16232    fi
16233
16234    if test "x$new_path" = x; then
16235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16236$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16237      has_space=`$ECHO "$complete" | $GREP " "`
16238      if test "x$has_space" != x; then
16239        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16240$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16241      fi
16242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16243    fi
16244  fi
16245
16246  # Now join together the path and the arguments once again
16247  if test "x$arguments" != xEOL; then
16248    new_complete="$new_path ${arguments% *}"
16249  else
16250    new_complete="$new_path"
16251  fi
16252
16253  if test "x$complete" != "x$new_complete"; then
16254    FOUND_MAKE="$new_complete"
16255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16256$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16257  fi
16258
16259        fi
16260      fi
16261    fi
16262  fi
16263
16264        if test "x$FOUND_MAKE" = x; then
16265          for ac_prog in make
16266do
16267  # Extract the first word of "$ac_prog", so it can be a program name with args.
16268set dummy $ac_prog; ac_word=$2
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16270$as_echo_n "checking for $ac_word... " >&6; }
16271if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16272  $as_echo_n "(cached) " >&6
16273else
16274  case $CHECK_TOOLSDIR_MAKE in
16275  [\\/]* | ?:[\\/]*)
16276  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16277  ;;
16278  *)
16279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16280for as_dir in $PATH
16281do
16282  IFS=$as_save_IFS
16283  test -z "$as_dir" && as_dir=.
16284    for ac_exec_ext in '' $ac_executable_extensions; do
16285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16286    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16288    break 2
16289  fi
16290done
16291  done
16292IFS=$as_save_IFS
16293
16294  ;;
16295esac
16296fi
16297CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16298if test -n "$CHECK_TOOLSDIR_MAKE"; then
16299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16300$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16301else
16302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16303$as_echo "no" >&6; }
16304fi
16305
16306
16307  test -n "$CHECK_TOOLSDIR_MAKE" && break
16308done
16309
16310
16311  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16312  DESCRIPTION="make in tools-dir"
16313  if test "x$MAKE_CANDIDATE" != x; then
16314    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16315$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16316    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16317    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16318    if test "x$IS_GNU_MAKE" = x; then
16319      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16320$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16321    else
16322      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16323      if test "x$IS_MODERN_MAKE" = x; then
16324        { $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
16325$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;}
16326      else
16327        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16328          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16329            MAKE_EXPECTED_ENV='cygwin'
16330          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16331            MAKE_EXPECTED_ENV='msys'
16332          else
16333            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16334          fi
16335          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16336          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16337        else
16338          # Not relevant for non-Windows
16339          IS_MAKE_CORRECT_ENV=true
16340        fi
16341        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16342          { $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
16343$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;}
16344        else
16345          FOUND_MAKE=$MAKE_CANDIDATE
16346
16347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16348
16349  # First separate the path from the arguments. This will split at the first
16350  # space.
16351  complete="$FOUND_MAKE"
16352  path="${complete%% *}"
16353  tmp="$complete EOL"
16354  arguments="${tmp#* }"
16355
16356  # Input might be given as Windows format, start by converting to
16357  # unix format.
16358  new_path=`$CYGPATH -u "$path"`
16359
16360  # Now try to locate executable using which
16361  new_path=`$WHICH "$new_path" 2> /dev/null`
16362  # bat and cmd files are not always considered executable in cygwin causing which
16363  # to not find them
16364  if test "x$new_path" = x \
16365      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16366      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16367    new_path=`$CYGPATH -u "$path"`
16368  fi
16369  if test "x$new_path" = x; then
16370    # Oops. Which didn't find the executable.
16371    # The splitting of arguments from the executable at a space might have been incorrect,
16372    # since paths with space are more likely in Windows. Give it another try with the whole
16373    # argument.
16374    path="$complete"
16375    arguments="EOL"
16376    new_path=`$CYGPATH -u "$path"`
16377    new_path=`$WHICH "$new_path" 2> /dev/null`
16378    # bat and cmd files are not always considered executable in cygwin causing which
16379    # to not find them
16380    if test "x$new_path" = x \
16381        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16382        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16383      new_path=`$CYGPATH -u "$path"`
16384    fi
16385    if test "x$new_path" = x; then
16386      # It's still not found. Now this is an unrecoverable error.
16387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16388$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16389      has_space=`$ECHO "$complete" | $GREP " "`
16390      if test "x$has_space" != x; then
16391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16393      fi
16394      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16395    fi
16396  fi
16397
16398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16401  # "foo.exe" is OK but "foo" is an error.
16402  #
16403  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16404  # It is also a way to make sure we got the proper file name for the real test later on.
16405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16406  if test "x$test_shortpath" = x; then
16407    # Short path failed, file does not exist as specified.
16408    # Try adding .exe or .cmd
16409    if test -f "${new_path}.exe"; then
16410      input_to_shortpath="${new_path}.exe"
16411    elif test -f "${new_path}.cmd"; then
16412      input_to_shortpath="${new_path}.cmd"
16413    else
16414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16416      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16417$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16418      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16419    fi
16420  else
16421    input_to_shortpath="$new_path"
16422  fi
16423
16424  # Call helper function which possibly converts this using DOS-style short mode.
16425  # If so, the updated path is stored in $new_path.
16426  new_path="$input_to_shortpath"
16427
16428  input_path="$input_to_shortpath"
16429  # Check if we need to convert this using DOS-style short mode. If the path
16430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16431  # take no chances and rewrite it.
16432  # Note: m4 eats our [], so we need to use [ and ] instead.
16433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16434  if test "x$has_forbidden_chars" != x; then
16435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16439      # Going to short mode and back again did indeed matter. Since short mode is
16440      # case insensitive, let's make it lowercase to improve readability.
16441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16442      # Now convert it back to Unix-stile (cygpath)
16443      input_path=`$CYGPATH -u "$shortmode_path"`
16444      new_path="$input_path"
16445    fi
16446  fi
16447
16448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16449  if test "x$test_cygdrive_prefix" = x; then
16450    # As a simple fix, exclude /usr/bin since it's not a real path.
16451    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16453      # a path prefixed by /cygdrive for fixpath to work.
16454      new_path="$CYGWIN_ROOT_PATH$input_path"
16455    fi
16456  fi
16457
16458  # remove trailing .exe if any
16459  new_path="${new_path/%.exe/}"
16460
16461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16462
16463  # First separate the path from the arguments. This will split at the first
16464  # space.
16465  complete="$FOUND_MAKE"
16466  path="${complete%% *}"
16467  tmp="$complete EOL"
16468  arguments="${tmp#* }"
16469
16470  # Input might be given as Windows format, start by converting to
16471  # unix format.
16472  new_path="$path"
16473
16474  windows_path="$new_path"
16475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16476    unix_path=`$CYGPATH -u "$windows_path"`
16477    new_path="$unix_path"
16478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16480    new_path="$unix_path"
16481  fi
16482
16483
16484  # Now try to locate executable using which
16485  new_path=`$WHICH "$new_path" 2> /dev/null`
16486
16487  if test "x$new_path" = x; then
16488    # Oops. Which didn't find the executable.
16489    # The splitting of arguments from the executable at a space might have been incorrect,
16490    # since paths with space are more likely in Windows. Give it another try with the whole
16491    # argument.
16492    path="$complete"
16493    arguments="EOL"
16494    new_path="$path"
16495
16496  windows_path="$new_path"
16497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16498    unix_path=`$CYGPATH -u "$windows_path"`
16499    new_path="$unix_path"
16500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16502    new_path="$unix_path"
16503  fi
16504
16505
16506    new_path=`$WHICH "$new_path" 2> /dev/null`
16507
16508    if test "x$new_path" = x; then
16509      # It's still not found. Now this is an unrecoverable error.
16510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16511$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16512      has_space=`$ECHO "$complete" | $GREP " "`
16513      if test "x$has_space" != x; then
16514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16516      fi
16517      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16518    fi
16519  fi
16520
16521  # Now new_path has a complete unix path to the binary
16522  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16523    # Keep paths in /bin as-is, but remove trailing .exe if any
16524    new_path="${new_path/%.exe/}"
16525    # Do not save /bin paths to all_fixpath_prefixes!
16526  else
16527    # Not in mixed or Windows style, start by that.
16528    new_path=`cmd //c echo $new_path`
16529
16530  input_path="$new_path"
16531  # Check if we need to convert this using DOS-style short mode. If the path
16532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16533  # take no chances and rewrite it.
16534  # Note: m4 eats our [], so we need to use [ and ] instead.
16535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16536  if test "x$has_forbidden_chars" != x; then
16537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16539  fi
16540
16541    # Output is in $new_path
16542
16543  windows_path="$new_path"
16544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16545    unix_path=`$CYGPATH -u "$windows_path"`
16546    new_path="$unix_path"
16547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16549    new_path="$unix_path"
16550  fi
16551
16552    # remove trailing .exe if any
16553    new_path="${new_path/%.exe/}"
16554
16555    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16556    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16557  fi
16558
16559  else
16560    # We're on a posix platform. Hooray! :)
16561    # First separate the path from the arguments. This will split at the first
16562    # space.
16563    complete="$FOUND_MAKE"
16564    path="${complete%% *}"
16565    tmp="$complete EOL"
16566    arguments="${tmp#* }"
16567
16568    # Cannot rely on the command "which" here since it doesn't always work.
16569    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16570    if test -z "$is_absolute_path"; then
16571      # Path to executable is not absolute. Find it.
16572      IFS_save="$IFS"
16573      IFS=:
16574      for p in $PATH; do
16575        if test -f "$p/$path" && test -x "$p/$path"; then
16576          new_path="$p/$path"
16577          break
16578        fi
16579      done
16580      IFS="$IFS_save"
16581    else
16582      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16583$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16584      new_path="$path"
16585    fi
16586
16587    if test "x$new_path" = x; then
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16589$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16590      has_space=`$ECHO "$complete" | $GREP " "`
16591      if test "x$has_space" != x; then
16592        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16593$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16594      fi
16595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16596    fi
16597  fi
16598
16599  # Now join together the path and the arguments once again
16600  if test "x$arguments" != xEOL; then
16601    new_complete="$new_path ${arguments% *}"
16602  else
16603    new_complete="$new_path"
16604  fi
16605
16606  if test "x$complete" != "x$new_complete"; then
16607    FOUND_MAKE="$new_complete"
16608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16609$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16610  fi
16611
16612        fi
16613      fi
16614    fi
16615  fi
16616
16617        fi
16618        PATH=$OLD_PATH
16619      fi
16620    fi
16621
16622    if test "x$FOUND_MAKE" = x; then
16623      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
16624    fi
16625  fi
16626
16627  MAKE=$FOUND_MAKE
16628
16629  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16630$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16631
16632
16633
16634  # Test if find supports -delete
16635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16636$as_echo_n "checking if find supports -delete... " >&6; }
16637  FIND_DELETE="-delete"
16638
16639  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16640
16641  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16642
16643  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16644  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16645    # No, it does not.
16646    rm $DELETEDIR/TestIfFindSupportsDelete
16647    FIND_DELETE="-exec rm \{\} \+"
16648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16649$as_echo "no" >&6; }
16650  else
16651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16652$as_echo "yes" >&6; }
16653  fi
16654  rmdir $DELETEDIR
16655
16656
16657
16658  # These tools might not be installed by default,
16659  # need hint on how to install them.
16660
16661
16662
16663  # Publish this variable in the help.
16664
16665
16666  if test "x$UNZIP" = x; then
16667    # The variable is not set by user, try to locate tool using the code snippet
16668    for ac_prog in unzip
16669do
16670  # Extract the first word of "$ac_prog", so it can be a program name with args.
16671set dummy $ac_prog; ac_word=$2
16672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16673$as_echo_n "checking for $ac_word... " >&6; }
16674if ${ac_cv_path_UNZIP+:} false; then :
16675  $as_echo_n "(cached) " >&6
16676else
16677  case $UNZIP in
16678  [\\/]* | ?:[\\/]*)
16679  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16680  ;;
16681  *)
16682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16683for as_dir in $PATH
16684do
16685  IFS=$as_save_IFS
16686  test -z "$as_dir" && as_dir=.
16687    for ac_exec_ext in '' $ac_executable_extensions; do
16688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16689    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16691    break 2
16692  fi
16693done
16694  done
16695IFS=$as_save_IFS
16696
16697  ;;
16698esac
16699fi
16700UNZIP=$ac_cv_path_UNZIP
16701if test -n "$UNZIP"; then
16702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16703$as_echo "$UNZIP" >&6; }
16704else
16705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16706$as_echo "no" >&6; }
16707fi
16708
16709
16710  test -n "$UNZIP" && break
16711done
16712
16713  else
16714    # The variable is set, but is it from the command line or the environment?
16715
16716    # Try to remove the string !UNZIP! from our list.
16717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16719      # If it failed, the variable was not from the command line. Ignore it,
16720      # but warn the user (except for BASH, which is always set by the calling BASH).
16721      if test "xUNZIP" != xBASH; then
16722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16723$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16724      fi
16725      # Try to locate tool using the code snippet
16726      for ac_prog in unzip
16727do
16728  # Extract the first word of "$ac_prog", so it can be a program name with args.
16729set dummy $ac_prog; ac_word=$2
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16731$as_echo_n "checking for $ac_word... " >&6; }
16732if ${ac_cv_path_UNZIP+:} false; then :
16733  $as_echo_n "(cached) " >&6
16734else
16735  case $UNZIP in
16736  [\\/]* | ?:[\\/]*)
16737  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16738  ;;
16739  *)
16740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16741for as_dir in $PATH
16742do
16743  IFS=$as_save_IFS
16744  test -z "$as_dir" && as_dir=.
16745    for ac_exec_ext in '' $ac_executable_extensions; do
16746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16747    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16749    break 2
16750  fi
16751done
16752  done
16753IFS=$as_save_IFS
16754
16755  ;;
16756esac
16757fi
16758UNZIP=$ac_cv_path_UNZIP
16759if test -n "$UNZIP"; then
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16761$as_echo "$UNZIP" >&6; }
16762else
16763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16764$as_echo "no" >&6; }
16765fi
16766
16767
16768  test -n "$UNZIP" && break
16769done
16770
16771    else
16772      # If it succeeded, then it was overridden by the user. We will use it
16773      # for the tool.
16774
16775      # First remove it from the list of overridden variables, so we can test
16776      # for unknown variables in the end.
16777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16778
16779      # Check if the provided tool contains a complete path.
16780      tool_specified="$UNZIP"
16781      tool_basename="${tool_specified##*/}"
16782      if test "x$tool_basename" = "x$tool_specified"; then
16783        # A command without a complete path is provided, search $PATH.
16784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16785$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16786        # Extract the first word of "$tool_basename", so it can be a program name with args.
16787set dummy $tool_basename; ac_word=$2
16788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16789$as_echo_n "checking for $ac_word... " >&6; }
16790if ${ac_cv_path_UNZIP+:} false; then :
16791  $as_echo_n "(cached) " >&6
16792else
16793  case $UNZIP in
16794  [\\/]* | ?:[\\/]*)
16795  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16796  ;;
16797  *)
16798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16799for as_dir in $PATH
16800do
16801  IFS=$as_save_IFS
16802  test -z "$as_dir" && as_dir=.
16803    for ac_exec_ext in '' $ac_executable_extensions; do
16804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16805    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16807    break 2
16808  fi
16809done
16810  done
16811IFS=$as_save_IFS
16812
16813  ;;
16814esac
16815fi
16816UNZIP=$ac_cv_path_UNZIP
16817if test -n "$UNZIP"; then
16818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16819$as_echo "$UNZIP" >&6; }
16820else
16821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16822$as_echo "no" >&6; }
16823fi
16824
16825
16826        if test "x$UNZIP" = x; then
16827          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16828        fi
16829      else
16830        # Otherwise we believe it is a complete path. Use it as it is.
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16832$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16834$as_echo_n "checking for UNZIP... " >&6; }
16835        if test ! -x "$tool_specified"; then
16836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16837$as_echo "not found" >&6; }
16838          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16839        fi
16840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16841$as_echo "$tool_specified" >&6; }
16842      fi
16843    fi
16844  fi
16845
16846
16847
16848  if test "x$UNZIP" = x; then
16849    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16850  fi
16851
16852
16853
16854
16855
16856  # Publish this variable in the help.
16857
16858
16859  if test "x$ZIP" = x; then
16860    # The variable is not set by user, try to locate tool using the code snippet
16861    for ac_prog in zip
16862do
16863  # Extract the first word of "$ac_prog", so it can be a program name with args.
16864set dummy $ac_prog; ac_word=$2
16865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16866$as_echo_n "checking for $ac_word... " >&6; }
16867if ${ac_cv_path_ZIP+:} false; then :
16868  $as_echo_n "(cached) " >&6
16869else
16870  case $ZIP in
16871  [\\/]* | ?:[\\/]*)
16872  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16873  ;;
16874  *)
16875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16876for as_dir in $PATH
16877do
16878  IFS=$as_save_IFS
16879  test -z "$as_dir" && as_dir=.
16880    for ac_exec_ext in '' $ac_executable_extensions; do
16881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16882    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16884    break 2
16885  fi
16886done
16887  done
16888IFS=$as_save_IFS
16889
16890  ;;
16891esac
16892fi
16893ZIP=$ac_cv_path_ZIP
16894if test -n "$ZIP"; then
16895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16896$as_echo "$ZIP" >&6; }
16897else
16898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16899$as_echo "no" >&6; }
16900fi
16901
16902
16903  test -n "$ZIP" && break
16904done
16905
16906  else
16907    # The variable is set, but is it from the command line or the environment?
16908
16909    # Try to remove the string !ZIP! from our list.
16910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16912      # If it failed, the variable was not from the command line. Ignore it,
16913      # but warn the user (except for BASH, which is always set by the calling BASH).
16914      if test "xZIP" != xBASH; then
16915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16916$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16917      fi
16918      # Try to locate tool using the code snippet
16919      for ac_prog in zip
16920do
16921  # Extract the first word of "$ac_prog", so it can be a program name with args.
16922set dummy $ac_prog; ac_word=$2
16923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16924$as_echo_n "checking for $ac_word... " >&6; }
16925if ${ac_cv_path_ZIP+:} false; then :
16926  $as_echo_n "(cached) " >&6
16927else
16928  case $ZIP in
16929  [\\/]* | ?:[\\/]*)
16930  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16931  ;;
16932  *)
16933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16934for as_dir in $PATH
16935do
16936  IFS=$as_save_IFS
16937  test -z "$as_dir" && as_dir=.
16938    for ac_exec_ext in '' $ac_executable_extensions; do
16939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16940    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16942    break 2
16943  fi
16944done
16945  done
16946IFS=$as_save_IFS
16947
16948  ;;
16949esac
16950fi
16951ZIP=$ac_cv_path_ZIP
16952if test -n "$ZIP"; then
16953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16954$as_echo "$ZIP" >&6; }
16955else
16956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16957$as_echo "no" >&6; }
16958fi
16959
16960
16961  test -n "$ZIP" && break
16962done
16963
16964    else
16965      # If it succeeded, then it was overridden by the user. We will use it
16966      # for the tool.
16967
16968      # First remove it from the list of overridden variables, so we can test
16969      # for unknown variables in the end.
16970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16971
16972      # Check if the provided tool contains a complete path.
16973      tool_specified="$ZIP"
16974      tool_basename="${tool_specified##*/}"
16975      if test "x$tool_basename" = "x$tool_specified"; then
16976        # A command without a complete path is provided, search $PATH.
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16978$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16979        # Extract the first word of "$tool_basename", so it can be a program name with args.
16980set dummy $tool_basename; ac_word=$2
16981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16982$as_echo_n "checking for $ac_word... " >&6; }
16983if ${ac_cv_path_ZIP+:} false; then :
16984  $as_echo_n "(cached) " >&6
16985else
16986  case $ZIP in
16987  [\\/]* | ?:[\\/]*)
16988  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16989  ;;
16990  *)
16991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16992for as_dir in $PATH
16993do
16994  IFS=$as_save_IFS
16995  test -z "$as_dir" && as_dir=.
16996    for ac_exec_ext in '' $ac_executable_extensions; do
16997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16998    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17000    break 2
17001  fi
17002done
17003  done
17004IFS=$as_save_IFS
17005
17006  ;;
17007esac
17008fi
17009ZIP=$ac_cv_path_ZIP
17010if test -n "$ZIP"; then
17011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17012$as_echo "$ZIP" >&6; }
17013else
17014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17015$as_echo "no" >&6; }
17016fi
17017
17018
17019        if test "x$ZIP" = x; then
17020          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17021        fi
17022      else
17023        # Otherwise we believe it is a complete path. Use it as it is.
17024        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17025$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17027$as_echo_n "checking for ZIP... " >&6; }
17028        if test ! -x "$tool_specified"; then
17029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17030$as_echo "not found" >&6; }
17031          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17032        fi
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17034$as_echo "$tool_specified" >&6; }
17035      fi
17036    fi
17037  fi
17038
17039
17040
17041  if test "x$ZIP" = x; then
17042    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17043  fi
17044
17045
17046
17047  # Non-required basic tools
17048
17049
17050
17051  # Publish this variable in the help.
17052
17053
17054  if test "x$LDD" = x; then
17055    # The variable is not set by user, try to locate tool using the code snippet
17056    for ac_prog in ldd
17057do
17058  # Extract the first word of "$ac_prog", so it can be a program name with args.
17059set dummy $ac_prog; ac_word=$2
17060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17061$as_echo_n "checking for $ac_word... " >&6; }
17062if ${ac_cv_path_LDD+:} false; then :
17063  $as_echo_n "(cached) " >&6
17064else
17065  case $LDD in
17066  [\\/]* | ?:[\\/]*)
17067  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17068  ;;
17069  *)
17070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17071for as_dir in $PATH
17072do
17073  IFS=$as_save_IFS
17074  test -z "$as_dir" && as_dir=.
17075    for ac_exec_ext in '' $ac_executable_extensions; do
17076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17077    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17079    break 2
17080  fi
17081done
17082  done
17083IFS=$as_save_IFS
17084
17085  ;;
17086esac
17087fi
17088LDD=$ac_cv_path_LDD
17089if test -n "$LDD"; then
17090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17091$as_echo "$LDD" >&6; }
17092else
17093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17094$as_echo "no" >&6; }
17095fi
17096
17097
17098  test -n "$LDD" && break
17099done
17100
17101  else
17102    # The variable is set, but is it from the command line or the environment?
17103
17104    # Try to remove the string !LDD! from our list.
17105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17107      # If it failed, the variable was not from the command line. Ignore it,
17108      # but warn the user (except for BASH, which is always set by the calling BASH).
17109      if test "xLDD" != xBASH; then
17110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17111$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17112      fi
17113      # Try to locate tool using the code snippet
17114      for ac_prog in ldd
17115do
17116  # Extract the first word of "$ac_prog", so it can be a program name with args.
17117set dummy $ac_prog; ac_word=$2
17118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17119$as_echo_n "checking for $ac_word... " >&6; }
17120if ${ac_cv_path_LDD+:} false; then :
17121  $as_echo_n "(cached) " >&6
17122else
17123  case $LDD in
17124  [\\/]* | ?:[\\/]*)
17125  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17126  ;;
17127  *)
17128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17129for as_dir in $PATH
17130do
17131  IFS=$as_save_IFS
17132  test -z "$as_dir" && as_dir=.
17133    for ac_exec_ext in '' $ac_executable_extensions; do
17134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17135    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17137    break 2
17138  fi
17139done
17140  done
17141IFS=$as_save_IFS
17142
17143  ;;
17144esac
17145fi
17146LDD=$ac_cv_path_LDD
17147if test -n "$LDD"; then
17148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17149$as_echo "$LDD" >&6; }
17150else
17151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17152$as_echo "no" >&6; }
17153fi
17154
17155
17156  test -n "$LDD" && break
17157done
17158
17159    else
17160      # If it succeeded, then it was overridden by the user. We will use it
17161      # for the tool.
17162
17163      # First remove it from the list of overridden variables, so we can test
17164      # for unknown variables in the end.
17165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17166
17167      # Check if the provided tool contains a complete path.
17168      tool_specified="$LDD"
17169      tool_basename="${tool_specified##*/}"
17170      if test "x$tool_basename" = "x$tool_specified"; then
17171        # A command without a complete path is provided, search $PATH.
17172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17173$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17174        # Extract the first word of "$tool_basename", so it can be a program name with args.
17175set dummy $tool_basename; ac_word=$2
17176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17177$as_echo_n "checking for $ac_word... " >&6; }
17178if ${ac_cv_path_LDD+:} false; then :
17179  $as_echo_n "(cached) " >&6
17180else
17181  case $LDD in
17182  [\\/]* | ?:[\\/]*)
17183  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17184  ;;
17185  *)
17186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17187for as_dir in $PATH
17188do
17189  IFS=$as_save_IFS
17190  test -z "$as_dir" && as_dir=.
17191    for ac_exec_ext in '' $ac_executable_extensions; do
17192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17193    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17195    break 2
17196  fi
17197done
17198  done
17199IFS=$as_save_IFS
17200
17201  ;;
17202esac
17203fi
17204LDD=$ac_cv_path_LDD
17205if test -n "$LDD"; then
17206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17207$as_echo "$LDD" >&6; }
17208else
17209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17210$as_echo "no" >&6; }
17211fi
17212
17213
17214        if test "x$LDD" = x; then
17215          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17216        fi
17217      else
17218        # Otherwise we believe it is a complete path. Use it as it is.
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17220$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17222$as_echo_n "checking for LDD... " >&6; }
17223        if test ! -x "$tool_specified"; then
17224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17225$as_echo "not found" >&6; }
17226          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17227        fi
17228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17229$as_echo "$tool_specified" >&6; }
17230      fi
17231    fi
17232  fi
17233
17234
17235  if test "x$LDD" = "x"; then
17236    # List shared lib dependencies is used for
17237    # debug output and checking for forbidden dependencies.
17238    # We can build without it.
17239    LDD="true"
17240  fi
17241
17242
17243  # Publish this variable in the help.
17244
17245
17246  if test "x$OTOOL" = x; then
17247    # The variable is not set by user, try to locate tool using the code snippet
17248    for ac_prog in otool
17249do
17250  # Extract the first word of "$ac_prog", so it can be a program name with args.
17251set dummy $ac_prog; ac_word=$2
17252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17253$as_echo_n "checking for $ac_word... " >&6; }
17254if ${ac_cv_path_OTOOL+:} false; then :
17255  $as_echo_n "(cached) " >&6
17256else
17257  case $OTOOL in
17258  [\\/]* | ?:[\\/]*)
17259  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17260  ;;
17261  *)
17262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17263for as_dir in $PATH
17264do
17265  IFS=$as_save_IFS
17266  test -z "$as_dir" && as_dir=.
17267    for ac_exec_ext in '' $ac_executable_extensions; do
17268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17269    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17271    break 2
17272  fi
17273done
17274  done
17275IFS=$as_save_IFS
17276
17277  ;;
17278esac
17279fi
17280OTOOL=$ac_cv_path_OTOOL
17281if test -n "$OTOOL"; then
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17283$as_echo "$OTOOL" >&6; }
17284else
17285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17286$as_echo "no" >&6; }
17287fi
17288
17289
17290  test -n "$OTOOL" && break
17291done
17292
17293  else
17294    # The variable is set, but is it from the command line or the environment?
17295
17296    # Try to remove the string !OTOOL! from our list.
17297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17299      # If it failed, the variable was not from the command line. Ignore it,
17300      # but warn the user (except for BASH, which is always set by the calling BASH).
17301      if test "xOTOOL" != xBASH; then
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17303$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17304      fi
17305      # Try to locate tool using the code snippet
17306      for ac_prog in otool
17307do
17308  # Extract the first word of "$ac_prog", so it can be a program name with args.
17309set dummy $ac_prog; ac_word=$2
17310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17311$as_echo_n "checking for $ac_word... " >&6; }
17312if ${ac_cv_path_OTOOL+:} false; then :
17313  $as_echo_n "(cached) " >&6
17314else
17315  case $OTOOL in
17316  [\\/]* | ?:[\\/]*)
17317  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17318  ;;
17319  *)
17320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17321for as_dir in $PATH
17322do
17323  IFS=$as_save_IFS
17324  test -z "$as_dir" && as_dir=.
17325    for ac_exec_ext in '' $ac_executable_extensions; do
17326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17327    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17329    break 2
17330  fi
17331done
17332  done
17333IFS=$as_save_IFS
17334
17335  ;;
17336esac
17337fi
17338OTOOL=$ac_cv_path_OTOOL
17339if test -n "$OTOOL"; then
17340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17341$as_echo "$OTOOL" >&6; }
17342else
17343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17344$as_echo "no" >&6; }
17345fi
17346
17347
17348  test -n "$OTOOL" && break
17349done
17350
17351    else
17352      # If it succeeded, then it was overridden by the user. We will use it
17353      # for the tool.
17354
17355      # First remove it from the list of overridden variables, so we can test
17356      # for unknown variables in the end.
17357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17358
17359      # Check if the provided tool contains a complete path.
17360      tool_specified="$OTOOL"
17361      tool_basename="${tool_specified##*/}"
17362      if test "x$tool_basename" = "x$tool_specified"; then
17363        # A command without a complete path is provided, search $PATH.
17364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17365$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17366        # Extract the first word of "$tool_basename", so it can be a program name with args.
17367set dummy $tool_basename; ac_word=$2
17368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17369$as_echo_n "checking for $ac_word... " >&6; }
17370if ${ac_cv_path_OTOOL+:} false; then :
17371  $as_echo_n "(cached) " >&6
17372else
17373  case $OTOOL in
17374  [\\/]* | ?:[\\/]*)
17375  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17376  ;;
17377  *)
17378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17379for as_dir in $PATH
17380do
17381  IFS=$as_save_IFS
17382  test -z "$as_dir" && as_dir=.
17383    for ac_exec_ext in '' $ac_executable_extensions; do
17384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17385    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17387    break 2
17388  fi
17389done
17390  done
17391IFS=$as_save_IFS
17392
17393  ;;
17394esac
17395fi
17396OTOOL=$ac_cv_path_OTOOL
17397if test -n "$OTOOL"; then
17398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17399$as_echo "$OTOOL" >&6; }
17400else
17401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17402$as_echo "no" >&6; }
17403fi
17404
17405
17406        if test "x$OTOOL" = x; then
17407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17408        fi
17409      else
17410        # Otherwise we believe it is a complete path. Use it as it is.
17411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17412$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17414$as_echo_n "checking for OTOOL... " >&6; }
17415        if test ! -x "$tool_specified"; then
17416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17417$as_echo "not found" >&6; }
17418          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17419        fi
17420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17421$as_echo "$tool_specified" >&6; }
17422      fi
17423    fi
17424  fi
17425
17426
17427  if test "x$OTOOL" = "x"; then
17428    OTOOL="true"
17429  fi
17430
17431
17432  # Publish this variable in the help.
17433
17434
17435  if test "x$READELF" = x; then
17436    # The variable is not set by user, try to locate tool using the code snippet
17437    for ac_prog in greadelf readelf
17438do
17439  # Extract the first word of "$ac_prog", so it can be a program name with args.
17440set dummy $ac_prog; ac_word=$2
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17442$as_echo_n "checking for $ac_word... " >&6; }
17443if ${ac_cv_path_READELF+:} false; then :
17444  $as_echo_n "(cached) " >&6
17445else
17446  case $READELF in
17447  [\\/]* | ?:[\\/]*)
17448  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17449  ;;
17450  *)
17451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17452for as_dir in $PATH
17453do
17454  IFS=$as_save_IFS
17455  test -z "$as_dir" && as_dir=.
17456    for ac_exec_ext in '' $ac_executable_extensions; do
17457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17458    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17460    break 2
17461  fi
17462done
17463  done
17464IFS=$as_save_IFS
17465
17466  ;;
17467esac
17468fi
17469READELF=$ac_cv_path_READELF
17470if test -n "$READELF"; then
17471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17472$as_echo "$READELF" >&6; }
17473else
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17475$as_echo "no" >&6; }
17476fi
17477
17478
17479  test -n "$READELF" && break
17480done
17481
17482  else
17483    # The variable is set, but is it from the command line or the environment?
17484
17485    # Try to remove the string !READELF! from our list.
17486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17488      # If it failed, the variable was not from the command line. Ignore it,
17489      # but warn the user (except for BASH, which is always set by the calling BASH).
17490      if test "xREADELF" != xBASH; then
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17492$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17493      fi
17494      # Try to locate tool using the code snippet
17495      for ac_prog in greadelf readelf
17496do
17497  # Extract the first word of "$ac_prog", so it can be a program name with args.
17498set dummy $ac_prog; ac_word=$2
17499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17500$as_echo_n "checking for $ac_word... " >&6; }
17501if ${ac_cv_path_READELF+:} false; then :
17502  $as_echo_n "(cached) " >&6
17503else
17504  case $READELF in
17505  [\\/]* | ?:[\\/]*)
17506  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17507  ;;
17508  *)
17509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17510for as_dir in $PATH
17511do
17512  IFS=$as_save_IFS
17513  test -z "$as_dir" && as_dir=.
17514    for ac_exec_ext in '' $ac_executable_extensions; do
17515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17516    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17518    break 2
17519  fi
17520done
17521  done
17522IFS=$as_save_IFS
17523
17524  ;;
17525esac
17526fi
17527READELF=$ac_cv_path_READELF
17528if test -n "$READELF"; then
17529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17530$as_echo "$READELF" >&6; }
17531else
17532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17533$as_echo "no" >&6; }
17534fi
17535
17536
17537  test -n "$READELF" && break
17538done
17539
17540    else
17541      # If it succeeded, then it was overridden by the user. We will use it
17542      # for the tool.
17543
17544      # First remove it from the list of overridden variables, so we can test
17545      # for unknown variables in the end.
17546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17547
17548      # Check if the provided tool contains a complete path.
17549      tool_specified="$READELF"
17550      tool_basename="${tool_specified##*/}"
17551      if test "x$tool_basename" = "x$tool_specified"; then
17552        # A command without a complete path is provided, search $PATH.
17553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17554$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17555        # Extract the first word of "$tool_basename", so it can be a program name with args.
17556set dummy $tool_basename; ac_word=$2
17557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17558$as_echo_n "checking for $ac_word... " >&6; }
17559if ${ac_cv_path_READELF+:} false; then :
17560  $as_echo_n "(cached) " >&6
17561else
17562  case $READELF in
17563  [\\/]* | ?:[\\/]*)
17564  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17565  ;;
17566  *)
17567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17568for as_dir in $PATH
17569do
17570  IFS=$as_save_IFS
17571  test -z "$as_dir" && as_dir=.
17572    for ac_exec_ext in '' $ac_executable_extensions; do
17573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17574    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17576    break 2
17577  fi
17578done
17579  done
17580IFS=$as_save_IFS
17581
17582  ;;
17583esac
17584fi
17585READELF=$ac_cv_path_READELF
17586if test -n "$READELF"; then
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17588$as_echo "$READELF" >&6; }
17589else
17590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17591$as_echo "no" >&6; }
17592fi
17593
17594
17595        if test "x$READELF" = x; then
17596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17597        fi
17598      else
17599        # Otherwise we believe it is a complete path. Use it as it is.
17600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17601$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17603$as_echo_n "checking for READELF... " >&6; }
17604        if test ! -x "$tool_specified"; then
17605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17606$as_echo "not found" >&6; }
17607          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17608        fi
17609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17610$as_echo "$tool_specified" >&6; }
17611      fi
17612    fi
17613  fi
17614
17615
17616
17617
17618  # Publish this variable in the help.
17619
17620
17621  if test "x$HG" = x; then
17622    # The variable is not set by user, try to locate tool using the code snippet
17623    for ac_prog in hg
17624do
17625  # Extract the first word of "$ac_prog", so it can be a program name with args.
17626set dummy $ac_prog; ac_word=$2
17627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17628$as_echo_n "checking for $ac_word... " >&6; }
17629if ${ac_cv_path_HG+:} false; then :
17630  $as_echo_n "(cached) " >&6
17631else
17632  case $HG in
17633  [\\/]* | ?:[\\/]*)
17634  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17635  ;;
17636  *)
17637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17638for as_dir in $PATH
17639do
17640  IFS=$as_save_IFS
17641  test -z "$as_dir" && as_dir=.
17642    for ac_exec_ext in '' $ac_executable_extensions; do
17643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17644    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17646    break 2
17647  fi
17648done
17649  done
17650IFS=$as_save_IFS
17651
17652  ;;
17653esac
17654fi
17655HG=$ac_cv_path_HG
17656if test -n "$HG"; then
17657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17658$as_echo "$HG" >&6; }
17659else
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17661$as_echo "no" >&6; }
17662fi
17663
17664
17665  test -n "$HG" && break
17666done
17667
17668  else
17669    # The variable is set, but is it from the command line or the environment?
17670
17671    # Try to remove the string !HG! from our list.
17672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17674      # If it failed, the variable was not from the command line. Ignore it,
17675      # but warn the user (except for BASH, which is always set by the calling BASH).
17676      if test "xHG" != xBASH; then
17677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17678$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17679      fi
17680      # Try to locate tool using the code snippet
17681      for ac_prog in hg
17682do
17683  # Extract the first word of "$ac_prog", so it can be a program name with args.
17684set dummy $ac_prog; ac_word=$2
17685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17686$as_echo_n "checking for $ac_word... " >&6; }
17687if ${ac_cv_path_HG+:} false; then :
17688  $as_echo_n "(cached) " >&6
17689else
17690  case $HG in
17691  [\\/]* | ?:[\\/]*)
17692  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17693  ;;
17694  *)
17695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17696for as_dir in $PATH
17697do
17698  IFS=$as_save_IFS
17699  test -z "$as_dir" && as_dir=.
17700    for ac_exec_ext in '' $ac_executable_extensions; do
17701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17702    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17704    break 2
17705  fi
17706done
17707  done
17708IFS=$as_save_IFS
17709
17710  ;;
17711esac
17712fi
17713HG=$ac_cv_path_HG
17714if test -n "$HG"; then
17715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17716$as_echo "$HG" >&6; }
17717else
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17719$as_echo "no" >&6; }
17720fi
17721
17722
17723  test -n "$HG" && break
17724done
17725
17726    else
17727      # If it succeeded, then it was overridden by the user. We will use it
17728      # for the tool.
17729
17730      # First remove it from the list of overridden variables, so we can test
17731      # for unknown variables in the end.
17732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17733
17734      # Check if the provided tool contains a complete path.
17735      tool_specified="$HG"
17736      tool_basename="${tool_specified##*/}"
17737      if test "x$tool_basename" = "x$tool_specified"; then
17738        # A command without a complete path is provided, search $PATH.
17739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17740$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17741        # Extract the first word of "$tool_basename", so it can be a program name with args.
17742set dummy $tool_basename; ac_word=$2
17743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17744$as_echo_n "checking for $ac_word... " >&6; }
17745if ${ac_cv_path_HG+:} false; then :
17746  $as_echo_n "(cached) " >&6
17747else
17748  case $HG in
17749  [\\/]* | ?:[\\/]*)
17750  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17751  ;;
17752  *)
17753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17754for as_dir in $PATH
17755do
17756  IFS=$as_save_IFS
17757  test -z "$as_dir" && as_dir=.
17758    for ac_exec_ext in '' $ac_executable_extensions; do
17759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17760    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17762    break 2
17763  fi
17764done
17765  done
17766IFS=$as_save_IFS
17767
17768  ;;
17769esac
17770fi
17771HG=$ac_cv_path_HG
17772if test -n "$HG"; then
17773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17774$as_echo "$HG" >&6; }
17775else
17776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17777$as_echo "no" >&6; }
17778fi
17779
17780
17781        if test "x$HG" = x; then
17782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17783        fi
17784      else
17785        # Otherwise we believe it is a complete path. Use it as it is.
17786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17787$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17789$as_echo_n "checking for HG... " >&6; }
17790        if test ! -x "$tool_specified"; then
17791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17792$as_echo "not found" >&6; }
17793          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17794        fi
17795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17796$as_echo "$tool_specified" >&6; }
17797      fi
17798    fi
17799  fi
17800
17801
17802
17803
17804  # Publish this variable in the help.
17805
17806
17807  if test "x$STAT" = x; then
17808    # The variable is not set by user, try to locate tool using the code snippet
17809    for ac_prog in stat
17810do
17811  # Extract the first word of "$ac_prog", so it can be a program name with args.
17812set dummy $ac_prog; ac_word=$2
17813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17814$as_echo_n "checking for $ac_word... " >&6; }
17815if ${ac_cv_path_STAT+:} false; then :
17816  $as_echo_n "(cached) " >&6
17817else
17818  case $STAT in
17819  [\\/]* | ?:[\\/]*)
17820  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17821  ;;
17822  *)
17823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17824for as_dir in $PATH
17825do
17826  IFS=$as_save_IFS
17827  test -z "$as_dir" && as_dir=.
17828    for ac_exec_ext in '' $ac_executable_extensions; do
17829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17830    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17832    break 2
17833  fi
17834done
17835  done
17836IFS=$as_save_IFS
17837
17838  ;;
17839esac
17840fi
17841STAT=$ac_cv_path_STAT
17842if test -n "$STAT"; then
17843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17844$as_echo "$STAT" >&6; }
17845else
17846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17847$as_echo "no" >&6; }
17848fi
17849
17850
17851  test -n "$STAT" && break
17852done
17853
17854  else
17855    # The variable is set, but is it from the command line or the environment?
17856
17857    # Try to remove the string !STAT! from our list.
17858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17860      # If it failed, the variable was not from the command line. Ignore it,
17861      # but warn the user (except for BASH, which is always set by the calling BASH).
17862      if test "xSTAT" != xBASH; then
17863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17864$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17865      fi
17866      # Try to locate tool using the code snippet
17867      for ac_prog in stat
17868do
17869  # Extract the first word of "$ac_prog", so it can be a program name with args.
17870set dummy $ac_prog; ac_word=$2
17871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17872$as_echo_n "checking for $ac_word... " >&6; }
17873if ${ac_cv_path_STAT+:} false; then :
17874  $as_echo_n "(cached) " >&6
17875else
17876  case $STAT in
17877  [\\/]* | ?:[\\/]*)
17878  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17879  ;;
17880  *)
17881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17882for as_dir in $PATH
17883do
17884  IFS=$as_save_IFS
17885  test -z "$as_dir" && as_dir=.
17886    for ac_exec_ext in '' $ac_executable_extensions; do
17887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17888    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17890    break 2
17891  fi
17892done
17893  done
17894IFS=$as_save_IFS
17895
17896  ;;
17897esac
17898fi
17899STAT=$ac_cv_path_STAT
17900if test -n "$STAT"; then
17901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17902$as_echo "$STAT" >&6; }
17903else
17904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17905$as_echo "no" >&6; }
17906fi
17907
17908
17909  test -n "$STAT" && break
17910done
17911
17912    else
17913      # If it succeeded, then it was overridden by the user. We will use it
17914      # for the tool.
17915
17916      # First remove it from the list of overridden variables, so we can test
17917      # for unknown variables in the end.
17918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17919
17920      # Check if the provided tool contains a complete path.
17921      tool_specified="$STAT"
17922      tool_basename="${tool_specified##*/}"
17923      if test "x$tool_basename" = "x$tool_specified"; then
17924        # A command without a complete path is provided, search $PATH.
17925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17926$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17927        # Extract the first word of "$tool_basename", so it can be a program name with args.
17928set dummy $tool_basename; ac_word=$2
17929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17930$as_echo_n "checking for $ac_word... " >&6; }
17931if ${ac_cv_path_STAT+:} false; then :
17932  $as_echo_n "(cached) " >&6
17933else
17934  case $STAT in
17935  [\\/]* | ?:[\\/]*)
17936  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17937  ;;
17938  *)
17939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17940for as_dir in $PATH
17941do
17942  IFS=$as_save_IFS
17943  test -z "$as_dir" && as_dir=.
17944    for ac_exec_ext in '' $ac_executable_extensions; do
17945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17946    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17948    break 2
17949  fi
17950done
17951  done
17952IFS=$as_save_IFS
17953
17954  ;;
17955esac
17956fi
17957STAT=$ac_cv_path_STAT
17958if test -n "$STAT"; then
17959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17960$as_echo "$STAT" >&6; }
17961else
17962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17963$as_echo "no" >&6; }
17964fi
17965
17966
17967        if test "x$STAT" = x; then
17968          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17969        fi
17970      else
17971        # Otherwise we believe it is a complete path. Use it as it is.
17972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17973$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17975$as_echo_n "checking for STAT... " >&6; }
17976        if test ! -x "$tool_specified"; then
17977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17978$as_echo "not found" >&6; }
17979          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
17980        fi
17981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17982$as_echo "$tool_specified" >&6; }
17983      fi
17984    fi
17985  fi
17986
17987
17988
17989
17990  # Publish this variable in the help.
17991
17992
17993  if test "x$TIME" = x; then
17994    # The variable is not set by user, try to locate tool using the code snippet
17995    for ac_prog in time
17996do
17997  # Extract the first word of "$ac_prog", so it can be a program name with args.
17998set dummy $ac_prog; ac_word=$2
17999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18000$as_echo_n "checking for $ac_word... " >&6; }
18001if ${ac_cv_path_TIME+:} false; then :
18002  $as_echo_n "(cached) " >&6
18003else
18004  case $TIME in
18005  [\\/]* | ?:[\\/]*)
18006  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18007  ;;
18008  *)
18009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18010for as_dir in $PATH
18011do
18012  IFS=$as_save_IFS
18013  test -z "$as_dir" && as_dir=.
18014    for ac_exec_ext in '' $ac_executable_extensions; do
18015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18016    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18018    break 2
18019  fi
18020done
18021  done
18022IFS=$as_save_IFS
18023
18024  ;;
18025esac
18026fi
18027TIME=$ac_cv_path_TIME
18028if test -n "$TIME"; then
18029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18030$as_echo "$TIME" >&6; }
18031else
18032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18033$as_echo "no" >&6; }
18034fi
18035
18036
18037  test -n "$TIME" && break
18038done
18039
18040  else
18041    # The variable is set, but is it from the command line or the environment?
18042
18043    # Try to remove the string !TIME! from our list.
18044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18046      # If it failed, the variable was not from the command line. Ignore it,
18047      # but warn the user (except for BASH, which is always set by the calling BASH).
18048      if test "xTIME" != xBASH; then
18049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18050$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18051      fi
18052      # Try to locate tool using the code snippet
18053      for ac_prog in time
18054do
18055  # Extract the first word of "$ac_prog", so it can be a program name with args.
18056set dummy $ac_prog; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if ${ac_cv_path_TIME+:} false; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $TIME in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18074    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085TIME=$ac_cv_path_TIME
18086if test -n "$TIME"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18088$as_echo "$TIME" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095  test -n "$TIME" && break
18096done
18097
18098    else
18099      # If it succeeded, then it was overridden by the user. We will use it
18100      # for the tool.
18101
18102      # First remove it from the list of overridden variables, so we can test
18103      # for unknown variables in the end.
18104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18105
18106      # Check if the provided tool contains a complete path.
18107      tool_specified="$TIME"
18108      tool_basename="${tool_specified##*/}"
18109      if test "x$tool_basename" = "x$tool_specified"; then
18110        # A command without a complete path is provided, search $PATH.
18111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18112$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18113        # Extract the first word of "$tool_basename", so it can be a program name with args.
18114set dummy $tool_basename; ac_word=$2
18115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18116$as_echo_n "checking for $ac_word... " >&6; }
18117if ${ac_cv_path_TIME+:} false; then :
18118  $as_echo_n "(cached) " >&6
18119else
18120  case $TIME in
18121  [\\/]* | ?:[\\/]*)
18122  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18123  ;;
18124  *)
18125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18126for as_dir in $PATH
18127do
18128  IFS=$as_save_IFS
18129  test -z "$as_dir" && as_dir=.
18130    for ac_exec_ext in '' $ac_executable_extensions; do
18131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18132    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18134    break 2
18135  fi
18136done
18137  done
18138IFS=$as_save_IFS
18139
18140  ;;
18141esac
18142fi
18143TIME=$ac_cv_path_TIME
18144if test -n "$TIME"; then
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18146$as_echo "$TIME" >&6; }
18147else
18148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18149$as_echo "no" >&6; }
18150fi
18151
18152
18153        if test "x$TIME" = x; then
18154          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18155        fi
18156      else
18157        # Otherwise we believe it is a complete path. Use it as it is.
18158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18159$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18161$as_echo_n "checking for TIME... " >&6; }
18162        if test ! -x "$tool_specified"; then
18163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18164$as_echo "not found" >&6; }
18165          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18166        fi
18167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18168$as_echo "$tool_specified" >&6; }
18169      fi
18170    fi
18171  fi
18172
18173
18174  # Check if it's GNU time
18175  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18176  if test "x$IS_GNU_TIME" != x; then
18177    IS_GNU_TIME=yes
18178  else
18179    IS_GNU_TIME=no
18180  fi
18181
18182
18183  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18184
18185
18186
18187  # Publish this variable in the help.
18188
18189
18190  if test "x$COMM" = x; then
18191    # The variable is not set by user, try to locate tool using the code snippet
18192    for ac_prog in comm
18193do
18194  # Extract the first word of "$ac_prog", so it can be a program name with args.
18195set dummy $ac_prog; ac_word=$2
18196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18197$as_echo_n "checking for $ac_word... " >&6; }
18198if ${ac_cv_path_COMM+:} false; then :
18199  $as_echo_n "(cached) " >&6
18200else
18201  case $COMM in
18202  [\\/]* | ?:[\\/]*)
18203  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18204  ;;
18205  *)
18206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in $PATH
18208do
18209  IFS=$as_save_IFS
18210  test -z "$as_dir" && as_dir=.
18211    for ac_exec_ext in '' $ac_executable_extensions; do
18212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18213    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18215    break 2
18216  fi
18217done
18218  done
18219IFS=$as_save_IFS
18220
18221  ;;
18222esac
18223fi
18224COMM=$ac_cv_path_COMM
18225if test -n "$COMM"; then
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18227$as_echo "$COMM" >&6; }
18228else
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18230$as_echo "no" >&6; }
18231fi
18232
18233
18234  test -n "$COMM" && break
18235done
18236
18237  else
18238    # The variable is set, but is it from the command line or the environment?
18239
18240    # Try to remove the string !COMM! from our list.
18241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18243      # If it failed, the variable was not from the command line. Ignore it,
18244      # but warn the user (except for BASH, which is always set by the calling BASH).
18245      if test "xCOMM" != xBASH; then
18246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18247$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18248      fi
18249      # Try to locate tool using the code snippet
18250      for ac_prog in comm
18251do
18252  # Extract the first word of "$ac_prog", so it can be a program name with args.
18253set dummy $ac_prog; ac_word=$2
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255$as_echo_n "checking for $ac_word... " >&6; }
18256if ${ac_cv_path_COMM+:} false; then :
18257  $as_echo_n "(cached) " >&6
18258else
18259  case $COMM in
18260  [\\/]* | ?:[\\/]*)
18261  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18262  ;;
18263  *)
18264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18265for as_dir in $PATH
18266do
18267  IFS=$as_save_IFS
18268  test -z "$as_dir" && as_dir=.
18269    for ac_exec_ext in '' $ac_executable_extensions; do
18270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18271    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18273    break 2
18274  fi
18275done
18276  done
18277IFS=$as_save_IFS
18278
18279  ;;
18280esac
18281fi
18282COMM=$ac_cv_path_COMM
18283if test -n "$COMM"; then
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18285$as_echo "$COMM" >&6; }
18286else
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18288$as_echo "no" >&6; }
18289fi
18290
18291
18292  test -n "$COMM" && break
18293done
18294
18295    else
18296      # If it succeeded, then it was overridden by the user. We will use it
18297      # for the tool.
18298
18299      # First remove it from the list of overridden variables, so we can test
18300      # for unknown variables in the end.
18301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18302
18303      # Check if the provided tool contains a complete path.
18304      tool_specified="$COMM"
18305      tool_basename="${tool_specified##*/}"
18306      if test "x$tool_basename" = "x$tool_specified"; then
18307        # A command without a complete path is provided, search $PATH.
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18309$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18310        # Extract the first word of "$tool_basename", so it can be a program name with args.
18311set dummy $tool_basename; ac_word=$2
18312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18313$as_echo_n "checking for $ac_word... " >&6; }
18314if ${ac_cv_path_COMM+:} false; then :
18315  $as_echo_n "(cached) " >&6
18316else
18317  case $COMM in
18318  [\\/]* | ?:[\\/]*)
18319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18320  ;;
18321  *)
18322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18323for as_dir in $PATH
18324do
18325  IFS=$as_save_IFS
18326  test -z "$as_dir" && as_dir=.
18327    for ac_exec_ext in '' $ac_executable_extensions; do
18328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18331    break 2
18332  fi
18333done
18334  done
18335IFS=$as_save_IFS
18336
18337  ;;
18338esac
18339fi
18340COMM=$ac_cv_path_COMM
18341if test -n "$COMM"; then
18342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18343$as_echo "$COMM" >&6; }
18344else
18345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18346$as_echo "no" >&6; }
18347fi
18348
18349
18350        if test "x$COMM" = x; then
18351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18352        fi
18353      else
18354        # Otherwise we believe it is a complete path. Use it as it is.
18355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18356$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18358$as_echo_n "checking for COMM... " >&6; }
18359        if test ! -x "$tool_specified"; then
18360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18361$as_echo "not found" >&6; }
18362          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18363        fi
18364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18365$as_echo "$tool_specified" >&6; }
18366      fi
18367    fi
18368  fi
18369
18370
18371
18372  if test "x$COMM" = x; then
18373    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18374  fi
18375
18376
18377  fi
18378
18379  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18380
18381
18382
18383  # Publish this variable in the help.
18384
18385
18386  if test "x$DSYMUTIL" = x; then
18387    # The variable is not set by user, try to locate tool using the code snippet
18388    for ac_prog in dsymutil
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_DSYMUTIL+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $DSYMUTIL in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420DSYMUTIL=$ac_cv_path_DSYMUTIL
18421if test -n "$DSYMUTIL"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18423$as_echo "$DSYMUTIL" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$DSYMUTIL" && break
18431done
18432
18433  else
18434    # The variable is set, but is it from the command line or the environment?
18435
18436    # Try to remove the string !DSYMUTIL! from our list.
18437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18439      # If it failed, the variable was not from the command line. Ignore it,
18440      # but warn the user (except for BASH, which is always set by the calling BASH).
18441      if test "xDSYMUTIL" != xBASH; then
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18443$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18444      fi
18445      # Try to locate tool using the code snippet
18446      for ac_prog in dsymutil
18447do
18448  # Extract the first word of "$ac_prog", so it can be a program name with args.
18449set dummy $ac_prog; ac_word=$2
18450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451$as_echo_n "checking for $ac_word... " >&6; }
18452if ${ac_cv_path_DSYMUTIL+:} false; then :
18453  $as_echo_n "(cached) " >&6
18454else
18455  case $DSYMUTIL in
18456  [\\/]* | ?:[\\/]*)
18457  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18458  ;;
18459  *)
18460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461for as_dir in $PATH
18462do
18463  IFS=$as_save_IFS
18464  test -z "$as_dir" && as_dir=.
18465    for ac_exec_ext in '' $ac_executable_extensions; do
18466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469    break 2
18470  fi
18471done
18472  done
18473IFS=$as_save_IFS
18474
18475  ;;
18476esac
18477fi
18478DSYMUTIL=$ac_cv_path_DSYMUTIL
18479if test -n "$DSYMUTIL"; then
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18481$as_echo "$DSYMUTIL" >&6; }
18482else
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484$as_echo "no" >&6; }
18485fi
18486
18487
18488  test -n "$DSYMUTIL" && break
18489done
18490
18491    else
18492      # If it succeeded, then it was overridden by the user. We will use it
18493      # for the tool.
18494
18495      # First remove it from the list of overridden variables, so we can test
18496      # for unknown variables in the end.
18497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18498
18499      # Check if the provided tool contains a complete path.
18500      tool_specified="$DSYMUTIL"
18501      tool_basename="${tool_specified##*/}"
18502      if test "x$tool_basename" = "x$tool_specified"; then
18503        # A command without a complete path is provided, search $PATH.
18504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18505$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18506        # Extract the first word of "$tool_basename", so it can be a program name with args.
18507set dummy $tool_basename; ac_word=$2
18508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18509$as_echo_n "checking for $ac_word... " >&6; }
18510if ${ac_cv_path_DSYMUTIL+:} false; then :
18511  $as_echo_n "(cached) " >&6
18512else
18513  case $DSYMUTIL in
18514  [\\/]* | ?:[\\/]*)
18515  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18516  ;;
18517  *)
18518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18519for as_dir in $PATH
18520do
18521  IFS=$as_save_IFS
18522  test -z "$as_dir" && as_dir=.
18523    for ac_exec_ext in '' $ac_executable_extensions; do
18524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18525    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18527    break 2
18528  fi
18529done
18530  done
18531IFS=$as_save_IFS
18532
18533  ;;
18534esac
18535fi
18536DSYMUTIL=$ac_cv_path_DSYMUTIL
18537if test -n "$DSYMUTIL"; then
18538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18539$as_echo "$DSYMUTIL" >&6; }
18540else
18541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18542$as_echo "no" >&6; }
18543fi
18544
18545
18546        if test "x$DSYMUTIL" = x; then
18547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18548        fi
18549      else
18550        # Otherwise we believe it is a complete path. Use it as it is.
18551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18552$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18554$as_echo_n "checking for DSYMUTIL... " >&6; }
18555        if test ! -x "$tool_specified"; then
18556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18557$as_echo "not found" >&6; }
18558          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18559        fi
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18561$as_echo "$tool_specified" >&6; }
18562      fi
18563    fi
18564  fi
18565
18566
18567
18568  if test "x$DSYMUTIL" = x; then
18569    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18570  fi
18571
18572
18573
18574
18575
18576  # Publish this variable in the help.
18577
18578
18579  if test "x$XATTR" = x; then
18580    # The variable is not set by user, try to locate tool using the code snippet
18581    for ac_prog in xattr
18582do
18583  # Extract the first word of "$ac_prog", so it can be a program name with args.
18584set dummy $ac_prog; ac_word=$2
18585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18586$as_echo_n "checking for $ac_word... " >&6; }
18587if ${ac_cv_path_XATTR+:} false; then :
18588  $as_echo_n "(cached) " >&6
18589else
18590  case $XATTR in
18591  [\\/]* | ?:[\\/]*)
18592  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18593  ;;
18594  *)
18595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18596for as_dir in $PATH
18597do
18598  IFS=$as_save_IFS
18599  test -z "$as_dir" && as_dir=.
18600    for ac_exec_ext in '' $ac_executable_extensions; do
18601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18602    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18604    break 2
18605  fi
18606done
18607  done
18608IFS=$as_save_IFS
18609
18610  ;;
18611esac
18612fi
18613XATTR=$ac_cv_path_XATTR
18614if test -n "$XATTR"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18616$as_echo "$XATTR" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623  test -n "$XATTR" && break
18624done
18625
18626  else
18627    # The variable is set, but is it from the command line or the environment?
18628
18629    # Try to remove the string !XATTR! from our list.
18630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18632      # If it failed, the variable was not from the command line. Ignore it,
18633      # but warn the user (except for BASH, which is always set by the calling BASH).
18634      if test "xXATTR" != xBASH; then
18635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18636$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18637      fi
18638      # Try to locate tool using the code snippet
18639      for ac_prog in xattr
18640do
18641  # Extract the first word of "$ac_prog", so it can be a program name with args.
18642set dummy $ac_prog; ac_word=$2
18643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18644$as_echo_n "checking for $ac_word... " >&6; }
18645if ${ac_cv_path_XATTR+:} false; then :
18646  $as_echo_n "(cached) " >&6
18647else
18648  case $XATTR in
18649  [\\/]* | ?:[\\/]*)
18650  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18651  ;;
18652  *)
18653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18660    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668  ;;
18669esac
18670fi
18671XATTR=$ac_cv_path_XATTR
18672if test -n "$XATTR"; then
18673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18674$as_echo "$XATTR" >&6; }
18675else
18676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18677$as_echo "no" >&6; }
18678fi
18679
18680
18681  test -n "$XATTR" && break
18682done
18683
18684    else
18685      # If it succeeded, then it was overridden by the user. We will use it
18686      # for the tool.
18687
18688      # First remove it from the list of overridden variables, so we can test
18689      # for unknown variables in the end.
18690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18691
18692      # Check if the provided tool contains a complete path.
18693      tool_specified="$XATTR"
18694      tool_basename="${tool_specified##*/}"
18695      if test "x$tool_basename" = "x$tool_specified"; then
18696        # A command without a complete path is provided, search $PATH.
18697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18698$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18699        # Extract the first word of "$tool_basename", so it can be a program name with args.
18700set dummy $tool_basename; ac_word=$2
18701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18702$as_echo_n "checking for $ac_word... " >&6; }
18703if ${ac_cv_path_XATTR+:} false; then :
18704  $as_echo_n "(cached) " >&6
18705else
18706  case $XATTR in
18707  [\\/]* | ?:[\\/]*)
18708  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18709  ;;
18710  *)
18711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18712for as_dir in $PATH
18713do
18714  IFS=$as_save_IFS
18715  test -z "$as_dir" && as_dir=.
18716    for ac_exec_ext in '' $ac_executable_extensions; do
18717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18718    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18720    break 2
18721  fi
18722done
18723  done
18724IFS=$as_save_IFS
18725
18726  ;;
18727esac
18728fi
18729XATTR=$ac_cv_path_XATTR
18730if test -n "$XATTR"; then
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18732$as_echo "$XATTR" >&6; }
18733else
18734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18735$as_echo "no" >&6; }
18736fi
18737
18738
18739        if test "x$XATTR" = x; then
18740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18741        fi
18742      else
18743        # Otherwise we believe it is a complete path. Use it as it is.
18744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18745$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18747$as_echo_n "checking for XATTR... " >&6; }
18748        if test ! -x "$tool_specified"; then
18749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18750$as_echo "not found" >&6; }
18751          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18752        fi
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18754$as_echo "$tool_specified" >&6; }
18755      fi
18756    fi
18757  fi
18758
18759
18760
18761  if test "x$XATTR" = x; then
18762    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18763  fi
18764
18765
18766
18767
18768  # Publish this variable in the help.
18769
18770
18771  if test "x$CODESIGN" = x; then
18772    # The variable is not set by user, try to locate tool using the code snippet
18773    for ac_prog in codesign
18774do
18775  # Extract the first word of "$ac_prog", so it can be a program name with args.
18776set dummy $ac_prog; ac_word=$2
18777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18778$as_echo_n "checking for $ac_word... " >&6; }
18779if ${ac_cv_path_CODESIGN+:} false; then :
18780  $as_echo_n "(cached) " >&6
18781else
18782  case $CODESIGN in
18783  [\\/]* | ?:[\\/]*)
18784  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18785  ;;
18786  *)
18787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18788for as_dir in $PATH
18789do
18790  IFS=$as_save_IFS
18791  test -z "$as_dir" && as_dir=.
18792    for ac_exec_ext in '' $ac_executable_extensions; do
18793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18794    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18796    break 2
18797  fi
18798done
18799  done
18800IFS=$as_save_IFS
18801
18802  ;;
18803esac
18804fi
18805CODESIGN=$ac_cv_path_CODESIGN
18806if test -n "$CODESIGN"; then
18807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18808$as_echo "$CODESIGN" >&6; }
18809else
18810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18811$as_echo "no" >&6; }
18812fi
18813
18814
18815  test -n "$CODESIGN" && break
18816done
18817
18818  else
18819    # The variable is set, but is it from the command line or the environment?
18820
18821    # Try to remove the string !CODESIGN! from our list.
18822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18824      # If it failed, the variable was not from the command line. Ignore it,
18825      # but warn the user (except for BASH, which is always set by the calling BASH).
18826      if test "xCODESIGN" != xBASH; then
18827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18828$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18829      fi
18830      # Try to locate tool using the code snippet
18831      for ac_prog in codesign
18832do
18833  # Extract the first word of "$ac_prog", so it can be a program name with args.
18834set dummy $ac_prog; ac_word=$2
18835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18836$as_echo_n "checking for $ac_word... " >&6; }
18837if ${ac_cv_path_CODESIGN+:} false; then :
18838  $as_echo_n "(cached) " >&6
18839else
18840  case $CODESIGN in
18841  [\\/]* | ?:[\\/]*)
18842  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18843  ;;
18844  *)
18845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18846for as_dir in $PATH
18847do
18848  IFS=$as_save_IFS
18849  test -z "$as_dir" && as_dir=.
18850    for ac_exec_ext in '' $ac_executable_extensions; do
18851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18852    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18854    break 2
18855  fi
18856done
18857  done
18858IFS=$as_save_IFS
18859
18860  ;;
18861esac
18862fi
18863CODESIGN=$ac_cv_path_CODESIGN
18864if test -n "$CODESIGN"; then
18865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18866$as_echo "$CODESIGN" >&6; }
18867else
18868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18869$as_echo "no" >&6; }
18870fi
18871
18872
18873  test -n "$CODESIGN" && break
18874done
18875
18876    else
18877      # If it succeeded, then it was overridden by the user. We will use it
18878      # for the tool.
18879
18880      # First remove it from the list of overridden variables, so we can test
18881      # for unknown variables in the end.
18882      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18883
18884      # Check if the provided tool contains a complete path.
18885      tool_specified="$CODESIGN"
18886      tool_basename="${tool_specified##*/}"
18887      if test "x$tool_basename" = "x$tool_specified"; then
18888        # A command without a complete path is provided, search $PATH.
18889        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18890$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18891        # Extract the first word of "$tool_basename", so it can be a program name with args.
18892set dummy $tool_basename; ac_word=$2
18893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18894$as_echo_n "checking for $ac_word... " >&6; }
18895if ${ac_cv_path_CODESIGN+:} false; then :
18896  $as_echo_n "(cached) " >&6
18897else
18898  case $CODESIGN in
18899  [\\/]* | ?:[\\/]*)
18900  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18901  ;;
18902  *)
18903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18904for as_dir in $PATH
18905do
18906  IFS=$as_save_IFS
18907  test -z "$as_dir" && as_dir=.
18908    for ac_exec_ext in '' $ac_executable_extensions; do
18909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18910    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18912    break 2
18913  fi
18914done
18915  done
18916IFS=$as_save_IFS
18917
18918  ;;
18919esac
18920fi
18921CODESIGN=$ac_cv_path_CODESIGN
18922if test -n "$CODESIGN"; then
18923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18924$as_echo "$CODESIGN" >&6; }
18925else
18926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18927$as_echo "no" >&6; }
18928fi
18929
18930
18931        if test "x$CODESIGN" = x; then
18932          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18933        fi
18934      else
18935        # Otherwise we believe it is a complete path. Use it as it is.
18936        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18937$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18939$as_echo_n "checking for CODESIGN... " >&6; }
18940        if test ! -x "$tool_specified"; then
18941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18942$as_echo "not found" >&6; }
18943          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18944        fi
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18946$as_echo "$tool_specified" >&6; }
18947      fi
18948    fi
18949  fi
18950
18951
18952    if test "x$CODESIGN" != "x"; then
18953      # Verify that the openjdk_codesign certificate is present
18954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18955$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18956      rm -f codesign-testfile
18957      touch codesign-testfile
18958      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18959      rm -f codesign-testfile
18960      if test "x$CODESIGN" = x; then
18961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18962$as_echo "no" >&6; }
18963      else
18964        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18965$as_echo "yes" >&6; }
18966      fi
18967    fi
18968  fi
18969
18970
18971# Check if pkg-config is available.
18972
18973
18974if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18975	if test -n "$ac_tool_prefix"; then
18976  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18977set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18979$as_echo_n "checking for $ac_word... " >&6; }
18980if ${ac_cv_path_PKG_CONFIG+:} false; then :
18981  $as_echo_n "(cached) " >&6
18982else
18983  case $PKG_CONFIG in
18984  [\\/]* | ?:[\\/]*)
18985  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
18986  ;;
18987  *)
18988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18989for as_dir in $PATH
18990do
18991  IFS=$as_save_IFS
18992  test -z "$as_dir" && as_dir=.
18993    for ac_exec_ext in '' $ac_executable_extensions; do
18994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18995    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
18996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18997    break 2
18998  fi
18999done
19000  done
19001IFS=$as_save_IFS
19002
19003  ;;
19004esac
19005fi
19006PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19007if test -n "$PKG_CONFIG"; then
19008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19009$as_echo "$PKG_CONFIG" >&6; }
19010else
19011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19012$as_echo "no" >&6; }
19013fi
19014
19015
19016fi
19017if test -z "$ac_cv_path_PKG_CONFIG"; then
19018  ac_pt_PKG_CONFIG=$PKG_CONFIG
19019  # Extract the first word of "pkg-config", so it can be a program name with args.
19020set dummy pkg-config; ac_word=$2
19021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19022$as_echo_n "checking for $ac_word... " >&6; }
19023if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19024  $as_echo_n "(cached) " >&6
19025else
19026  case $ac_pt_PKG_CONFIG in
19027  [\\/]* | ?:[\\/]*)
19028  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19029  ;;
19030  *)
19031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19032for as_dir in $PATH
19033do
19034  IFS=$as_save_IFS
19035  test -z "$as_dir" && as_dir=.
19036    for ac_exec_ext in '' $ac_executable_extensions; do
19037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19038    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19040    break 2
19041  fi
19042done
19043  done
19044IFS=$as_save_IFS
19045
19046  ;;
19047esac
19048fi
19049ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19050if test -n "$ac_pt_PKG_CONFIG"; then
19051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19052$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19053else
19054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19055$as_echo "no" >&6; }
19056fi
19057
19058  if test "x$ac_pt_PKG_CONFIG" = x; then
19059    PKG_CONFIG=""
19060  else
19061    case $cross_compiling:$ac_tool_warned in
19062yes:)
19063{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19064$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19065ac_tool_warned=yes ;;
19066esac
19067    PKG_CONFIG=$ac_pt_PKG_CONFIG
19068  fi
19069else
19070  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19071fi
19072
19073fi
19074if test -n "$PKG_CONFIG"; then
19075	_pkg_min_version=0.9.0
19076	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19077$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19078	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19079		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19080$as_echo "yes" >&6; }
19081	else
19082		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19083$as_echo "no" >&6; }
19084		PKG_CONFIG=""
19085	fi
19086
19087fi
19088
19089# After basic tools have been setup, we can check build os specific details.
19090
19091  ###############################################################################
19092
19093  # Note that this is the build platform OS version!
19094
19095  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19096  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19097  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19098  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19099
19100
19101
19102
19103
19104# Setup builddeps, for automatic downloading of tools we need.
19105# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19106# boot-jdk setup, but we need to have basic tools setup first.
19107
19108
19109# Check whether --with-builddeps-conf was given.
19110if test "${with_builddeps_conf+set}" = set; then :
19111  withval=$with_builddeps_conf;
19112fi
19113
19114
19115
19116# Check whether --with-builddeps-server was given.
19117if test "${with_builddeps_server+set}" = set; then :
19118  withval=$with_builddeps_server;
19119fi
19120
19121
19122
19123# Check whether --with-builddeps-dir was given.
19124if test "${with_builddeps_dir+set}" = set; then :
19125  withval=$with_builddeps_dir;
19126else
19127  with_builddeps_dir=/localhome/builddeps
19128fi
19129
19130
19131
19132# Check whether --with-builddeps-group was given.
19133if test "${with_builddeps_group+set}" = set; then :
19134  withval=$with_builddeps_group;
19135fi
19136
19137
19138
19139
19140  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19141    if test "x$with_builddeps_conf" != x; then
19142      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19143$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19144      builddepsfile=$with_builddeps_conf
19145      if test -s $builddepsfile; then
19146        . $builddepsfile
19147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19148$as_echo "loaded!" >&6; }
19149      else
19150        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19151      fi
19152    else
19153      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19154$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19155      builddepsfile=`mktemp`
19156      touch $builddepsfile
19157      # Put all found confs into a single file.
19158      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19159      # Source the file to acquire the variables
19160      if test -s $builddepsfile; then
19161        . $builddepsfile
19162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19163$as_echo "found at least one!" >&6; }
19164      else
19165        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19166      fi
19167    fi
19168    # Create build and target names that use _ instead of "-" and ".".
19169    # This is necessary to use them in variable names.
19170    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19171    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19172    # Extract rewrite information for build and target
19173    eval rewritten_build=\${REWRITE_${build_var}}
19174    if test "x$rewritten_build" = x; then
19175      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19176      echo Build stays the same $rewritten_build
19177    else
19178      echo Rewriting build for builddeps into $rewritten_build
19179    fi
19180    eval rewritten_target=\${REWRITE_${target_var}}
19181    if test "x$rewritten_target" = x; then
19182      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19183      echo Target stays the same $rewritten_target
19184    else
19185      echo Rewriting target for builddeps into $rewritten_target
19186    fi
19187    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19188    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19189  fi
19190  for ac_prog in 7z unzip
19191do
19192  # Extract the first word of "$ac_prog", so it can be a program name with args.
19193set dummy $ac_prog; ac_word=$2
19194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19195$as_echo_n "checking for $ac_word... " >&6; }
19196if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19197  $as_echo_n "(cached) " >&6
19198else
19199  if test -n "$BDEPS_UNZIP"; then
19200  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19201else
19202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19203for as_dir in $PATH
19204do
19205  IFS=$as_save_IFS
19206  test -z "$as_dir" && as_dir=.
19207    for ac_exec_ext in '' $ac_executable_extensions; do
19208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19209    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19211    break 2
19212  fi
19213done
19214  done
19215IFS=$as_save_IFS
19216
19217fi
19218fi
19219BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19220if test -n "$BDEPS_UNZIP"; then
19221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19222$as_echo "$BDEPS_UNZIP" >&6; }
19223else
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19225$as_echo "no" >&6; }
19226fi
19227
19228
19229  test -n "$BDEPS_UNZIP" && break
19230done
19231
19232  if test "x$BDEPS_UNZIP" = x7z; then
19233    BDEPS_UNZIP="7z x"
19234  fi
19235
19236  for ac_prog in wget lftp ftp
19237do
19238  # Extract the first word of "$ac_prog", so it can be a program name with args.
19239set dummy $ac_prog; ac_word=$2
19240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19241$as_echo_n "checking for $ac_word... " >&6; }
19242if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19243  $as_echo_n "(cached) " >&6
19244else
19245  if test -n "$BDEPS_FTP"; then
19246  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19247else
19248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19249for as_dir in $PATH
19250do
19251  IFS=$as_save_IFS
19252  test -z "$as_dir" && as_dir=.
19253    for ac_exec_ext in '' $ac_executable_extensions; do
19254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19255    ac_cv_prog_BDEPS_FTP="$ac_prog"
19256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19257    break 2
19258  fi
19259done
19260  done
19261IFS=$as_save_IFS
19262
19263fi
19264fi
19265BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19266if test -n "$BDEPS_FTP"; then
19267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19268$as_echo "$BDEPS_FTP" >&6; }
19269else
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19271$as_echo "no" >&6; }
19272fi
19273
19274
19275  test -n "$BDEPS_FTP" && break
19276done
19277
19278
19279
19280###############################################################################
19281#
19282# Determine OpenJDK variants, options and version numbers.
19283#
19284###############################################################################
19285
19286# We need build & target for this.
19287
19288
19289  ###############################################################################
19290  #
19291  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19292  # We always build headless support.
19293  #
19294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19295$as_echo_n "checking headful support... " >&6; }
19296  # Check whether --enable-headful was given.
19297if test "${enable_headful+set}" = set; then :
19298  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19299else
19300  SUPPORT_HEADFUL=yes
19301fi
19302
19303
19304  SUPPORT_HEADLESS=yes
19305  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19306
19307  if test "x$SUPPORT_HEADFUL" = xyes; then
19308    # We are building both headful and headless.
19309    headful_msg="include support for both headful and headless"
19310  fi
19311
19312  if test "x$SUPPORT_HEADFUL" = xno; then
19313    # Thus we are building headless only.
19314    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19315    headful_msg="headless only"
19316  fi
19317
19318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19319$as_echo "$headful_msg" >&6; }
19320
19321
19322
19323
19324
19325  # Control wether Hotspot runs Queens test after build.
19326  # Check whether --enable-hotspot-test-in-build was given.
19327if test "${enable_hotspot_test_in_build+set}" = set; then :
19328  enableval=$enable_hotspot_test_in_build;
19329else
19330  enable_hotspot_test_in_build=no
19331fi
19332
19333  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19334    TEST_IN_BUILD=true
19335  else
19336    TEST_IN_BUILD=false
19337  fi
19338
19339
19340  ###############################################################################
19341  #
19342  # Choose cacerts source file
19343  #
19344
19345# Check whether --with-cacerts-file was given.
19346if test "${with_cacerts_file+set}" = set; then :
19347  withval=$with_cacerts_file;
19348fi
19349
19350  if test "x$with_cacerts_file" != x; then
19351    CACERTS_FILE=$with_cacerts_file
19352  else
19353    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19354  fi
19355
19356
19357  ###############################################################################
19358  #
19359  # Enable or disable unlimited crypto
19360  #
19361  # Check whether --enable-unlimited-crypto was given.
19362if test "${enable_unlimited_crypto+set}" = set; then :
19363  enableval=$enable_unlimited_crypto;
19364else
19365  enable_unlimited_crypto=no
19366fi
19367
19368  if test "x$enable_unlimited_crypto" = "xyes"; then
19369    UNLIMITED_CRYPTO=true
19370  else
19371    UNLIMITED_CRYPTO=false
19372  fi
19373
19374
19375  ###############################################################################
19376  #
19377  # Enable or disable the elliptic curve crypto implementation
19378  #
19379
19380
19381  ###############################################################################
19382  #
19383  # --enable-rmiconnector-iiop
19384  #
19385  # Check whether --enable-rmiconnector-iiop was given.
19386if test "${enable_rmiconnector_iiop+set}" = set; then :
19387  enableval=$enable_rmiconnector_iiop;
19388fi
19389
19390  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19391    RMICONNECTOR_IIOP=true
19392  else
19393    RMICONNECTOR_IIOP=false
19394  fi
19395
19396
19397  ###############################################################################
19398  #
19399  # Compress jars
19400  #
19401  COMPRESS_JARS=false
19402
19403
19404
19405
19406  # Source the version numbers
19407  . $AUTOCONF_DIR/version-numbers
19408
19409  # Get the settings from parameters
19410
19411# Check whether --with-milestone was given.
19412if test "${with_milestone+set}" = set; then :
19413  withval=$with_milestone;
19414fi
19415
19416  if test "x$with_milestone" = xyes; then
19417    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19418  elif test "x$with_milestone" != x; then
19419    MILESTONE="$with_milestone"
19420  fi
19421  if test "x$MILESTONE" = x; then
19422    MILESTONE=internal
19423  fi
19424
19425
19426# Check whether --with-update-version was given.
19427if test "${with_update_version+set}" = set; then :
19428  withval=$with_update_version;
19429fi
19430
19431  if test "x$with_update_version" = xyes; then
19432    as_fn_error $? "Update version must have a value" "$LINENO" 5
19433  elif test "x$with_update_version" != x; then
19434    JDK_UPDATE_VERSION="$with_update_version"
19435    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19436    # to a bug in expr (which reduces it to just X). To work around this, we
19437    # always add a 0 to one digit update versions.
19438    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19439      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19440    fi
19441  fi
19442
19443
19444# Check whether --with-user-release-suffix was given.
19445if test "${with_user_release_suffix+set}" = set; then :
19446  withval=$with_user_release_suffix;
19447fi
19448
19449  if test "x$with_user_release_suffix" = xyes; then
19450    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19451  elif test "x$with_user_release_suffix" != x; then
19452    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19453  fi
19454
19455
19456# Check whether --with-build-number was given.
19457if test "${with_build_number+set}" = set; then :
19458  withval=$with_build_number;
19459fi
19460
19461  if test "x$with_build_number" = xyes; then
19462    as_fn_error $? "Build number must have a value" "$LINENO" 5
19463  elif test "x$with_build_number" != x; then
19464    JDK_BUILD_NUMBER="$with_build_number"
19465  fi
19466  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19467  if test "x$JDK_BUILD_NUMBER" = x; then
19468    JDK_BUILD_NUMBER=b00
19469    if test "x$USER_RELEASE_SUFFIX" = x; then
19470      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19471      # Avoid [:alnum:] since it depends on the locale.
19472      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19473      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19474    fi
19475  fi
19476
19477  # Now set the JDK version, milestone, build number etc.
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493  COPYRIGHT_YEAR=`date +'%Y'`
19494
19495
19496  if test "x$JDK_UPDATE_VERSION" != x; then
19497    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19498  else
19499    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19500  fi
19501
19502
19503  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19504
19505
19506
19507###############################################################################
19508#
19509# Setup BootJDK, used to bootstrap the build.
19510#
19511###############################################################################
19512
19513
19514  BOOT_JDK_FOUND=no
19515
19516# Check whether --with-boot-jdk was given.
19517if test "${with_boot_jdk+set}" = set; then :
19518  withval=$with_boot_jdk;
19519fi
19520
19521
19522  # We look for the Boot JDK through various means, going from more certain to
19523  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19524  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19525  # must check if this is indeed valid; otherwise we'll continue looking.
19526
19527  # Test: Is bootjdk explicitely set by command line arguments?
19528
19529  if test "x$BOOT_JDK_FOUND" = xno; then
19530    # Now execute the test
19531
19532  if test "x$with_boot_jdk" != x; then
19533    BOOT_JDK=$with_boot_jdk
19534    BOOT_JDK_FOUND=maybe
19535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19536$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19537  fi
19538
19539
19540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19542      # Do we have a bin/java?
19543      if test ! -x "$BOOT_JDK/bin/java"; then
19544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19546        BOOT_JDK_FOUND=no
19547      else
19548        # Do we have a bin/javac?
19549        if test ! -x "$BOOT_JDK/bin/javac"; then
19550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19554          BOOT_JDK_FOUND=no
19555        else
19556          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19557          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19560            BOOT_JDK_FOUND=no
19561          else
19562            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19564
19565            # Extra M4 quote needed to protect [] in grep expression.
19566            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19567            if test "x$FOUND_CORRECT_VERSION" = x; then
19568              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19570              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19571$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19572              BOOT_JDK_FOUND=no
19573            else
19574              # We're done! :-)
19575              BOOT_JDK_FOUND=yes
19576
19577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19578
19579  # Input might be given as Windows format, start by converting to
19580  # unix format.
19581  path="$BOOT_JDK"
19582  new_path=`$CYGPATH -u "$path"`
19583
19584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19587  # "foo.exe" is OK but "foo" is an error.
19588  #
19589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19590  # It is also a way to make sure we got the proper file name for the real test later on.
19591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19592  if test "x$test_shortpath" = x; then
19593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19596  fi
19597
19598  # Call helper function which possibly converts this using DOS-style short mode.
19599  # If so, the updated path is stored in $new_path.
19600
19601  input_path="$new_path"
19602  # Check if we need to convert this using DOS-style short mode. If the path
19603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19604  # take no chances and rewrite it.
19605  # Note: m4 eats our [], so we need to use [ and ] instead.
19606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19607  if test "x$has_forbidden_chars" != x; then
19608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19612      # Going to short mode and back again did indeed matter. Since short mode is
19613      # case insensitive, let's make it lowercase to improve readability.
19614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19615      # Now convert it back to Unix-stile (cygpath)
19616      input_path=`$CYGPATH -u "$shortmode_path"`
19617      new_path="$input_path"
19618    fi
19619  fi
19620
19621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19622  if test "x$test_cygdrive_prefix" = x; then
19623    # As a simple fix, exclude /usr/bin since it's not a real path.
19624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19626      # a path prefixed by /cygdrive for fixpath to work.
19627      new_path="$CYGWIN_ROOT_PATH$input_path"
19628    fi
19629  fi
19630
19631
19632  if test "x$path" != "x$new_path"; then
19633    BOOT_JDK="$new_path"
19634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19636  fi
19637
19638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19639
19640  path="$BOOT_JDK"
19641  has_colon=`$ECHO $path | $GREP ^.:`
19642  new_path="$path"
19643  if test "x$has_colon" = x; then
19644    # Not in mixed or Windows style, start by that.
19645    new_path=`cmd //c echo $path`
19646  fi
19647
19648
19649  input_path="$new_path"
19650  # Check if we need to convert this using DOS-style short mode. If the path
19651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19652  # take no chances and rewrite it.
19653  # Note: m4 eats our [], so we need to use [ and ] instead.
19654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19655  if test "x$has_forbidden_chars" != x; then
19656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19658  fi
19659
19660
19661  windows_path="$new_path"
19662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19663    unix_path=`$CYGPATH -u "$windows_path"`
19664    new_path="$unix_path"
19665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19667    new_path="$unix_path"
19668  fi
19669
19670  if test "x$path" != "x$new_path"; then
19671    BOOT_JDK="$new_path"
19672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19674  fi
19675
19676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19678
19679  else
19680    # We're on a posix platform. Hooray! :)
19681    path="$BOOT_JDK"
19682    has_space=`$ECHO "$path" | $GREP " "`
19683    if test "x$has_space" != x; then
19684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19686      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19687    fi
19688
19689    # Use eval to expand a potential ~
19690    eval path="$path"
19691    if test ! -f "$path" && test ! -d "$path"; then
19692      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19693    fi
19694
19695    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19696  fi
19697
19698              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19699$as_echo_n "checking for Boot JDK... " >&6; }
19700              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19701$as_echo "$BOOT_JDK" >&6; }
19702              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19703$as_echo_n "checking Boot JDK version... " >&6; }
19704              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19705              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19706$as_echo "$BOOT_JDK_VERSION" >&6; }
19707            fi # end check jdk version
19708          fi # end check rt.jar
19709        fi # end check javac
19710      fi # end check java
19711    fi # end check boot jdk found
19712  fi
19713
19714  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19715    # Having specified an argument which is incorrect will produce an instant failure;
19716    # we should not go on looking
19717    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19718  fi
19719
19720  # Test: Is bootjdk available from builddeps?
19721
19722  if test "x$BOOT_JDK_FOUND" = xno; then
19723    # Now execute the test
19724
19725
19726
19727  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19728    # Source the builddeps file again, to make sure it uses the latest variables!
19729    . $builddepsfile
19730    # Look for a target and build machine specific resource!
19731    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19732    if test "x$resource" = x; then
19733      # Ok, lets instead look for a target specific resource
19734      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19735    fi
19736    if test "x$resource" = x; then
19737      # Ok, lets instead look for a build specific resource
19738      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19739    fi
19740    if test "x$resource" = x; then
19741      # Ok, lets instead look for a generic resource
19742      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19743      resource=${builddep_bootjdk}
19744    fi
19745    if test "x$resource" != x; then
19746      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19747$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19748      # If the resource in the builddeps.conf file is an existing directory,
19749      # for example /java/linux/cups
19750      if test -d ${resource}; then
19751        depdir=${resource}
19752      else
19753
19754  # bootjdk is for example mymodule
19755  # $resource is for example libs/general/libmymod_1_2_3.zip
19756  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19757  # $with_builddeps_dir is for example /localhome/builddeps
19758  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19759  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19760  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19761  filename=`basename $resource`
19762  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19763  filebase=${filename%%.*}
19764  extension=${filename#*.}
19765  installdir=$with_builddeps_dir/$filebase
19766  if test ! -f $installdir/$filename.unpacked; then
19767    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19768$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19769    if test ! -d $installdir; then
19770      mkdir -p $installdir
19771    fi
19772    if test ! -d $installdir; then
19773      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19774    fi
19775    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19776    touch $tmpfile
19777    if test ! -f $tmpfile; then
19778      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19779    fi
19780
19781  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19782  # $tmpfile is the local file name for the downloaded file.
19783  VALID_TOOL=no
19784  if test "x$BDEPS_FTP" = xwget; then
19785    VALID_TOOL=yes
19786    wget -O $tmpfile $with_builddeps_server/$resource
19787  fi
19788  if test "x$BDEPS_FTP" = xlftp; then
19789    VALID_TOOL=yes
19790    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19791  fi
19792  if test "x$BDEPS_FTP" = xftp; then
19793    VALID_TOOL=yes
19794    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19795    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19796    FTPUSERPWD=${FTPSERVER%%@*}
19797    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19798      FTPUSER=${userpwd%%:*}
19799      FTPPWD=${userpwd#*@}
19800      FTPSERVER=${FTPSERVER#*@}
19801    else
19802      FTPUSER=ftp
19803      FTPPWD=ftp
19804    fi
19805    # the "pass" command does not work on some
19806    # ftp clients (read ftp.exe) but if it works,
19807    # passive mode is better!
19808    ( \
19809        echo "user $FTPUSER $FTPPWD"        ; \
19810        echo "pass"                         ; \
19811        echo "bin"                          ; \
19812        echo "get $FTPPATH $tmpfile"              ; \
19813    ) | ftp -in $FTPSERVER
19814  fi
19815  if test "x$VALID_TOOL" != xyes; then
19816    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19817  fi
19818
19819    mv $tmpfile $installdir/$filename
19820    if test ! -s $installdir/$filename; then
19821      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19822    fi
19823    case "$extension" in
19824      zip)  echo "Unzipping $installdir/$filename..."
19825        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19826        ;;
19827      tar.gz) echo "Untaring $installdir/$filename..."
19828        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19829        ;;
19830      tgz) echo "Untaring $installdir/$filename..."
19831        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19832        ;;
19833      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19834        ;;
19835    esac
19836  fi
19837  if test -f $installdir/$filename.unpacked; then
19838    depdir=$installdir
19839  fi
19840
19841      fi
19842      # Source the builddeps file again, because in the previous command, the depdir
19843      # was updated to point at the current build dependency install directory.
19844      . $builddepsfile
19845      # Now extract variables from the builddeps.conf files.
19846      theroot=${builddep_bootjdk_ROOT}
19847      thecflags=${builddep_bootjdk_CFLAGS}
19848      thelibs=${builddep_bootjdk_LIBS}
19849      if test "x$depdir" = x; then
19850        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19851      fi
19852      BOOT_JDK=$depdir
19853      if test "x$theroot" != x; then
19854        BOOT_JDK="$theroot"
19855      fi
19856      if test "x$thecflags" != x; then
19857        BOOT_JDK_CFLAGS="$thecflags"
19858      fi
19859      if test "x$thelibs" != x; then
19860        BOOT_JDK_LIBS="$thelibs"
19861      fi
19862      BOOT_JDK_FOUND=maybe
19863      else BOOT_JDK_FOUND=no
19864
19865    fi
19866    else BOOT_JDK_FOUND=no
19867
19868  fi
19869
19870
19871
19872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19874      # Do we have a bin/java?
19875      if test ! -x "$BOOT_JDK/bin/java"; then
19876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19878        BOOT_JDK_FOUND=no
19879      else
19880        # Do we have a bin/javac?
19881        if test ! -x "$BOOT_JDK/bin/javac"; then
19882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19886          BOOT_JDK_FOUND=no
19887        else
19888          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19889          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19890            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19892            BOOT_JDK_FOUND=no
19893          else
19894            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19896
19897            # Extra M4 quote needed to protect [] in grep expression.
19898            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19899            if test "x$FOUND_CORRECT_VERSION" = x; then
19900              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19902              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19903$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19904              BOOT_JDK_FOUND=no
19905            else
19906              # We're done! :-)
19907              BOOT_JDK_FOUND=yes
19908
19909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19910
19911  # Input might be given as Windows format, start by converting to
19912  # unix format.
19913  path="$BOOT_JDK"
19914  new_path=`$CYGPATH -u "$path"`
19915
19916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19919  # "foo.exe" is OK but "foo" is an error.
19920  #
19921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19922  # It is also a way to make sure we got the proper file name for the real test later on.
19923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19924  if test "x$test_shortpath" = x; then
19925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19927    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19928  fi
19929
19930  # Call helper function which possibly converts this using DOS-style short mode.
19931  # If so, the updated path is stored in $new_path.
19932
19933  input_path="$new_path"
19934  # Check if we need to convert this using DOS-style short mode. If the path
19935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19936  # take no chances and rewrite it.
19937  # Note: m4 eats our [], so we need to use [ and ] instead.
19938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19939  if test "x$has_forbidden_chars" != x; then
19940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19941    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19944      # Going to short mode and back again did indeed matter. Since short mode is
19945      # case insensitive, let's make it lowercase to improve readability.
19946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19947      # Now convert it back to Unix-stile (cygpath)
19948      input_path=`$CYGPATH -u "$shortmode_path"`
19949      new_path="$input_path"
19950    fi
19951  fi
19952
19953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19954  if test "x$test_cygdrive_prefix" = x; then
19955    # As a simple fix, exclude /usr/bin since it's not a real path.
19956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19958      # a path prefixed by /cygdrive for fixpath to work.
19959      new_path="$CYGWIN_ROOT_PATH$input_path"
19960    fi
19961  fi
19962
19963
19964  if test "x$path" != "x$new_path"; then
19965    BOOT_JDK="$new_path"
19966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19968  fi
19969
19970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19971
19972  path="$BOOT_JDK"
19973  has_colon=`$ECHO $path | $GREP ^.:`
19974  new_path="$path"
19975  if test "x$has_colon" = x; then
19976    # Not in mixed or Windows style, start by that.
19977    new_path=`cmd //c echo $path`
19978  fi
19979
19980
19981  input_path="$new_path"
19982  # Check if we need to convert this using DOS-style short mode. If the path
19983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19984  # take no chances and rewrite it.
19985  # Note: m4 eats our [], so we need to use [ and ] instead.
19986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19987  if test "x$has_forbidden_chars" != x; then
19988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19990  fi
19991
19992
19993  windows_path="$new_path"
19994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19995    unix_path=`$CYGPATH -u "$windows_path"`
19996    new_path="$unix_path"
19997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19999    new_path="$unix_path"
20000  fi
20001
20002  if test "x$path" != "x$new_path"; then
20003    BOOT_JDK="$new_path"
20004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20006  fi
20007
20008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20010
20011  else
20012    # We're on a posix platform. Hooray! :)
20013    path="$BOOT_JDK"
20014    has_space=`$ECHO "$path" | $GREP " "`
20015    if test "x$has_space" != x; then
20016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20018      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20019    fi
20020
20021    # Use eval to expand a potential ~
20022    eval path="$path"
20023    if test ! -f "$path" && test ! -d "$path"; then
20024      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20025    fi
20026
20027    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20028  fi
20029
20030              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20031$as_echo_n "checking for Boot JDK... " >&6; }
20032              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20033$as_echo "$BOOT_JDK" >&6; }
20034              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20035$as_echo_n "checking Boot JDK version... " >&6; }
20036              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20037              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20038$as_echo "$BOOT_JDK_VERSION" >&6; }
20039            fi # end check jdk version
20040          fi # end check rt.jar
20041        fi # end check javac
20042      fi # end check java
20043    fi # end check boot jdk found
20044  fi
20045
20046
20047  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20048
20049  if test "x$BOOT_JDK_FOUND" = xno; then
20050    # Now execute the test
20051
20052  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20053    # First check at user selected default
20054
20055  if test "x$BOOT_JDK_FOUND" = xno; then
20056    # Now execute the test
20057
20058  if test -x /usr/libexec/java_home; then
20059    BOOT_JDK=`/usr/libexec/java_home `
20060    BOOT_JDK_FOUND=maybe
20061    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20062$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20063  fi
20064
20065
20066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20068      # Do we have a bin/java?
20069      if test ! -x "$BOOT_JDK/bin/java"; then
20070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20072        BOOT_JDK_FOUND=no
20073      else
20074        # Do we have a bin/javac?
20075        if test ! -x "$BOOT_JDK/bin/javac"; then
20076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20080          BOOT_JDK_FOUND=no
20081        else
20082          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20083          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20086            BOOT_JDK_FOUND=no
20087          else
20088            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20089            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20090
20091            # Extra M4 quote needed to protect [] in grep expression.
20092            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20093            if test "x$FOUND_CORRECT_VERSION" = x; then
20094              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20096              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20097$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20098              BOOT_JDK_FOUND=no
20099            else
20100              # We're done! :-)
20101              BOOT_JDK_FOUND=yes
20102
20103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20104
20105  # Input might be given as Windows format, start by converting to
20106  # unix format.
20107  path="$BOOT_JDK"
20108  new_path=`$CYGPATH -u "$path"`
20109
20110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20113  # "foo.exe" is OK but "foo" is an error.
20114  #
20115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20116  # It is also a way to make sure we got the proper file name for the real test later on.
20117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20118  if test "x$test_shortpath" = x; then
20119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20122  fi
20123
20124  # Call helper function which possibly converts this using DOS-style short mode.
20125  # If so, the updated path is stored in $new_path.
20126
20127  input_path="$new_path"
20128  # Check if we need to convert this using DOS-style short mode. If the path
20129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20130  # take no chances and rewrite it.
20131  # Note: m4 eats our [], so we need to use [ and ] instead.
20132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20133  if test "x$has_forbidden_chars" != x; then
20134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20138      # Going to short mode and back again did indeed matter. Since short mode is
20139      # case insensitive, let's make it lowercase to improve readability.
20140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20141      # Now convert it back to Unix-stile (cygpath)
20142      input_path=`$CYGPATH -u "$shortmode_path"`
20143      new_path="$input_path"
20144    fi
20145  fi
20146
20147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20148  if test "x$test_cygdrive_prefix" = x; then
20149    # As a simple fix, exclude /usr/bin since it's not a real path.
20150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20152      # a path prefixed by /cygdrive for fixpath to work.
20153      new_path="$CYGWIN_ROOT_PATH$input_path"
20154    fi
20155  fi
20156
20157
20158  if test "x$path" != "x$new_path"; then
20159    BOOT_JDK="$new_path"
20160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20162  fi
20163
20164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20165
20166  path="$BOOT_JDK"
20167  has_colon=`$ECHO $path | $GREP ^.:`
20168  new_path="$path"
20169  if test "x$has_colon" = x; then
20170    # Not in mixed or Windows style, start by that.
20171    new_path=`cmd //c echo $path`
20172  fi
20173
20174
20175  input_path="$new_path"
20176  # Check if we need to convert this using DOS-style short mode. If the path
20177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20178  # take no chances and rewrite it.
20179  # Note: m4 eats our [], so we need to use [ and ] instead.
20180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20181  if test "x$has_forbidden_chars" != x; then
20182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20184  fi
20185
20186
20187  windows_path="$new_path"
20188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20189    unix_path=`$CYGPATH -u "$windows_path"`
20190    new_path="$unix_path"
20191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20193    new_path="$unix_path"
20194  fi
20195
20196  if test "x$path" != "x$new_path"; then
20197    BOOT_JDK="$new_path"
20198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20200  fi
20201
20202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20204
20205  else
20206    # We're on a posix platform. Hooray! :)
20207    path="$BOOT_JDK"
20208    has_space=`$ECHO "$path" | $GREP " "`
20209    if test "x$has_space" != x; then
20210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20213    fi
20214
20215    # Use eval to expand a potential ~
20216    eval path="$path"
20217    if test ! -f "$path" && test ! -d "$path"; then
20218      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20219    fi
20220
20221    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20222  fi
20223
20224              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20225$as_echo_n "checking for Boot JDK... " >&6; }
20226              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20227$as_echo "$BOOT_JDK" >&6; }
20228              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20229$as_echo_n "checking Boot JDK version... " >&6; }
20230              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20231              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20232$as_echo "$BOOT_JDK_VERSION" >&6; }
20233            fi # end check jdk version
20234          fi # end check rt.jar
20235        fi # end check javac
20236      fi # end check java
20237    fi # end check boot jdk found
20238  fi
20239
20240    # If that did not work out (e.g. too old), try explicit versions instead
20241
20242  if test "x$BOOT_JDK_FOUND" = xno; then
20243    # Now execute the test
20244
20245  if test -x /usr/libexec/java_home; then
20246    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20247    BOOT_JDK_FOUND=maybe
20248    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20249$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20250  fi
20251
20252
20253    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20254    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20255      # Do we have a bin/java?
20256      if test ! -x "$BOOT_JDK/bin/java"; then
20257        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20259        BOOT_JDK_FOUND=no
20260      else
20261        # Do we have a bin/javac?
20262        if test ! -x "$BOOT_JDK/bin/javac"; then
20263          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20265          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20266$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20267          BOOT_JDK_FOUND=no
20268        else
20269          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20270          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20271            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20273            BOOT_JDK_FOUND=no
20274          else
20275            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20277
20278            # Extra M4 quote needed to protect [] in grep expression.
20279            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20280            if test "x$FOUND_CORRECT_VERSION" = x; then
20281              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20283              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20284$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20285              BOOT_JDK_FOUND=no
20286            else
20287              # We're done! :-)
20288              BOOT_JDK_FOUND=yes
20289
20290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20291
20292  # Input might be given as Windows format, start by converting to
20293  # unix format.
20294  path="$BOOT_JDK"
20295  new_path=`$CYGPATH -u "$path"`
20296
20297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20300  # "foo.exe" is OK but "foo" is an error.
20301  #
20302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20303  # It is also a way to make sure we got the proper file name for the real test later on.
20304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20305  if test "x$test_shortpath" = x; then
20306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20308    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20309  fi
20310
20311  # Call helper function which possibly converts this using DOS-style short mode.
20312  # If so, the updated path is stored in $new_path.
20313
20314  input_path="$new_path"
20315  # Check if we need to convert this using DOS-style short mode. If the path
20316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20317  # take no chances and rewrite it.
20318  # Note: m4 eats our [], so we need to use [ and ] instead.
20319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20320  if test "x$has_forbidden_chars" != x; then
20321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20325      # Going to short mode and back again did indeed matter. Since short mode is
20326      # case insensitive, let's make it lowercase to improve readability.
20327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20328      # Now convert it back to Unix-stile (cygpath)
20329      input_path=`$CYGPATH -u "$shortmode_path"`
20330      new_path="$input_path"
20331    fi
20332  fi
20333
20334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20335  if test "x$test_cygdrive_prefix" = x; then
20336    # As a simple fix, exclude /usr/bin since it's not a real path.
20337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20339      # a path prefixed by /cygdrive for fixpath to work.
20340      new_path="$CYGWIN_ROOT_PATH$input_path"
20341    fi
20342  fi
20343
20344
20345  if test "x$path" != "x$new_path"; then
20346    BOOT_JDK="$new_path"
20347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20349  fi
20350
20351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20352
20353  path="$BOOT_JDK"
20354  has_colon=`$ECHO $path | $GREP ^.:`
20355  new_path="$path"
20356  if test "x$has_colon" = x; then
20357    # Not in mixed or Windows style, start by that.
20358    new_path=`cmd //c echo $path`
20359  fi
20360
20361
20362  input_path="$new_path"
20363  # Check if we need to convert this using DOS-style short mode. If the path
20364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20365  # take no chances and rewrite it.
20366  # Note: m4 eats our [], so we need to use [ and ] instead.
20367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20368  if test "x$has_forbidden_chars" != x; then
20369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20371  fi
20372
20373
20374  windows_path="$new_path"
20375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20376    unix_path=`$CYGPATH -u "$windows_path"`
20377    new_path="$unix_path"
20378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20380    new_path="$unix_path"
20381  fi
20382
20383  if test "x$path" != "x$new_path"; then
20384    BOOT_JDK="$new_path"
20385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20386$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20387  fi
20388
20389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20391
20392  else
20393    # We're on a posix platform. Hooray! :)
20394    path="$BOOT_JDK"
20395    has_space=`$ECHO "$path" | $GREP " "`
20396    if test "x$has_space" != x; then
20397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20399      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20400    fi
20401
20402    # Use eval to expand a potential ~
20403    eval path="$path"
20404    if test ! -f "$path" && test ! -d "$path"; then
20405      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20406    fi
20407
20408    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20409  fi
20410
20411              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20412$as_echo_n "checking for Boot JDK... " >&6; }
20413              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20414$as_echo "$BOOT_JDK" >&6; }
20415              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20416$as_echo_n "checking Boot JDK version... " >&6; }
20417              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20418              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20419$as_echo "$BOOT_JDK_VERSION" >&6; }
20420            fi # end check jdk version
20421          fi # end check rt.jar
20422        fi # end check javac
20423      fi # end check java
20424    fi # end check boot jdk found
20425  fi
20426
20427
20428  if test "x$BOOT_JDK_FOUND" = xno; then
20429    # Now execute the test
20430
20431  if test -x /usr/libexec/java_home; then
20432    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20433    BOOT_JDK_FOUND=maybe
20434    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20435$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20436  fi
20437
20438
20439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20441      # Do we have a bin/java?
20442      if test ! -x "$BOOT_JDK/bin/java"; then
20443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20445        BOOT_JDK_FOUND=no
20446      else
20447        # Do we have a bin/javac?
20448        if test ! -x "$BOOT_JDK/bin/javac"; then
20449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20453          BOOT_JDK_FOUND=no
20454        else
20455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20459            BOOT_JDK_FOUND=no
20460          else
20461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20463
20464            # Extra M4 quote needed to protect [] in grep expression.
20465            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20466            if test "x$FOUND_CORRECT_VERSION" = x; then
20467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20470$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20471              BOOT_JDK_FOUND=no
20472            else
20473              # We're done! :-)
20474              BOOT_JDK_FOUND=yes
20475
20476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20477
20478  # Input might be given as Windows format, start by converting to
20479  # unix format.
20480  path="$BOOT_JDK"
20481  new_path=`$CYGPATH -u "$path"`
20482
20483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20486  # "foo.exe" is OK but "foo" is an error.
20487  #
20488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20489  # It is also a way to make sure we got the proper file name for the real test later on.
20490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20491  if test "x$test_shortpath" = x; then
20492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20495  fi
20496
20497  # Call helper function which possibly converts this using DOS-style short mode.
20498  # If so, the updated path is stored in $new_path.
20499
20500  input_path="$new_path"
20501  # Check if we need to convert this using DOS-style short mode. If the path
20502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20503  # take no chances and rewrite it.
20504  # Note: m4 eats our [], so we need to use [ and ] instead.
20505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20506  if test "x$has_forbidden_chars" != x; then
20507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20511      # Going to short mode and back again did indeed matter. Since short mode is
20512      # case insensitive, let's make it lowercase to improve readability.
20513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20514      # Now convert it back to Unix-stile (cygpath)
20515      input_path=`$CYGPATH -u "$shortmode_path"`
20516      new_path="$input_path"
20517    fi
20518  fi
20519
20520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20521  if test "x$test_cygdrive_prefix" = x; then
20522    # As a simple fix, exclude /usr/bin since it's not a real path.
20523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20525      # a path prefixed by /cygdrive for fixpath to work.
20526      new_path="$CYGWIN_ROOT_PATH$input_path"
20527    fi
20528  fi
20529
20530
20531  if test "x$path" != "x$new_path"; then
20532    BOOT_JDK="$new_path"
20533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20535  fi
20536
20537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20538
20539  path="$BOOT_JDK"
20540  has_colon=`$ECHO $path | $GREP ^.:`
20541  new_path="$path"
20542  if test "x$has_colon" = x; then
20543    # Not in mixed or Windows style, start by that.
20544    new_path=`cmd //c echo $path`
20545  fi
20546
20547
20548  input_path="$new_path"
20549  # Check if we need to convert this using DOS-style short mode. If the path
20550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20551  # take no chances and rewrite it.
20552  # Note: m4 eats our [], so we need to use [ and ] instead.
20553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20554  if test "x$has_forbidden_chars" != x; then
20555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20557  fi
20558
20559
20560  windows_path="$new_path"
20561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20562    unix_path=`$CYGPATH -u "$windows_path"`
20563    new_path="$unix_path"
20564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20566    new_path="$unix_path"
20567  fi
20568
20569  if test "x$path" != "x$new_path"; then
20570    BOOT_JDK="$new_path"
20571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20573  fi
20574
20575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20577
20578  else
20579    # We're on a posix platform. Hooray! :)
20580    path="$BOOT_JDK"
20581    has_space=`$ECHO "$path" | $GREP " "`
20582    if test "x$has_space" != x; then
20583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20586    fi
20587
20588    # Use eval to expand a potential ~
20589    eval path="$path"
20590    if test ! -f "$path" && test ! -d "$path"; then
20591      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20592    fi
20593
20594    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20595  fi
20596
20597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20598$as_echo_n "checking for Boot JDK... " >&6; }
20599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20600$as_echo "$BOOT_JDK" >&6; }
20601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20602$as_echo_n "checking Boot JDK version... " >&6; }
20603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20605$as_echo "$BOOT_JDK_VERSION" >&6; }
20606            fi # end check jdk version
20607          fi # end check rt.jar
20608        fi # end check javac
20609      fi # end check java
20610    fi # end check boot jdk found
20611  fi
20612
20613
20614  if test "x$BOOT_JDK_FOUND" = xno; then
20615    # Now execute the test
20616
20617  if test -x /usr/libexec/java_home; then
20618    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20619    BOOT_JDK_FOUND=maybe
20620    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20621$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20622  fi
20623
20624
20625    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20626    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20627      # Do we have a bin/java?
20628      if test ! -x "$BOOT_JDK/bin/java"; then
20629        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20631        BOOT_JDK_FOUND=no
20632      else
20633        # Do we have a bin/javac?
20634        if test ! -x "$BOOT_JDK/bin/javac"; then
20635          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20637          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20638$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20639          BOOT_JDK_FOUND=no
20640        else
20641          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20642          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20643            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20645            BOOT_JDK_FOUND=no
20646          else
20647            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20648            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20649
20650            # Extra M4 quote needed to protect [] in grep expression.
20651            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20652            if test "x$FOUND_CORRECT_VERSION" = x; then
20653              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20654$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20655              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20656$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20657              BOOT_JDK_FOUND=no
20658            else
20659              # We're done! :-)
20660              BOOT_JDK_FOUND=yes
20661
20662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20663
20664  # Input might be given as Windows format, start by converting to
20665  # unix format.
20666  path="$BOOT_JDK"
20667  new_path=`$CYGPATH -u "$path"`
20668
20669  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20670  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20671  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20672  # "foo.exe" is OK but "foo" is an error.
20673  #
20674  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20675  # It is also a way to make sure we got the proper file name for the real test later on.
20676  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20677  if test "x$test_shortpath" = x; then
20678    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20680    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20681  fi
20682
20683  # Call helper function which possibly converts this using DOS-style short mode.
20684  # If so, the updated path is stored in $new_path.
20685
20686  input_path="$new_path"
20687  # Check if we need to convert this using DOS-style short mode. If the path
20688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20689  # take no chances and rewrite it.
20690  # Note: m4 eats our [], so we need to use [ and ] instead.
20691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20692  if test "x$has_forbidden_chars" != x; then
20693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20697      # Going to short mode and back again did indeed matter. Since short mode is
20698      # case insensitive, let's make it lowercase to improve readability.
20699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20700      # Now convert it back to Unix-stile (cygpath)
20701      input_path=`$CYGPATH -u "$shortmode_path"`
20702      new_path="$input_path"
20703    fi
20704  fi
20705
20706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20707  if test "x$test_cygdrive_prefix" = x; then
20708    # As a simple fix, exclude /usr/bin since it's not a real path.
20709    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20711      # a path prefixed by /cygdrive for fixpath to work.
20712      new_path="$CYGWIN_ROOT_PATH$input_path"
20713    fi
20714  fi
20715
20716
20717  if test "x$path" != "x$new_path"; then
20718    BOOT_JDK="$new_path"
20719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20721  fi
20722
20723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20724
20725  path="$BOOT_JDK"
20726  has_colon=`$ECHO $path | $GREP ^.:`
20727  new_path="$path"
20728  if test "x$has_colon" = x; then
20729    # Not in mixed or Windows style, start by that.
20730    new_path=`cmd //c echo $path`
20731  fi
20732
20733
20734  input_path="$new_path"
20735  # Check if we need to convert this using DOS-style short mode. If the path
20736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20737  # take no chances and rewrite it.
20738  # Note: m4 eats our [], so we need to use [ and ] instead.
20739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20740  if test "x$has_forbidden_chars" != x; then
20741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20743  fi
20744
20745
20746  windows_path="$new_path"
20747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20748    unix_path=`$CYGPATH -u "$windows_path"`
20749    new_path="$unix_path"
20750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20752    new_path="$unix_path"
20753  fi
20754
20755  if test "x$path" != "x$new_path"; then
20756    BOOT_JDK="$new_path"
20757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20759  fi
20760
20761  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20762  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20763
20764  else
20765    # We're on a posix platform. Hooray! :)
20766    path="$BOOT_JDK"
20767    has_space=`$ECHO "$path" | $GREP " "`
20768    if test "x$has_space" != x; then
20769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20771      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20772    fi
20773
20774    # Use eval to expand a potential ~
20775    eval path="$path"
20776    if test ! -f "$path" && test ! -d "$path"; then
20777      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20778    fi
20779
20780    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20781  fi
20782
20783              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20784$as_echo_n "checking for Boot JDK... " >&6; }
20785              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20786$as_echo "$BOOT_JDK" >&6; }
20787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20788$as_echo_n "checking Boot JDK version... " >&6; }
20789              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20791$as_echo "$BOOT_JDK_VERSION" >&6; }
20792            fi # end check jdk version
20793          fi # end check rt.jar
20794        fi # end check javac
20795      fi # end check java
20796    fi # end check boot jdk found
20797  fi
20798
20799  fi
20800
20801
20802    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20803    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20804      # Do we have a bin/java?
20805      if test ! -x "$BOOT_JDK/bin/java"; then
20806        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20808        BOOT_JDK_FOUND=no
20809      else
20810        # Do we have a bin/javac?
20811        if test ! -x "$BOOT_JDK/bin/javac"; then
20812          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20814          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20815$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20816          BOOT_JDK_FOUND=no
20817        else
20818          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20819          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20822            BOOT_JDK_FOUND=no
20823          else
20824            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20825            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20826
20827            # Extra M4 quote needed to protect [] in grep expression.
20828            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20829            if test "x$FOUND_CORRECT_VERSION" = x; then
20830              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20832              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20833$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20834              BOOT_JDK_FOUND=no
20835            else
20836              # We're done! :-)
20837              BOOT_JDK_FOUND=yes
20838
20839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20840
20841  # Input might be given as Windows format, start by converting to
20842  # unix format.
20843  path="$BOOT_JDK"
20844  new_path=`$CYGPATH -u "$path"`
20845
20846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20849  # "foo.exe" is OK but "foo" is an error.
20850  #
20851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20852  # It is also a way to make sure we got the proper file name for the real test later on.
20853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20854  if test "x$test_shortpath" = x; then
20855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20857    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20858  fi
20859
20860  # Call helper function which possibly converts this using DOS-style short mode.
20861  # If so, the updated path is stored in $new_path.
20862
20863  input_path="$new_path"
20864  # Check if we need to convert this using DOS-style short mode. If the path
20865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20866  # take no chances and rewrite it.
20867  # Note: m4 eats our [], so we need to use [ and ] instead.
20868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20869  if test "x$has_forbidden_chars" != x; then
20870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20874      # Going to short mode and back again did indeed matter. Since short mode is
20875      # case insensitive, let's make it lowercase to improve readability.
20876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20877      # Now convert it back to Unix-stile (cygpath)
20878      input_path=`$CYGPATH -u "$shortmode_path"`
20879      new_path="$input_path"
20880    fi
20881  fi
20882
20883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20884  if test "x$test_cygdrive_prefix" = x; then
20885    # As a simple fix, exclude /usr/bin since it's not a real path.
20886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20888      # a path prefixed by /cygdrive for fixpath to work.
20889      new_path="$CYGWIN_ROOT_PATH$input_path"
20890    fi
20891  fi
20892
20893
20894  if test "x$path" != "x$new_path"; then
20895    BOOT_JDK="$new_path"
20896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20897$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20898  fi
20899
20900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20901
20902  path="$BOOT_JDK"
20903  has_colon=`$ECHO $path | $GREP ^.:`
20904  new_path="$path"
20905  if test "x$has_colon" = x; then
20906    # Not in mixed or Windows style, start by that.
20907    new_path=`cmd //c echo $path`
20908  fi
20909
20910
20911  input_path="$new_path"
20912  # Check if we need to convert this using DOS-style short mode. If the path
20913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20914  # take no chances and rewrite it.
20915  # Note: m4 eats our [], so we need to use [ and ] instead.
20916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20917  if test "x$has_forbidden_chars" != x; then
20918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20920  fi
20921
20922
20923  windows_path="$new_path"
20924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20925    unix_path=`$CYGPATH -u "$windows_path"`
20926    new_path="$unix_path"
20927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20929    new_path="$unix_path"
20930  fi
20931
20932  if test "x$path" != "x$new_path"; then
20933    BOOT_JDK="$new_path"
20934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20936  fi
20937
20938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20940
20941  else
20942    # We're on a posix platform. Hooray! :)
20943    path="$BOOT_JDK"
20944    has_space=`$ECHO "$path" | $GREP " "`
20945    if test "x$has_space" != x; then
20946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20948      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20949    fi
20950
20951    # Use eval to expand a potential ~
20952    eval path="$path"
20953    if test ! -f "$path" && test ! -d "$path"; then
20954      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20955    fi
20956
20957    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20958  fi
20959
20960              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20961$as_echo_n "checking for Boot JDK... " >&6; }
20962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20963$as_echo "$BOOT_JDK" >&6; }
20964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20965$as_echo_n "checking Boot JDK version... " >&6; }
20966              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20967              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20968$as_echo "$BOOT_JDK_VERSION" >&6; }
20969            fi # end check jdk version
20970          fi # end check rt.jar
20971        fi # end check javac
20972      fi # end check java
20973    fi # end check boot jdk found
20974  fi
20975
20976
20977  # Test: Is $JAVA_HOME set?
20978
20979  if test "x$BOOT_JDK_FOUND" = xno; then
20980    # Now execute the test
20981
20982  if test "x$JAVA_HOME" != x; then
20983    JAVA_HOME_PROCESSED="$JAVA_HOME"
20984
20985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20986
20987  # Input might be given as Windows format, start by converting to
20988  # unix format.
20989  path="$JAVA_HOME_PROCESSED"
20990  new_path=`$CYGPATH -u "$path"`
20991
20992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20995  # "foo.exe" is OK but "foo" is an error.
20996  #
20997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20998  # It is also a way to make sure we got the proper file name for the real test later on.
20999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21000  if test "x$test_shortpath" = x; then
21001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21002$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21003    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21004  fi
21005
21006  # Call helper function which possibly converts this using DOS-style short mode.
21007  # If so, the updated path is stored in $new_path.
21008
21009  input_path="$new_path"
21010  # Check if we need to convert this using DOS-style short mode. If the path
21011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21012  # take no chances and rewrite it.
21013  # Note: m4 eats our [], so we need to use [ and ] instead.
21014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21015  if test "x$has_forbidden_chars" != x; then
21016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21020      # Going to short mode and back again did indeed matter. Since short mode is
21021      # case insensitive, let's make it lowercase to improve readability.
21022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21023      # Now convert it back to Unix-stile (cygpath)
21024      input_path=`$CYGPATH -u "$shortmode_path"`
21025      new_path="$input_path"
21026    fi
21027  fi
21028
21029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21030  if test "x$test_cygdrive_prefix" = x; then
21031    # As a simple fix, exclude /usr/bin since it's not a real path.
21032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21034      # a path prefixed by /cygdrive for fixpath to work.
21035      new_path="$CYGWIN_ROOT_PATH$input_path"
21036    fi
21037  fi
21038
21039
21040  if test "x$path" != "x$new_path"; then
21041    JAVA_HOME_PROCESSED="$new_path"
21042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21043$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21044  fi
21045
21046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21047
21048  path="$JAVA_HOME_PROCESSED"
21049  has_colon=`$ECHO $path | $GREP ^.:`
21050  new_path="$path"
21051  if test "x$has_colon" = x; then
21052    # Not in mixed or Windows style, start by that.
21053    new_path=`cmd //c echo $path`
21054  fi
21055
21056
21057  input_path="$new_path"
21058  # Check if we need to convert this using DOS-style short mode. If the path
21059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21060  # take no chances and rewrite it.
21061  # Note: m4 eats our [], so we need to use [ and ] instead.
21062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21063  if test "x$has_forbidden_chars" != x; then
21064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21066  fi
21067
21068
21069  windows_path="$new_path"
21070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21071    unix_path=`$CYGPATH -u "$windows_path"`
21072    new_path="$unix_path"
21073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21075    new_path="$unix_path"
21076  fi
21077
21078  if test "x$path" != "x$new_path"; then
21079    JAVA_HOME_PROCESSED="$new_path"
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21081$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21082  fi
21083
21084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21086
21087  else
21088    # We're on a posix platform. Hooray! :)
21089    path="$JAVA_HOME_PROCESSED"
21090    has_space=`$ECHO "$path" | $GREP " "`
21091    if test "x$has_space" != x; then
21092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21093$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21094      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21095    fi
21096
21097    # Use eval to expand a potential ~
21098    eval path="$path"
21099    if test ! -f "$path" && test ! -d "$path"; then
21100      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21101    fi
21102
21103    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21104  fi
21105
21106    if test ! -d "$JAVA_HOME_PROCESSED"; then
21107      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21108$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21109    else
21110      # Aha, the user has set a JAVA_HOME
21111      # let us use that as the Boot JDK.
21112      BOOT_JDK="$JAVA_HOME_PROCESSED"
21113      BOOT_JDK_FOUND=maybe
21114      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21115$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21116    fi
21117  fi
21118
21119
21120    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21121    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21122      # Do we have a bin/java?
21123      if test ! -x "$BOOT_JDK/bin/java"; then
21124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21126        BOOT_JDK_FOUND=no
21127      else
21128        # Do we have a bin/javac?
21129        if test ! -x "$BOOT_JDK/bin/javac"; then
21130          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21132          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21133$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21134          BOOT_JDK_FOUND=no
21135        else
21136          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21137          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21138            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21140            BOOT_JDK_FOUND=no
21141          else
21142            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21144
21145            # Extra M4 quote needed to protect [] in grep expression.
21146            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21147            if test "x$FOUND_CORRECT_VERSION" = x; then
21148              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21150              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21151$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21152              BOOT_JDK_FOUND=no
21153            else
21154              # We're done! :-)
21155              BOOT_JDK_FOUND=yes
21156
21157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21158
21159  # Input might be given as Windows format, start by converting to
21160  # unix format.
21161  path="$BOOT_JDK"
21162  new_path=`$CYGPATH -u "$path"`
21163
21164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21167  # "foo.exe" is OK but "foo" is an error.
21168  #
21169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21170  # It is also a way to make sure we got the proper file name for the real test later on.
21171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21172  if test "x$test_shortpath" = x; then
21173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21176  fi
21177
21178  # Call helper function which possibly converts this using DOS-style short mode.
21179  # If so, the updated path is stored in $new_path.
21180
21181  input_path="$new_path"
21182  # Check if we need to convert this using DOS-style short mode. If the path
21183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21184  # take no chances and rewrite it.
21185  # Note: m4 eats our [], so we need to use [ and ] instead.
21186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21187  if test "x$has_forbidden_chars" != x; then
21188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21192      # Going to short mode and back again did indeed matter. Since short mode is
21193      # case insensitive, let's make it lowercase to improve readability.
21194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21195      # Now convert it back to Unix-stile (cygpath)
21196      input_path=`$CYGPATH -u "$shortmode_path"`
21197      new_path="$input_path"
21198    fi
21199  fi
21200
21201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21202  if test "x$test_cygdrive_prefix" = x; then
21203    # As a simple fix, exclude /usr/bin since it's not a real path.
21204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21206      # a path prefixed by /cygdrive for fixpath to work.
21207      new_path="$CYGWIN_ROOT_PATH$input_path"
21208    fi
21209  fi
21210
21211
21212  if test "x$path" != "x$new_path"; then
21213    BOOT_JDK="$new_path"
21214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21216  fi
21217
21218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21219
21220  path="$BOOT_JDK"
21221  has_colon=`$ECHO $path | $GREP ^.:`
21222  new_path="$path"
21223  if test "x$has_colon" = x; then
21224    # Not in mixed or Windows style, start by that.
21225    new_path=`cmd //c echo $path`
21226  fi
21227
21228
21229  input_path="$new_path"
21230  # Check if we need to convert this using DOS-style short mode. If the path
21231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21232  # take no chances and rewrite it.
21233  # Note: m4 eats our [], so we need to use [ and ] instead.
21234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21235  if test "x$has_forbidden_chars" != x; then
21236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21238  fi
21239
21240
21241  windows_path="$new_path"
21242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21243    unix_path=`$CYGPATH -u "$windows_path"`
21244    new_path="$unix_path"
21245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21247    new_path="$unix_path"
21248  fi
21249
21250  if test "x$path" != "x$new_path"; then
21251    BOOT_JDK="$new_path"
21252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21254  fi
21255
21256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21258
21259  else
21260    # We're on a posix platform. Hooray! :)
21261    path="$BOOT_JDK"
21262    has_space=`$ECHO "$path" | $GREP " "`
21263    if test "x$has_space" != x; then
21264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21267    fi
21268
21269    # Use eval to expand a potential ~
21270    eval path="$path"
21271    if test ! -f "$path" && test ! -d "$path"; then
21272      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21273    fi
21274
21275    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21276  fi
21277
21278              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21279$as_echo_n "checking for Boot JDK... " >&6; }
21280              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21281$as_echo "$BOOT_JDK" >&6; }
21282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21283$as_echo_n "checking Boot JDK version... " >&6; }
21284              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21285              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21286$as_echo "$BOOT_JDK_VERSION" >&6; }
21287            fi # end check jdk version
21288          fi # end check rt.jar
21289        fi # end check javac
21290      fi # end check java
21291    fi # end check boot jdk found
21292  fi
21293
21294
21295  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21296
21297  if test "x$BOOT_JDK_FOUND" = xno; then
21298    # Now execute the test
21299
21300  # Extract the first word of "javac", so it can be a program name with args.
21301set dummy javac; ac_word=$2
21302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21303$as_echo_n "checking for $ac_word... " >&6; }
21304if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21305  $as_echo_n "(cached) " >&6
21306else
21307  case $JAVAC_CHECK in
21308  [\\/]* | ?:[\\/]*)
21309  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21310  ;;
21311  *)
21312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21313for as_dir in $PATH
21314do
21315  IFS=$as_save_IFS
21316  test -z "$as_dir" && as_dir=.
21317    for ac_exec_ext in '' $ac_executable_extensions; do
21318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21319    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21321    break 2
21322  fi
21323done
21324  done
21325IFS=$as_save_IFS
21326
21327  ;;
21328esac
21329fi
21330JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21331if test -n "$JAVAC_CHECK"; then
21332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21333$as_echo "$JAVAC_CHECK" >&6; }
21334else
21335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21336$as_echo "no" >&6; }
21337fi
21338
21339
21340  # Extract the first word of "java", so it can be a program name with args.
21341set dummy java; ac_word=$2
21342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21343$as_echo_n "checking for $ac_word... " >&6; }
21344if ${ac_cv_path_JAVA_CHECK+:} false; then :
21345  $as_echo_n "(cached) " >&6
21346else
21347  case $JAVA_CHECK in
21348  [\\/]* | ?:[\\/]*)
21349  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21350  ;;
21351  *)
21352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21353for as_dir in $PATH
21354do
21355  IFS=$as_save_IFS
21356  test -z "$as_dir" && as_dir=.
21357    for ac_exec_ext in '' $ac_executable_extensions; do
21358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21359    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21361    break 2
21362  fi
21363done
21364  done
21365IFS=$as_save_IFS
21366
21367  ;;
21368esac
21369fi
21370JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21371if test -n "$JAVA_CHECK"; then
21372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21373$as_echo "$JAVA_CHECK" >&6; }
21374else
21375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21376$as_echo "no" >&6; }
21377fi
21378
21379
21380  BINARY="$JAVAC_CHECK"
21381  if test "x$JAVAC_CHECK" = x; then
21382    BINARY="$JAVA_CHECK"
21383  fi
21384  if test "x$BINARY" != x; then
21385    # So there is a java(c) binary, it might be part of a JDK.
21386    # Lets find the JDK/JRE directory by following symbolic links.
21387    # Linux/GNU systems often have links from /usr/bin/java to
21388    # /etc/alternatives/java to the real JDK binary.
21389
21390  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21391    # Follow a chain of symbolic links. Use readlink
21392    # where it exists, else fall back to horribly
21393    # complicated shell code.
21394    if test "x$READLINK_TESTED" != yes; then
21395      # On MacOSX there is a readlink tool with a different
21396      # purpose than the GNU readlink tool. Check the found readlink.
21397      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21398      if test "x$ISGNU" = x; then
21399        # A readlink that we do not know how to use.
21400        # Are there other non-GNU readlinks out there?
21401        READLINK_TESTED=yes
21402        READLINK=
21403      fi
21404    fi
21405
21406    if test "x$READLINK" != x; then
21407      BINARY=`$READLINK -f $BINARY`
21408    else
21409      # Save the current directory for restoring afterwards
21410      STARTDIR=$PWD
21411      COUNTER=0
21412      sym_link_dir=`$DIRNAME $BINARY`
21413      sym_link_file=`$BASENAME $BINARY`
21414      cd $sym_link_dir
21415      # Use -P flag to resolve symlinks in directories.
21416      cd `$THEPWDCMD -P`
21417      sym_link_dir=`$THEPWDCMD -P`
21418      # Resolve file symlinks
21419      while test $COUNTER -lt 20; do
21420        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21421        if test "x$ISLINK" == x; then
21422          # This is not a symbolic link! We are done!
21423          break
21424        fi
21425        # Again resolve directory symlinks since the target of the just found
21426        # link could be in a different directory
21427        cd `$DIRNAME $ISLINK`
21428        sym_link_dir=`$THEPWDCMD -P`
21429        sym_link_file=`$BASENAME $ISLINK`
21430        let COUNTER=COUNTER+1
21431      done
21432      cd $STARTDIR
21433      BINARY=$sym_link_dir/$sym_link_file
21434    fi
21435  fi
21436
21437    BOOT_JDK=`dirname "$BINARY"`
21438    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21439    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21440      # Looks like we found ourselves an JDK
21441      BOOT_JDK_FOUND=maybe
21442      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21443$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21444    fi
21445  fi
21446
21447
21448    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21449    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21450      # Do we have a bin/java?
21451      if test ! -x "$BOOT_JDK/bin/java"; then
21452        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21454        BOOT_JDK_FOUND=no
21455      else
21456        # Do we have a bin/javac?
21457        if test ! -x "$BOOT_JDK/bin/javac"; then
21458          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21460          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21461$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21462          BOOT_JDK_FOUND=no
21463        else
21464          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21465          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21466            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21468            BOOT_JDK_FOUND=no
21469          else
21470            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21471            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21472
21473            # Extra M4 quote needed to protect [] in grep expression.
21474            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21475            if test "x$FOUND_CORRECT_VERSION" = x; then
21476              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21478              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21479$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21480              BOOT_JDK_FOUND=no
21481            else
21482              # We're done! :-)
21483              BOOT_JDK_FOUND=yes
21484
21485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21486
21487  # Input might be given as Windows format, start by converting to
21488  # unix format.
21489  path="$BOOT_JDK"
21490  new_path=`$CYGPATH -u "$path"`
21491
21492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21495  # "foo.exe" is OK but "foo" is an error.
21496  #
21497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21498  # It is also a way to make sure we got the proper file name for the real test later on.
21499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21500  if test "x$test_shortpath" = x; then
21501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21503    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21504  fi
21505
21506  # Call helper function which possibly converts this using DOS-style short mode.
21507  # If so, the updated path is stored in $new_path.
21508
21509  input_path="$new_path"
21510  # Check if we need to convert this using DOS-style short mode. If the path
21511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21512  # take no chances and rewrite it.
21513  # Note: m4 eats our [], so we need to use [ and ] instead.
21514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21515  if test "x$has_forbidden_chars" != x; then
21516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21520      # Going to short mode and back again did indeed matter. Since short mode is
21521      # case insensitive, let's make it lowercase to improve readability.
21522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21523      # Now convert it back to Unix-stile (cygpath)
21524      input_path=`$CYGPATH -u "$shortmode_path"`
21525      new_path="$input_path"
21526    fi
21527  fi
21528
21529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21530  if test "x$test_cygdrive_prefix" = x; then
21531    # As a simple fix, exclude /usr/bin since it's not a real path.
21532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21534      # a path prefixed by /cygdrive for fixpath to work.
21535      new_path="$CYGWIN_ROOT_PATH$input_path"
21536    fi
21537  fi
21538
21539
21540  if test "x$path" != "x$new_path"; then
21541    BOOT_JDK="$new_path"
21542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21544  fi
21545
21546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21547
21548  path="$BOOT_JDK"
21549  has_colon=`$ECHO $path | $GREP ^.:`
21550  new_path="$path"
21551  if test "x$has_colon" = x; then
21552    # Not in mixed or Windows style, start by that.
21553    new_path=`cmd //c echo $path`
21554  fi
21555
21556
21557  input_path="$new_path"
21558  # Check if we need to convert this using DOS-style short mode. If the path
21559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21560  # take no chances and rewrite it.
21561  # Note: m4 eats our [], so we need to use [ and ] instead.
21562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21563  if test "x$has_forbidden_chars" != x; then
21564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21566  fi
21567
21568
21569  windows_path="$new_path"
21570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21571    unix_path=`$CYGPATH -u "$windows_path"`
21572    new_path="$unix_path"
21573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21575    new_path="$unix_path"
21576  fi
21577
21578  if test "x$path" != "x$new_path"; then
21579    BOOT_JDK="$new_path"
21580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21582  fi
21583
21584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21586
21587  else
21588    # We're on a posix platform. Hooray! :)
21589    path="$BOOT_JDK"
21590    has_space=`$ECHO "$path" | $GREP " "`
21591    if test "x$has_space" != x; then
21592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21593$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21594      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21595    fi
21596
21597    # Use eval to expand a potential ~
21598    eval path="$path"
21599    if test ! -f "$path" && test ! -d "$path"; then
21600      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21601    fi
21602
21603    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21604  fi
21605
21606              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21607$as_echo_n "checking for Boot JDK... " >&6; }
21608              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21609$as_echo "$BOOT_JDK" >&6; }
21610              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21611$as_echo_n "checking Boot JDK version... " >&6; }
21612              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21613              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21614$as_echo "$BOOT_JDK_VERSION" >&6; }
21615            fi # end check jdk version
21616          fi # end check rt.jar
21617        fi # end check javac
21618      fi # end check java
21619    fi # end check boot jdk found
21620  fi
21621
21622
21623  # Test: Is there a JDK installed in default, well-known locations?
21624
21625  if test "x$BOOT_JDK_FOUND" = xno; then
21626    # Now execute the test
21627
21628  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21629
21630  if test "x$BOOT_JDK_FOUND" = xno; then
21631    # Now execute the test
21632
21633  if test "x$ProgramW6432" != x; then
21634    VIRTUAL_DIR="$ProgramW6432/Java"
21635
21636  windows_path="$VIRTUAL_DIR"
21637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21638    unix_path=`$CYGPATH -u "$windows_path"`
21639    VIRTUAL_DIR="$unix_path"
21640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21642    VIRTUAL_DIR="$unix_path"
21643  fi
21644
21645
21646  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21647  BOOT_JDK_SUFFIX=""
21648  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21649  if test "x$ALL_JDKS_FOUND" != x; then
21650    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21651
21652  if test "x$BOOT_JDK_FOUND" = xno; then
21653    # Now execute the test
21654
21655        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21656        if test -d "$BOOT_JDK"; then
21657          BOOT_JDK_FOUND=maybe
21658          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21659$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21660        fi
21661
21662
21663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21665      # Do we have a bin/java?
21666      if test ! -x "$BOOT_JDK/bin/java"; then
21667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21669        BOOT_JDK_FOUND=no
21670      else
21671        # Do we have a bin/javac?
21672        if test ! -x "$BOOT_JDK/bin/javac"; then
21673          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21675          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21677          BOOT_JDK_FOUND=no
21678        else
21679          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21680          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21681            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21683            BOOT_JDK_FOUND=no
21684          else
21685            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21686            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21687
21688            # Extra M4 quote needed to protect [] in grep expression.
21689            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21690            if test "x$FOUND_CORRECT_VERSION" = x; then
21691              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21693              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21694$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21695              BOOT_JDK_FOUND=no
21696            else
21697              # We're done! :-)
21698              BOOT_JDK_FOUND=yes
21699
21700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21701
21702  # Input might be given as Windows format, start by converting to
21703  # unix format.
21704  path="$BOOT_JDK"
21705  new_path=`$CYGPATH -u "$path"`
21706
21707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21710  # "foo.exe" is OK but "foo" is an error.
21711  #
21712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21713  # It is also a way to make sure we got the proper file name for the real test later on.
21714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21715  if test "x$test_shortpath" = x; then
21716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21719  fi
21720
21721  # Call helper function which possibly converts this using DOS-style short mode.
21722  # If so, the updated path is stored in $new_path.
21723
21724  input_path="$new_path"
21725  # Check if we need to convert this using DOS-style short mode. If the path
21726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21727  # take no chances and rewrite it.
21728  # Note: m4 eats our [], so we need to use [ and ] instead.
21729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21730  if test "x$has_forbidden_chars" != x; then
21731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21735      # Going to short mode and back again did indeed matter. Since short mode is
21736      # case insensitive, let's make it lowercase to improve readability.
21737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21738      # Now convert it back to Unix-stile (cygpath)
21739      input_path=`$CYGPATH -u "$shortmode_path"`
21740      new_path="$input_path"
21741    fi
21742  fi
21743
21744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21745  if test "x$test_cygdrive_prefix" = x; then
21746    # As a simple fix, exclude /usr/bin since it's not a real path.
21747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21749      # a path prefixed by /cygdrive for fixpath to work.
21750      new_path="$CYGWIN_ROOT_PATH$input_path"
21751    fi
21752  fi
21753
21754
21755  if test "x$path" != "x$new_path"; then
21756    BOOT_JDK="$new_path"
21757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21759  fi
21760
21761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21762
21763  path="$BOOT_JDK"
21764  has_colon=`$ECHO $path | $GREP ^.:`
21765  new_path="$path"
21766  if test "x$has_colon" = x; then
21767    # Not in mixed or Windows style, start by that.
21768    new_path=`cmd //c echo $path`
21769  fi
21770
21771
21772  input_path="$new_path"
21773  # Check if we need to convert this using DOS-style short mode. If the path
21774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21775  # take no chances and rewrite it.
21776  # Note: m4 eats our [], so we need to use [ and ] instead.
21777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21778  if test "x$has_forbidden_chars" != x; then
21779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21781  fi
21782
21783
21784  windows_path="$new_path"
21785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21786    unix_path=`$CYGPATH -u "$windows_path"`
21787    new_path="$unix_path"
21788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21790    new_path="$unix_path"
21791  fi
21792
21793  if test "x$path" != "x$new_path"; then
21794    BOOT_JDK="$new_path"
21795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21797  fi
21798
21799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21801
21802  else
21803    # We're on a posix platform. Hooray! :)
21804    path="$BOOT_JDK"
21805    has_space=`$ECHO "$path" | $GREP " "`
21806    if test "x$has_space" != x; then
21807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21810    fi
21811
21812    # Use eval to expand a potential ~
21813    eval path="$path"
21814    if test ! -f "$path" && test ! -d "$path"; then
21815      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21816    fi
21817
21818    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21819  fi
21820
21821              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21822$as_echo_n "checking for Boot JDK... " >&6; }
21823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21824$as_echo "$BOOT_JDK" >&6; }
21825              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21826$as_echo_n "checking Boot JDK version... " >&6; }
21827              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21829$as_echo "$BOOT_JDK_VERSION" >&6; }
21830            fi # end check jdk version
21831          fi # end check rt.jar
21832        fi # end check javac
21833      fi # end check java
21834    fi # end check boot jdk found
21835  fi
21836
21837    done
21838  fi
21839
21840  fi
21841
21842
21843    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21844    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21845      # Do we have a bin/java?
21846      if test ! -x "$BOOT_JDK/bin/java"; then
21847        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21849        BOOT_JDK_FOUND=no
21850      else
21851        # Do we have a bin/javac?
21852        if test ! -x "$BOOT_JDK/bin/javac"; then
21853          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21855          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21856$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21857          BOOT_JDK_FOUND=no
21858        else
21859          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21860          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21861            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21863            BOOT_JDK_FOUND=no
21864          else
21865            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21866            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21867
21868            # Extra M4 quote needed to protect [] in grep expression.
21869            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21870            if test "x$FOUND_CORRECT_VERSION" = x; then
21871              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21873              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21874$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21875              BOOT_JDK_FOUND=no
21876            else
21877              # We're done! :-)
21878              BOOT_JDK_FOUND=yes
21879
21880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21881
21882  # Input might be given as Windows format, start by converting to
21883  # unix format.
21884  path="$BOOT_JDK"
21885  new_path=`$CYGPATH -u "$path"`
21886
21887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21890  # "foo.exe" is OK but "foo" is an error.
21891  #
21892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21893  # It is also a way to make sure we got the proper file name for the real test later on.
21894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21895  if test "x$test_shortpath" = x; then
21896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21898    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21899  fi
21900
21901  # Call helper function which possibly converts this using DOS-style short mode.
21902  # If so, the updated path is stored in $new_path.
21903
21904  input_path="$new_path"
21905  # Check if we need to convert this using DOS-style short mode. If the path
21906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21907  # take no chances and rewrite it.
21908  # Note: m4 eats our [], so we need to use [ and ] instead.
21909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21910  if test "x$has_forbidden_chars" != x; then
21911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21915      # Going to short mode and back again did indeed matter. Since short mode is
21916      # case insensitive, let's make it lowercase to improve readability.
21917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21918      # Now convert it back to Unix-stile (cygpath)
21919      input_path=`$CYGPATH -u "$shortmode_path"`
21920      new_path="$input_path"
21921    fi
21922  fi
21923
21924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21925  if test "x$test_cygdrive_prefix" = x; then
21926    # As a simple fix, exclude /usr/bin since it's not a real path.
21927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21929      # a path prefixed by /cygdrive for fixpath to work.
21930      new_path="$CYGWIN_ROOT_PATH$input_path"
21931    fi
21932  fi
21933
21934
21935  if test "x$path" != "x$new_path"; then
21936    BOOT_JDK="$new_path"
21937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21939  fi
21940
21941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21942
21943  path="$BOOT_JDK"
21944  has_colon=`$ECHO $path | $GREP ^.:`
21945  new_path="$path"
21946  if test "x$has_colon" = x; then
21947    # Not in mixed or Windows style, start by that.
21948    new_path=`cmd //c echo $path`
21949  fi
21950
21951
21952  input_path="$new_path"
21953  # Check if we need to convert this using DOS-style short mode. If the path
21954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21955  # take no chances and rewrite it.
21956  # Note: m4 eats our [], so we need to use [ and ] instead.
21957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21958  if test "x$has_forbidden_chars" != x; then
21959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21961  fi
21962
21963
21964  windows_path="$new_path"
21965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21966    unix_path=`$CYGPATH -u "$windows_path"`
21967    new_path="$unix_path"
21968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21970    new_path="$unix_path"
21971  fi
21972
21973  if test "x$path" != "x$new_path"; then
21974    BOOT_JDK="$new_path"
21975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21977  fi
21978
21979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21981
21982  else
21983    # We're on a posix platform. Hooray! :)
21984    path="$BOOT_JDK"
21985    has_space=`$ECHO "$path" | $GREP " "`
21986    if test "x$has_space" != x; then
21987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21989      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21990    fi
21991
21992    # Use eval to expand a potential ~
21993    eval path="$path"
21994    if test ! -f "$path" && test ! -d "$path"; then
21995      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21996    fi
21997
21998    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21999  fi
22000
22001              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22002$as_echo_n "checking for Boot JDK... " >&6; }
22003              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22004$as_echo "$BOOT_JDK" >&6; }
22005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22006$as_echo_n "checking Boot JDK version... " >&6; }
22007              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22008              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22009$as_echo "$BOOT_JDK_VERSION" >&6; }
22010            fi # end check jdk version
22011          fi # end check rt.jar
22012        fi # end check javac
22013      fi # end check java
22014    fi # end check boot jdk found
22015  fi
22016
22017
22018  if test "x$BOOT_JDK_FOUND" = xno; then
22019    # Now execute the test
22020
22021  if test "x$PROGRAMW6432" != x; then
22022    VIRTUAL_DIR="$PROGRAMW6432/Java"
22023
22024  windows_path="$VIRTUAL_DIR"
22025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22026    unix_path=`$CYGPATH -u "$windows_path"`
22027    VIRTUAL_DIR="$unix_path"
22028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22030    VIRTUAL_DIR="$unix_path"
22031  fi
22032
22033
22034  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22035  BOOT_JDK_SUFFIX=""
22036  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22037  if test "x$ALL_JDKS_FOUND" != x; then
22038    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22039
22040  if test "x$BOOT_JDK_FOUND" = xno; then
22041    # Now execute the test
22042
22043        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22044        if test -d "$BOOT_JDK"; then
22045          BOOT_JDK_FOUND=maybe
22046          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22047$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22048        fi
22049
22050
22051    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22052    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22053      # Do we have a bin/java?
22054      if test ! -x "$BOOT_JDK/bin/java"; then
22055        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22057        BOOT_JDK_FOUND=no
22058      else
22059        # Do we have a bin/javac?
22060        if test ! -x "$BOOT_JDK/bin/javac"; then
22061          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22063          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22064$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22065          BOOT_JDK_FOUND=no
22066        else
22067          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22068          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22069            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22071            BOOT_JDK_FOUND=no
22072          else
22073            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22075
22076            # Extra M4 quote needed to protect [] in grep expression.
22077            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22078            if test "x$FOUND_CORRECT_VERSION" = x; then
22079              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22081              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22082$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22083              BOOT_JDK_FOUND=no
22084            else
22085              # We're done! :-)
22086              BOOT_JDK_FOUND=yes
22087
22088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22089
22090  # Input might be given as Windows format, start by converting to
22091  # unix format.
22092  path="$BOOT_JDK"
22093  new_path=`$CYGPATH -u "$path"`
22094
22095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22098  # "foo.exe" is OK but "foo" is an error.
22099  #
22100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22101  # It is also a way to make sure we got the proper file name for the real test later on.
22102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22103  if test "x$test_shortpath" = x; then
22104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22106    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22107  fi
22108
22109  # Call helper function which possibly converts this using DOS-style short mode.
22110  # If so, the updated path is stored in $new_path.
22111
22112  input_path="$new_path"
22113  # Check if we need to convert this using DOS-style short mode. If the path
22114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22115  # take no chances and rewrite it.
22116  # Note: m4 eats our [], so we need to use [ and ] instead.
22117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22118  if test "x$has_forbidden_chars" != x; then
22119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22123      # Going to short mode and back again did indeed matter. Since short mode is
22124      # case insensitive, let's make it lowercase to improve readability.
22125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22126      # Now convert it back to Unix-stile (cygpath)
22127      input_path=`$CYGPATH -u "$shortmode_path"`
22128      new_path="$input_path"
22129    fi
22130  fi
22131
22132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22133  if test "x$test_cygdrive_prefix" = x; then
22134    # As a simple fix, exclude /usr/bin since it's not a real path.
22135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22137      # a path prefixed by /cygdrive for fixpath to work.
22138      new_path="$CYGWIN_ROOT_PATH$input_path"
22139    fi
22140  fi
22141
22142
22143  if test "x$path" != "x$new_path"; then
22144    BOOT_JDK="$new_path"
22145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22147  fi
22148
22149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22150
22151  path="$BOOT_JDK"
22152  has_colon=`$ECHO $path | $GREP ^.:`
22153  new_path="$path"
22154  if test "x$has_colon" = x; then
22155    # Not in mixed or Windows style, start by that.
22156    new_path=`cmd //c echo $path`
22157  fi
22158
22159
22160  input_path="$new_path"
22161  # Check if we need to convert this using DOS-style short mode. If the path
22162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22163  # take no chances and rewrite it.
22164  # Note: m4 eats our [], so we need to use [ and ] instead.
22165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22166  if test "x$has_forbidden_chars" != x; then
22167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22169  fi
22170
22171
22172  windows_path="$new_path"
22173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22174    unix_path=`$CYGPATH -u "$windows_path"`
22175    new_path="$unix_path"
22176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22178    new_path="$unix_path"
22179  fi
22180
22181  if test "x$path" != "x$new_path"; then
22182    BOOT_JDK="$new_path"
22183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22185  fi
22186
22187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22189
22190  else
22191    # We're on a posix platform. Hooray! :)
22192    path="$BOOT_JDK"
22193    has_space=`$ECHO "$path" | $GREP " "`
22194    if test "x$has_space" != x; then
22195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22198    fi
22199
22200    # Use eval to expand a potential ~
22201    eval path="$path"
22202    if test ! -f "$path" && test ! -d "$path"; then
22203      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22204    fi
22205
22206    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22207  fi
22208
22209              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22210$as_echo_n "checking for Boot JDK... " >&6; }
22211              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22212$as_echo "$BOOT_JDK" >&6; }
22213              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22214$as_echo_n "checking Boot JDK version... " >&6; }
22215              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22216              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22217$as_echo "$BOOT_JDK_VERSION" >&6; }
22218            fi # end check jdk version
22219          fi # end check rt.jar
22220        fi # end check javac
22221      fi # end check java
22222    fi # end check boot jdk found
22223  fi
22224
22225    done
22226  fi
22227
22228  fi
22229
22230
22231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22233      # Do we have a bin/java?
22234      if test ! -x "$BOOT_JDK/bin/java"; then
22235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22237        BOOT_JDK_FOUND=no
22238      else
22239        # Do we have a bin/javac?
22240        if test ! -x "$BOOT_JDK/bin/javac"; then
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22245          BOOT_JDK_FOUND=no
22246        else
22247          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22248          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22251            BOOT_JDK_FOUND=no
22252          else
22253            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22254            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22255
22256            # Extra M4 quote needed to protect [] in grep expression.
22257            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22258            if test "x$FOUND_CORRECT_VERSION" = x; then
22259              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22261              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22262$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22263              BOOT_JDK_FOUND=no
22264            else
22265              # We're done! :-)
22266              BOOT_JDK_FOUND=yes
22267
22268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22269
22270  # Input might be given as Windows format, start by converting to
22271  # unix format.
22272  path="$BOOT_JDK"
22273  new_path=`$CYGPATH -u "$path"`
22274
22275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22278  # "foo.exe" is OK but "foo" is an error.
22279  #
22280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22281  # It is also a way to make sure we got the proper file name for the real test later on.
22282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22283  if test "x$test_shortpath" = x; then
22284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22287  fi
22288
22289  # Call helper function which possibly converts this using DOS-style short mode.
22290  # If so, the updated path is stored in $new_path.
22291
22292  input_path="$new_path"
22293  # Check if we need to convert this using DOS-style short mode. If the path
22294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22295  # take no chances and rewrite it.
22296  # Note: m4 eats our [], so we need to use [ and ] instead.
22297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22298  if test "x$has_forbidden_chars" != x; then
22299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22303      # Going to short mode and back again did indeed matter. Since short mode is
22304      # case insensitive, let's make it lowercase to improve readability.
22305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22306      # Now convert it back to Unix-stile (cygpath)
22307      input_path=`$CYGPATH -u "$shortmode_path"`
22308      new_path="$input_path"
22309    fi
22310  fi
22311
22312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22313  if test "x$test_cygdrive_prefix" = x; then
22314    # As a simple fix, exclude /usr/bin since it's not a real path.
22315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22317      # a path prefixed by /cygdrive for fixpath to work.
22318      new_path="$CYGWIN_ROOT_PATH$input_path"
22319    fi
22320  fi
22321
22322
22323  if test "x$path" != "x$new_path"; then
22324    BOOT_JDK="$new_path"
22325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22327  fi
22328
22329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22330
22331  path="$BOOT_JDK"
22332  has_colon=`$ECHO $path | $GREP ^.:`
22333  new_path="$path"
22334  if test "x$has_colon" = x; then
22335    # Not in mixed or Windows style, start by that.
22336    new_path=`cmd //c echo $path`
22337  fi
22338
22339
22340  input_path="$new_path"
22341  # Check if we need to convert this using DOS-style short mode. If the path
22342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22343  # take no chances and rewrite it.
22344  # Note: m4 eats our [], so we need to use [ and ] instead.
22345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22346  if test "x$has_forbidden_chars" != x; then
22347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22349  fi
22350
22351
22352  windows_path="$new_path"
22353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22354    unix_path=`$CYGPATH -u "$windows_path"`
22355    new_path="$unix_path"
22356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22358    new_path="$unix_path"
22359  fi
22360
22361  if test "x$path" != "x$new_path"; then
22362    BOOT_JDK="$new_path"
22363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22365  fi
22366
22367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22369
22370  else
22371    # We're on a posix platform. Hooray! :)
22372    path="$BOOT_JDK"
22373    has_space=`$ECHO "$path" | $GREP " "`
22374    if test "x$has_space" != x; then
22375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22376$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22378    fi
22379
22380    # Use eval to expand a potential ~
22381    eval path="$path"
22382    if test ! -f "$path" && test ! -d "$path"; then
22383      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22384    fi
22385
22386    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22387  fi
22388
22389              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22390$as_echo_n "checking for Boot JDK... " >&6; }
22391              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22392$as_echo "$BOOT_JDK" >&6; }
22393              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22394$as_echo_n "checking Boot JDK version... " >&6; }
22395              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22396              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22397$as_echo "$BOOT_JDK_VERSION" >&6; }
22398            fi # end check jdk version
22399          fi # end check rt.jar
22400        fi # end check javac
22401      fi # end check java
22402    fi # end check boot jdk found
22403  fi
22404
22405
22406  if test "x$BOOT_JDK_FOUND" = xno; then
22407    # Now execute the test
22408
22409  if test "x$PROGRAMFILES" != x; then
22410    VIRTUAL_DIR="$PROGRAMFILES/Java"
22411
22412  windows_path="$VIRTUAL_DIR"
22413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22414    unix_path=`$CYGPATH -u "$windows_path"`
22415    VIRTUAL_DIR="$unix_path"
22416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22418    VIRTUAL_DIR="$unix_path"
22419  fi
22420
22421
22422  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22423  BOOT_JDK_SUFFIX=""
22424  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22425  if test "x$ALL_JDKS_FOUND" != x; then
22426    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22427
22428  if test "x$BOOT_JDK_FOUND" = xno; then
22429    # Now execute the test
22430
22431        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22432        if test -d "$BOOT_JDK"; then
22433          BOOT_JDK_FOUND=maybe
22434          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22435$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22436        fi
22437
22438
22439    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22440    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22441      # Do we have a bin/java?
22442      if test ! -x "$BOOT_JDK/bin/java"; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22445        BOOT_JDK_FOUND=no
22446      else
22447        # Do we have a bin/javac?
22448        if test ! -x "$BOOT_JDK/bin/javac"; then
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22450$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22451          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22452$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22453          BOOT_JDK_FOUND=no
22454        else
22455          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22456          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22459            BOOT_JDK_FOUND=no
22460          else
22461            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22462            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22463
22464            # Extra M4 quote needed to protect [] in grep expression.
22465            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22466            if test "x$FOUND_CORRECT_VERSION" = x; then
22467              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22469              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22470$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22471              BOOT_JDK_FOUND=no
22472            else
22473              # We're done! :-)
22474              BOOT_JDK_FOUND=yes
22475
22476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22477
22478  # Input might be given as Windows format, start by converting to
22479  # unix format.
22480  path="$BOOT_JDK"
22481  new_path=`$CYGPATH -u "$path"`
22482
22483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22486  # "foo.exe" is OK but "foo" is an error.
22487  #
22488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22489  # It is also a way to make sure we got the proper file name for the real test later on.
22490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22491  if test "x$test_shortpath" = x; then
22492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22493$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22494    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22495  fi
22496
22497  # Call helper function which possibly converts this using DOS-style short mode.
22498  # If so, the updated path is stored in $new_path.
22499
22500  input_path="$new_path"
22501  # Check if we need to convert this using DOS-style short mode. If the path
22502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22503  # take no chances and rewrite it.
22504  # Note: m4 eats our [], so we need to use [ and ] instead.
22505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22506  if test "x$has_forbidden_chars" != x; then
22507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22511      # Going to short mode and back again did indeed matter. Since short mode is
22512      # case insensitive, let's make it lowercase to improve readability.
22513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22514      # Now convert it back to Unix-stile (cygpath)
22515      input_path=`$CYGPATH -u "$shortmode_path"`
22516      new_path="$input_path"
22517    fi
22518  fi
22519
22520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22521  if test "x$test_cygdrive_prefix" = x; then
22522    # As a simple fix, exclude /usr/bin since it's not a real path.
22523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22525      # a path prefixed by /cygdrive for fixpath to work.
22526      new_path="$CYGWIN_ROOT_PATH$input_path"
22527    fi
22528  fi
22529
22530
22531  if test "x$path" != "x$new_path"; then
22532    BOOT_JDK="$new_path"
22533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22534$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22535  fi
22536
22537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22538
22539  path="$BOOT_JDK"
22540  has_colon=`$ECHO $path | $GREP ^.:`
22541  new_path="$path"
22542  if test "x$has_colon" = x; then
22543    # Not in mixed or Windows style, start by that.
22544    new_path=`cmd //c echo $path`
22545  fi
22546
22547
22548  input_path="$new_path"
22549  # Check if we need to convert this using DOS-style short mode. If the path
22550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22551  # take no chances and rewrite it.
22552  # Note: m4 eats our [], so we need to use [ and ] instead.
22553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22554  if test "x$has_forbidden_chars" != x; then
22555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22557  fi
22558
22559
22560  windows_path="$new_path"
22561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22562    unix_path=`$CYGPATH -u "$windows_path"`
22563    new_path="$unix_path"
22564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22566    new_path="$unix_path"
22567  fi
22568
22569  if test "x$path" != "x$new_path"; then
22570    BOOT_JDK="$new_path"
22571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22572$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22573  fi
22574
22575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22577
22578  else
22579    # We're on a posix platform. Hooray! :)
22580    path="$BOOT_JDK"
22581    has_space=`$ECHO "$path" | $GREP " "`
22582    if test "x$has_space" != x; then
22583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22584$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22585      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22586    fi
22587
22588    # Use eval to expand a potential ~
22589    eval path="$path"
22590    if test ! -f "$path" && test ! -d "$path"; then
22591      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22592    fi
22593
22594    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22595  fi
22596
22597              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22598$as_echo_n "checking for Boot JDK... " >&6; }
22599              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22600$as_echo "$BOOT_JDK" >&6; }
22601              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22602$as_echo_n "checking Boot JDK version... " >&6; }
22603              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22604              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22605$as_echo "$BOOT_JDK_VERSION" >&6; }
22606            fi # end check jdk version
22607          fi # end check rt.jar
22608        fi # end check javac
22609      fi # end check java
22610    fi # end check boot jdk found
22611  fi
22612
22613    done
22614  fi
22615
22616  fi
22617
22618
22619    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22620    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22621      # Do we have a bin/java?
22622      if test ! -x "$BOOT_JDK/bin/java"; then
22623        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22625        BOOT_JDK_FOUND=no
22626      else
22627        # Do we have a bin/javac?
22628        if test ! -x "$BOOT_JDK/bin/javac"; then
22629          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22631          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22632$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22633          BOOT_JDK_FOUND=no
22634        else
22635          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22636          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22639            BOOT_JDK_FOUND=no
22640          else
22641            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22642            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22643
22644            # Extra M4 quote needed to protect [] in grep expression.
22645            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22646            if test "x$FOUND_CORRECT_VERSION" = x; then
22647              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22649              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22650$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22651              BOOT_JDK_FOUND=no
22652            else
22653              # We're done! :-)
22654              BOOT_JDK_FOUND=yes
22655
22656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22657
22658  # Input might be given as Windows format, start by converting to
22659  # unix format.
22660  path="$BOOT_JDK"
22661  new_path=`$CYGPATH -u "$path"`
22662
22663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22666  # "foo.exe" is OK but "foo" is an error.
22667  #
22668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22669  # It is also a way to make sure we got the proper file name for the real test later on.
22670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22671  if test "x$test_shortpath" = x; then
22672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22675  fi
22676
22677  # Call helper function which possibly converts this using DOS-style short mode.
22678  # If so, the updated path is stored in $new_path.
22679
22680  input_path="$new_path"
22681  # Check if we need to convert this using DOS-style short mode. If the path
22682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22683  # take no chances and rewrite it.
22684  # Note: m4 eats our [], so we need to use [ and ] instead.
22685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22686  if test "x$has_forbidden_chars" != x; then
22687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22691      # Going to short mode and back again did indeed matter. Since short mode is
22692      # case insensitive, let's make it lowercase to improve readability.
22693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22694      # Now convert it back to Unix-stile (cygpath)
22695      input_path=`$CYGPATH -u "$shortmode_path"`
22696      new_path="$input_path"
22697    fi
22698  fi
22699
22700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22701  if test "x$test_cygdrive_prefix" = x; then
22702    # As a simple fix, exclude /usr/bin since it's not a real path.
22703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22705      # a path prefixed by /cygdrive for fixpath to work.
22706      new_path="$CYGWIN_ROOT_PATH$input_path"
22707    fi
22708  fi
22709
22710
22711  if test "x$path" != "x$new_path"; then
22712    BOOT_JDK="$new_path"
22713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22715  fi
22716
22717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22718
22719  path="$BOOT_JDK"
22720  has_colon=`$ECHO $path | $GREP ^.:`
22721  new_path="$path"
22722  if test "x$has_colon" = x; then
22723    # Not in mixed or Windows style, start by that.
22724    new_path=`cmd //c echo $path`
22725  fi
22726
22727
22728  input_path="$new_path"
22729  # Check if we need to convert this using DOS-style short mode. If the path
22730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22731  # take no chances and rewrite it.
22732  # Note: m4 eats our [], so we need to use [ and ] instead.
22733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22734  if test "x$has_forbidden_chars" != x; then
22735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22737  fi
22738
22739
22740  windows_path="$new_path"
22741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22742    unix_path=`$CYGPATH -u "$windows_path"`
22743    new_path="$unix_path"
22744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22746    new_path="$unix_path"
22747  fi
22748
22749  if test "x$path" != "x$new_path"; then
22750    BOOT_JDK="$new_path"
22751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22753  fi
22754
22755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22757
22758  else
22759    # We're on a posix platform. Hooray! :)
22760    path="$BOOT_JDK"
22761    has_space=`$ECHO "$path" | $GREP " "`
22762    if test "x$has_space" != x; then
22763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22765      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22766    fi
22767
22768    # Use eval to expand a potential ~
22769    eval path="$path"
22770    if test ! -f "$path" && test ! -d "$path"; then
22771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22772    fi
22773
22774    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22775  fi
22776
22777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22778$as_echo_n "checking for Boot JDK... " >&6; }
22779              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22780$as_echo "$BOOT_JDK" >&6; }
22781              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22782$as_echo_n "checking Boot JDK version... " >&6; }
22783              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22785$as_echo "$BOOT_JDK_VERSION" >&6; }
22786            fi # end check jdk version
22787          fi # end check rt.jar
22788        fi # end check javac
22789      fi # end check java
22790    fi # end check boot jdk found
22791  fi
22792
22793
22794  if test "x$BOOT_JDK_FOUND" = xno; then
22795    # Now execute the test
22796
22797  if test "x$ProgramFiles" != x; then
22798    VIRTUAL_DIR="$ProgramFiles/Java"
22799
22800  windows_path="$VIRTUAL_DIR"
22801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22802    unix_path=`$CYGPATH -u "$windows_path"`
22803    VIRTUAL_DIR="$unix_path"
22804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22806    VIRTUAL_DIR="$unix_path"
22807  fi
22808
22809
22810  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22811  BOOT_JDK_SUFFIX=""
22812  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22813  if test "x$ALL_JDKS_FOUND" != x; then
22814    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22815
22816  if test "x$BOOT_JDK_FOUND" = xno; then
22817    # Now execute the test
22818
22819        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22820        if test -d "$BOOT_JDK"; then
22821          BOOT_JDK_FOUND=maybe
22822          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22823$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22824        fi
22825
22826
22827    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22828    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22829      # Do we have a bin/java?
22830      if test ! -x "$BOOT_JDK/bin/java"; then
22831        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22833        BOOT_JDK_FOUND=no
22834      else
22835        # Do we have a bin/javac?
22836        if test ! -x "$BOOT_JDK/bin/javac"; then
22837          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22839          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22840$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22841          BOOT_JDK_FOUND=no
22842        else
22843          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22844          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22845            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22847            BOOT_JDK_FOUND=no
22848          else
22849            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22851
22852            # Extra M4 quote needed to protect [] in grep expression.
22853            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22854            if test "x$FOUND_CORRECT_VERSION" = x; then
22855              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22857              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22858$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22859              BOOT_JDK_FOUND=no
22860            else
22861              # We're done! :-)
22862              BOOT_JDK_FOUND=yes
22863
22864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22865
22866  # Input might be given as Windows format, start by converting to
22867  # unix format.
22868  path="$BOOT_JDK"
22869  new_path=`$CYGPATH -u "$path"`
22870
22871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22874  # "foo.exe" is OK but "foo" is an error.
22875  #
22876  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22877  # It is also a way to make sure we got the proper file name for the real test later on.
22878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22879  if test "x$test_shortpath" = x; then
22880    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22882    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22883  fi
22884
22885  # Call helper function which possibly converts this using DOS-style short mode.
22886  # If so, the updated path is stored in $new_path.
22887
22888  input_path="$new_path"
22889  # Check if we need to convert this using DOS-style short mode. If the path
22890  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22891  # take no chances and rewrite it.
22892  # Note: m4 eats our [], so we need to use [ and ] instead.
22893  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22894  if test "x$has_forbidden_chars" != x; then
22895    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22896    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22897    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22898    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22899      # Going to short mode and back again did indeed matter. Since short mode is
22900      # case insensitive, let's make it lowercase to improve readability.
22901      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22902      # Now convert it back to Unix-stile (cygpath)
22903      input_path=`$CYGPATH -u "$shortmode_path"`
22904      new_path="$input_path"
22905    fi
22906  fi
22907
22908  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22909  if test "x$test_cygdrive_prefix" = x; then
22910    # As a simple fix, exclude /usr/bin since it's not a real path.
22911    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22912      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22913      # a path prefixed by /cygdrive for fixpath to work.
22914      new_path="$CYGWIN_ROOT_PATH$input_path"
22915    fi
22916  fi
22917
22918
22919  if test "x$path" != "x$new_path"; then
22920    BOOT_JDK="$new_path"
22921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22923  fi
22924
22925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22926
22927  path="$BOOT_JDK"
22928  has_colon=`$ECHO $path | $GREP ^.:`
22929  new_path="$path"
22930  if test "x$has_colon" = x; then
22931    # Not in mixed or Windows style, start by that.
22932    new_path=`cmd //c echo $path`
22933  fi
22934
22935
22936  input_path="$new_path"
22937  # Check if we need to convert this using DOS-style short mode. If the path
22938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22939  # take no chances and rewrite it.
22940  # Note: m4 eats our [], so we need to use [ and ] instead.
22941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22942  if test "x$has_forbidden_chars" != x; then
22943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22944    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22945  fi
22946
22947
22948  windows_path="$new_path"
22949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22950    unix_path=`$CYGPATH -u "$windows_path"`
22951    new_path="$unix_path"
22952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22954    new_path="$unix_path"
22955  fi
22956
22957  if test "x$path" != "x$new_path"; then
22958    BOOT_JDK="$new_path"
22959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22960$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22961  fi
22962
22963  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22964  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22965
22966  else
22967    # We're on a posix platform. Hooray! :)
22968    path="$BOOT_JDK"
22969    has_space=`$ECHO "$path" | $GREP " "`
22970    if test "x$has_space" != x; then
22971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22973      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22974    fi
22975
22976    # Use eval to expand a potential ~
22977    eval path="$path"
22978    if test ! -f "$path" && test ! -d "$path"; then
22979      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22980    fi
22981
22982    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22983  fi
22984
22985              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22986$as_echo_n "checking for Boot JDK... " >&6; }
22987              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22988$as_echo "$BOOT_JDK" >&6; }
22989              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22990$as_echo_n "checking Boot JDK version... " >&6; }
22991              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22992              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22993$as_echo "$BOOT_JDK_VERSION" >&6; }
22994            fi # end check jdk version
22995          fi # end check rt.jar
22996        fi # end check javac
22997      fi # end check java
22998    fi # end check boot jdk found
22999  fi
23000
23001    done
23002  fi
23003
23004  fi
23005
23006
23007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23009      # Do we have a bin/java?
23010      if test ! -x "$BOOT_JDK/bin/java"; then
23011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23013        BOOT_JDK_FOUND=no
23014      else
23015        # Do we have a bin/javac?
23016        if test ! -x "$BOOT_JDK/bin/javac"; then
23017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23021          BOOT_JDK_FOUND=no
23022        else
23023          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23024          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23027            BOOT_JDK_FOUND=no
23028          else
23029            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23031
23032            # Extra M4 quote needed to protect [] in grep expression.
23033            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23034            if test "x$FOUND_CORRECT_VERSION" = x; then
23035              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23037              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23038$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23039              BOOT_JDK_FOUND=no
23040            else
23041              # We're done! :-)
23042              BOOT_JDK_FOUND=yes
23043
23044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23045
23046  # Input might be given as Windows format, start by converting to
23047  # unix format.
23048  path="$BOOT_JDK"
23049  new_path=`$CYGPATH -u "$path"`
23050
23051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23054  # "foo.exe" is OK but "foo" is an error.
23055  #
23056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23057  # It is also a way to make sure we got the proper file name for the real test later on.
23058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23059  if test "x$test_shortpath" = x; then
23060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23061$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23062    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23063  fi
23064
23065  # Call helper function which possibly converts this using DOS-style short mode.
23066  # If so, the updated path is stored in $new_path.
23067
23068  input_path="$new_path"
23069  # Check if we need to convert this using DOS-style short mode. If the path
23070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23071  # take no chances and rewrite it.
23072  # Note: m4 eats our [], so we need to use [ and ] instead.
23073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23074  if test "x$has_forbidden_chars" != x; then
23075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23079      # Going to short mode and back again did indeed matter. Since short mode is
23080      # case insensitive, let's make it lowercase to improve readability.
23081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23082      # Now convert it back to Unix-stile (cygpath)
23083      input_path=`$CYGPATH -u "$shortmode_path"`
23084      new_path="$input_path"
23085    fi
23086  fi
23087
23088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23089  if test "x$test_cygdrive_prefix" = x; then
23090    # As a simple fix, exclude /usr/bin since it's not a real path.
23091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23093      # a path prefixed by /cygdrive for fixpath to work.
23094      new_path="$CYGWIN_ROOT_PATH$input_path"
23095    fi
23096  fi
23097
23098
23099  if test "x$path" != "x$new_path"; then
23100    BOOT_JDK="$new_path"
23101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23103  fi
23104
23105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23106
23107  path="$BOOT_JDK"
23108  has_colon=`$ECHO $path | $GREP ^.:`
23109  new_path="$path"
23110  if test "x$has_colon" = x; then
23111    # Not in mixed or Windows style, start by that.
23112    new_path=`cmd //c echo $path`
23113  fi
23114
23115
23116  input_path="$new_path"
23117  # Check if we need to convert this using DOS-style short mode. If the path
23118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23119  # take no chances and rewrite it.
23120  # Note: m4 eats our [], so we need to use [ and ] instead.
23121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23122  if test "x$has_forbidden_chars" != x; then
23123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23125  fi
23126
23127
23128  windows_path="$new_path"
23129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23130    unix_path=`$CYGPATH -u "$windows_path"`
23131    new_path="$unix_path"
23132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23134    new_path="$unix_path"
23135  fi
23136
23137  if test "x$path" != "x$new_path"; then
23138    BOOT_JDK="$new_path"
23139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23141  fi
23142
23143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23145
23146  else
23147    # We're on a posix platform. Hooray! :)
23148    path="$BOOT_JDK"
23149    has_space=`$ECHO "$path" | $GREP " "`
23150    if test "x$has_space" != x; then
23151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23152$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23153      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23154    fi
23155
23156    # Use eval to expand a potential ~
23157    eval path="$path"
23158    if test ! -f "$path" && test ! -d "$path"; then
23159      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23160    fi
23161
23162    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23163  fi
23164
23165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23166$as_echo_n "checking for Boot JDK... " >&6; }
23167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23168$as_echo "$BOOT_JDK" >&6; }
23169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23170$as_echo_n "checking Boot JDK version... " >&6; }
23171              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23173$as_echo "$BOOT_JDK_VERSION" >&6; }
23174            fi # end check jdk version
23175          fi # end check rt.jar
23176        fi # end check javac
23177      fi # end check java
23178    fi # end check boot jdk found
23179  fi
23180
23181
23182  if test "x$BOOT_JDK_FOUND" = xno; then
23183    # Now execute the test
23184
23185  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23186  BOOT_JDK_SUFFIX=""
23187  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23188  if test "x$ALL_JDKS_FOUND" != x; then
23189    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23190
23191  if test "x$BOOT_JDK_FOUND" = xno; then
23192    # Now execute the test
23193
23194        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23195        if test -d "$BOOT_JDK"; then
23196          BOOT_JDK_FOUND=maybe
23197          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23198$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23199        fi
23200
23201
23202    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23203    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23204      # Do we have a bin/java?
23205      if test ! -x "$BOOT_JDK/bin/java"; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23208        BOOT_JDK_FOUND=no
23209      else
23210        # Do we have a bin/javac?
23211        if test ! -x "$BOOT_JDK/bin/javac"; then
23212          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23214          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23215$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23216          BOOT_JDK_FOUND=no
23217        else
23218          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23219          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23220            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23222            BOOT_JDK_FOUND=no
23223          else
23224            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23226
23227            # Extra M4 quote needed to protect [] in grep expression.
23228            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23229            if test "x$FOUND_CORRECT_VERSION" = x; then
23230              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23232              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23233$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23234              BOOT_JDK_FOUND=no
23235            else
23236              # We're done! :-)
23237              BOOT_JDK_FOUND=yes
23238
23239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23240
23241  # Input might be given as Windows format, start by converting to
23242  # unix format.
23243  path="$BOOT_JDK"
23244  new_path=`$CYGPATH -u "$path"`
23245
23246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23249  # "foo.exe" is OK but "foo" is an error.
23250  #
23251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23252  # It is also a way to make sure we got the proper file name for the real test later on.
23253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23254  if test "x$test_shortpath" = x; then
23255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23257    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23258  fi
23259
23260  # Call helper function which possibly converts this using DOS-style short mode.
23261  # If so, the updated path is stored in $new_path.
23262
23263  input_path="$new_path"
23264  # Check if we need to convert this using DOS-style short mode. If the path
23265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23266  # take no chances and rewrite it.
23267  # Note: m4 eats our [], so we need to use [ and ] instead.
23268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23269  if test "x$has_forbidden_chars" != x; then
23270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23274      # Going to short mode and back again did indeed matter. Since short mode is
23275      # case insensitive, let's make it lowercase to improve readability.
23276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23277      # Now convert it back to Unix-stile (cygpath)
23278      input_path=`$CYGPATH -u "$shortmode_path"`
23279      new_path="$input_path"
23280    fi
23281  fi
23282
23283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23284  if test "x$test_cygdrive_prefix" = x; then
23285    # As a simple fix, exclude /usr/bin since it's not a real path.
23286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23288      # a path prefixed by /cygdrive for fixpath to work.
23289      new_path="$CYGWIN_ROOT_PATH$input_path"
23290    fi
23291  fi
23292
23293
23294  if test "x$path" != "x$new_path"; then
23295    BOOT_JDK="$new_path"
23296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23298  fi
23299
23300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23301
23302  path="$BOOT_JDK"
23303  has_colon=`$ECHO $path | $GREP ^.:`
23304  new_path="$path"
23305  if test "x$has_colon" = x; then
23306    # Not in mixed or Windows style, start by that.
23307    new_path=`cmd //c echo $path`
23308  fi
23309
23310
23311  input_path="$new_path"
23312  # Check if we need to convert this using DOS-style short mode. If the path
23313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23314  # take no chances and rewrite it.
23315  # Note: m4 eats our [], so we need to use [ and ] instead.
23316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23317  if test "x$has_forbidden_chars" != x; then
23318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23320  fi
23321
23322
23323  windows_path="$new_path"
23324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23325    unix_path=`$CYGPATH -u "$windows_path"`
23326    new_path="$unix_path"
23327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23329    new_path="$unix_path"
23330  fi
23331
23332  if test "x$path" != "x$new_path"; then
23333    BOOT_JDK="$new_path"
23334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23336  fi
23337
23338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23340
23341  else
23342    # We're on a posix platform. Hooray! :)
23343    path="$BOOT_JDK"
23344    has_space=`$ECHO "$path" | $GREP " "`
23345    if test "x$has_space" != x; then
23346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23349    fi
23350
23351    # Use eval to expand a potential ~
23352    eval path="$path"
23353    if test ! -f "$path" && test ! -d "$path"; then
23354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23355    fi
23356
23357    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23358  fi
23359
23360              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23361$as_echo_n "checking for Boot JDK... " >&6; }
23362              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23363$as_echo "$BOOT_JDK" >&6; }
23364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23365$as_echo_n "checking Boot JDK version... " >&6; }
23366              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23368$as_echo "$BOOT_JDK_VERSION" >&6; }
23369            fi # end check jdk version
23370          fi # end check rt.jar
23371        fi # end check javac
23372      fi # end check java
23373    fi # end check boot jdk found
23374  fi
23375
23376    done
23377  fi
23378
23379
23380    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23381    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23382      # Do we have a bin/java?
23383      if test ! -x "$BOOT_JDK/bin/java"; then
23384        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23385$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23386        BOOT_JDK_FOUND=no
23387      else
23388        # Do we have a bin/javac?
23389        if test ! -x "$BOOT_JDK/bin/javac"; then
23390          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23392          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23393$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23394          BOOT_JDK_FOUND=no
23395        else
23396          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23397          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23400            BOOT_JDK_FOUND=no
23401          else
23402            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23403            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23404
23405            # Extra M4 quote needed to protect [] in grep expression.
23406            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23407            if test "x$FOUND_CORRECT_VERSION" = x; then
23408              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23410              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23411$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23412              BOOT_JDK_FOUND=no
23413            else
23414              # We're done! :-)
23415              BOOT_JDK_FOUND=yes
23416
23417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23418
23419  # Input might be given as Windows format, start by converting to
23420  # unix format.
23421  path="$BOOT_JDK"
23422  new_path=`$CYGPATH -u "$path"`
23423
23424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23427  # "foo.exe" is OK but "foo" is an error.
23428  #
23429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23430  # It is also a way to make sure we got the proper file name for the real test later on.
23431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23432  if test "x$test_shortpath" = x; then
23433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23434$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23435    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23436  fi
23437
23438  # Call helper function which possibly converts this using DOS-style short mode.
23439  # If so, the updated path is stored in $new_path.
23440
23441  input_path="$new_path"
23442  # Check if we need to convert this using DOS-style short mode. If the path
23443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23444  # take no chances and rewrite it.
23445  # Note: m4 eats our [], so we need to use [ and ] instead.
23446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23447  if test "x$has_forbidden_chars" != x; then
23448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23452      # Going to short mode and back again did indeed matter. Since short mode is
23453      # case insensitive, let's make it lowercase to improve readability.
23454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23455      # Now convert it back to Unix-stile (cygpath)
23456      input_path=`$CYGPATH -u "$shortmode_path"`
23457      new_path="$input_path"
23458    fi
23459  fi
23460
23461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23462  if test "x$test_cygdrive_prefix" = x; then
23463    # As a simple fix, exclude /usr/bin since it's not a real path.
23464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23466      # a path prefixed by /cygdrive for fixpath to work.
23467      new_path="$CYGWIN_ROOT_PATH$input_path"
23468    fi
23469  fi
23470
23471
23472  if test "x$path" != "x$new_path"; then
23473    BOOT_JDK="$new_path"
23474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23476  fi
23477
23478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23479
23480  path="$BOOT_JDK"
23481  has_colon=`$ECHO $path | $GREP ^.:`
23482  new_path="$path"
23483  if test "x$has_colon" = x; then
23484    # Not in mixed or Windows style, start by that.
23485    new_path=`cmd //c echo $path`
23486  fi
23487
23488
23489  input_path="$new_path"
23490  # Check if we need to convert this using DOS-style short mode. If the path
23491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23492  # take no chances and rewrite it.
23493  # Note: m4 eats our [], so we need to use [ and ] instead.
23494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23495  if test "x$has_forbidden_chars" != x; then
23496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23498  fi
23499
23500
23501  windows_path="$new_path"
23502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23503    unix_path=`$CYGPATH -u "$windows_path"`
23504    new_path="$unix_path"
23505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23507    new_path="$unix_path"
23508  fi
23509
23510  if test "x$path" != "x$new_path"; then
23511    BOOT_JDK="$new_path"
23512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23514  fi
23515
23516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23518
23519  else
23520    # We're on a posix platform. Hooray! :)
23521    path="$BOOT_JDK"
23522    has_space=`$ECHO "$path" | $GREP " "`
23523    if test "x$has_space" != x; then
23524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23525$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23526      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23527    fi
23528
23529    # Use eval to expand a potential ~
23530    eval path="$path"
23531    if test ! -f "$path" && test ! -d "$path"; then
23532      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23533    fi
23534
23535    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23536  fi
23537
23538              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23539$as_echo_n "checking for Boot JDK... " >&6; }
23540              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23541$as_echo "$BOOT_JDK" >&6; }
23542              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23543$as_echo_n "checking Boot JDK version... " >&6; }
23544              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23545              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23546$as_echo "$BOOT_JDK_VERSION" >&6; }
23547            fi # end check jdk version
23548          fi # end check rt.jar
23549        fi # end check javac
23550      fi # end check java
23551    fi # end check boot jdk found
23552  fi
23553
23554  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23555
23556  if test "x$BOOT_JDK_FOUND" = xno; then
23557    # Now execute the test
23558
23559  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23560  BOOT_JDK_SUFFIX="/Contents/Home"
23561  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23562  if test "x$ALL_JDKS_FOUND" != x; then
23563    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23564
23565  if test "x$BOOT_JDK_FOUND" = xno; then
23566    # Now execute the test
23567
23568        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23569        if test -d "$BOOT_JDK"; then
23570          BOOT_JDK_FOUND=maybe
23571          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23572$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23573        fi
23574
23575
23576    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23577    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23578      # Do we have a bin/java?
23579      if test ! -x "$BOOT_JDK/bin/java"; then
23580        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23582        BOOT_JDK_FOUND=no
23583      else
23584        # Do we have a bin/javac?
23585        if test ! -x "$BOOT_JDK/bin/javac"; then
23586          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23588          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23589$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23590          BOOT_JDK_FOUND=no
23591        else
23592          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23593          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23596            BOOT_JDK_FOUND=no
23597          else
23598            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23599            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23600
23601            # Extra M4 quote needed to protect [] in grep expression.
23602            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23603            if test "x$FOUND_CORRECT_VERSION" = x; then
23604              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23606              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23607$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23608              BOOT_JDK_FOUND=no
23609            else
23610              # We're done! :-)
23611              BOOT_JDK_FOUND=yes
23612
23613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23614
23615  # Input might be given as Windows format, start by converting to
23616  # unix format.
23617  path="$BOOT_JDK"
23618  new_path=`$CYGPATH -u "$path"`
23619
23620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23623  # "foo.exe" is OK but "foo" is an error.
23624  #
23625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23626  # It is also a way to make sure we got the proper file name for the real test later on.
23627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23628  if test "x$test_shortpath" = x; then
23629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23632  fi
23633
23634  # Call helper function which possibly converts this using DOS-style short mode.
23635  # If so, the updated path is stored in $new_path.
23636
23637  input_path="$new_path"
23638  # Check if we need to convert this using DOS-style short mode. If the path
23639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23640  # take no chances and rewrite it.
23641  # Note: m4 eats our [], so we need to use [ and ] instead.
23642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23643  if test "x$has_forbidden_chars" != x; then
23644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23648      # Going to short mode and back again did indeed matter. Since short mode is
23649      # case insensitive, let's make it lowercase to improve readability.
23650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23651      # Now convert it back to Unix-stile (cygpath)
23652      input_path=`$CYGPATH -u "$shortmode_path"`
23653      new_path="$input_path"
23654    fi
23655  fi
23656
23657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23658  if test "x$test_cygdrive_prefix" = x; then
23659    # As a simple fix, exclude /usr/bin since it's not a real path.
23660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23662      # a path prefixed by /cygdrive for fixpath to work.
23663      new_path="$CYGWIN_ROOT_PATH$input_path"
23664    fi
23665  fi
23666
23667
23668  if test "x$path" != "x$new_path"; then
23669    BOOT_JDK="$new_path"
23670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23672  fi
23673
23674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23675
23676  path="$BOOT_JDK"
23677  has_colon=`$ECHO $path | $GREP ^.:`
23678  new_path="$path"
23679  if test "x$has_colon" = x; then
23680    # Not in mixed or Windows style, start by that.
23681    new_path=`cmd //c echo $path`
23682  fi
23683
23684
23685  input_path="$new_path"
23686  # Check if we need to convert this using DOS-style short mode. If the path
23687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23688  # take no chances and rewrite it.
23689  # Note: m4 eats our [], so we need to use [ and ] instead.
23690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23691  if test "x$has_forbidden_chars" != x; then
23692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23694  fi
23695
23696
23697  windows_path="$new_path"
23698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23699    unix_path=`$CYGPATH -u "$windows_path"`
23700    new_path="$unix_path"
23701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23703    new_path="$unix_path"
23704  fi
23705
23706  if test "x$path" != "x$new_path"; then
23707    BOOT_JDK="$new_path"
23708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23710  fi
23711
23712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23714
23715  else
23716    # We're on a posix platform. Hooray! :)
23717    path="$BOOT_JDK"
23718    has_space=`$ECHO "$path" | $GREP " "`
23719    if test "x$has_space" != x; then
23720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23722      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23723    fi
23724
23725    # Use eval to expand a potential ~
23726    eval path="$path"
23727    if test ! -f "$path" && test ! -d "$path"; then
23728      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23729    fi
23730
23731    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23732  fi
23733
23734              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23735$as_echo_n "checking for Boot JDK... " >&6; }
23736              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23737$as_echo "$BOOT_JDK" >&6; }
23738              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23739$as_echo_n "checking Boot JDK version... " >&6; }
23740              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23742$as_echo "$BOOT_JDK_VERSION" >&6; }
23743            fi # end check jdk version
23744          fi # end check rt.jar
23745        fi # end check javac
23746      fi # end check java
23747    fi # end check boot jdk found
23748  fi
23749
23750    done
23751  fi
23752
23753
23754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23756      # Do we have a bin/java?
23757      if test ! -x "$BOOT_JDK/bin/java"; then
23758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23760        BOOT_JDK_FOUND=no
23761      else
23762        # Do we have a bin/javac?
23763        if test ! -x "$BOOT_JDK/bin/javac"; then
23764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23768          BOOT_JDK_FOUND=no
23769        else
23770          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23771          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23774            BOOT_JDK_FOUND=no
23775          else
23776            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23777            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23778
23779            # Extra M4 quote needed to protect [] in grep expression.
23780            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23781            if test "x$FOUND_CORRECT_VERSION" = x; then
23782              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23784              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23785$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23786              BOOT_JDK_FOUND=no
23787            else
23788              # We're done! :-)
23789              BOOT_JDK_FOUND=yes
23790
23791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23792
23793  # Input might be given as Windows format, start by converting to
23794  # unix format.
23795  path="$BOOT_JDK"
23796  new_path=`$CYGPATH -u "$path"`
23797
23798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23801  # "foo.exe" is OK but "foo" is an error.
23802  #
23803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23804  # It is also a way to make sure we got the proper file name for the real test later on.
23805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23806  if test "x$test_shortpath" = x; then
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23809    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23810  fi
23811
23812  # Call helper function which possibly converts this using DOS-style short mode.
23813  # If so, the updated path is stored in $new_path.
23814
23815  input_path="$new_path"
23816  # Check if we need to convert this using DOS-style short mode. If the path
23817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23818  # take no chances and rewrite it.
23819  # Note: m4 eats our [], so we need to use [ and ] instead.
23820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23821  if test "x$has_forbidden_chars" != x; then
23822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23826      # Going to short mode and back again did indeed matter. Since short mode is
23827      # case insensitive, let's make it lowercase to improve readability.
23828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23829      # Now convert it back to Unix-stile (cygpath)
23830      input_path=`$CYGPATH -u "$shortmode_path"`
23831      new_path="$input_path"
23832    fi
23833  fi
23834
23835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23836  if test "x$test_cygdrive_prefix" = x; then
23837    # As a simple fix, exclude /usr/bin since it's not a real path.
23838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23840      # a path prefixed by /cygdrive for fixpath to work.
23841      new_path="$CYGWIN_ROOT_PATH$input_path"
23842    fi
23843  fi
23844
23845
23846  if test "x$path" != "x$new_path"; then
23847    BOOT_JDK="$new_path"
23848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23850  fi
23851
23852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23853
23854  path="$BOOT_JDK"
23855  has_colon=`$ECHO $path | $GREP ^.:`
23856  new_path="$path"
23857  if test "x$has_colon" = x; then
23858    # Not in mixed or Windows style, start by that.
23859    new_path=`cmd //c echo $path`
23860  fi
23861
23862
23863  input_path="$new_path"
23864  # Check if we need to convert this using DOS-style short mode. If the path
23865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23866  # take no chances and rewrite it.
23867  # Note: m4 eats our [], so we need to use [ and ] instead.
23868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23869  if test "x$has_forbidden_chars" != x; then
23870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23872  fi
23873
23874
23875  windows_path="$new_path"
23876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23877    unix_path=`$CYGPATH -u "$windows_path"`
23878    new_path="$unix_path"
23879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23881    new_path="$unix_path"
23882  fi
23883
23884  if test "x$path" != "x$new_path"; then
23885    BOOT_JDK="$new_path"
23886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23888  fi
23889
23890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23892
23893  else
23894    # We're on a posix platform. Hooray! :)
23895    path="$BOOT_JDK"
23896    has_space=`$ECHO "$path" | $GREP " "`
23897    if test "x$has_space" != x; then
23898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23899$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23900      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23901    fi
23902
23903    # Use eval to expand a potential ~
23904    eval path="$path"
23905    if test ! -f "$path" && test ! -d "$path"; then
23906      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23907    fi
23908
23909    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23910  fi
23911
23912              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23913$as_echo_n "checking for Boot JDK... " >&6; }
23914              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23915$as_echo "$BOOT_JDK" >&6; }
23916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23917$as_echo_n "checking Boot JDK version... " >&6; }
23918              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23919              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23920$as_echo "$BOOT_JDK_VERSION" >&6; }
23921            fi # end check jdk version
23922          fi # end check rt.jar
23923        fi # end check javac
23924      fi # end check java
23925    fi # end check boot jdk found
23926  fi
23927
23928
23929  if test "x$BOOT_JDK_FOUND" = xno; then
23930    # Now execute the test
23931
23932  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23933  BOOT_JDK_SUFFIX="/Contents/Home"
23934  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23935  if test "x$ALL_JDKS_FOUND" != x; then
23936    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23937
23938  if test "x$BOOT_JDK_FOUND" = xno; then
23939    # Now execute the test
23940
23941        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23942        if test -d "$BOOT_JDK"; then
23943          BOOT_JDK_FOUND=maybe
23944          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23945$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23946        fi
23947
23948
23949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23951      # Do we have a bin/java?
23952      if test ! -x "$BOOT_JDK/bin/java"; then
23953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23955        BOOT_JDK_FOUND=no
23956      else
23957        # Do we have a bin/javac?
23958        if test ! -x "$BOOT_JDK/bin/javac"; then
23959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23963          BOOT_JDK_FOUND=no
23964        else
23965          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23966          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23967            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23969            BOOT_JDK_FOUND=no
23970          else
23971            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23972            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23973
23974            # Extra M4 quote needed to protect [] in grep expression.
23975            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23976            if test "x$FOUND_CORRECT_VERSION" = x; then
23977              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23979              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23980$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23981              BOOT_JDK_FOUND=no
23982            else
23983              # We're done! :-)
23984              BOOT_JDK_FOUND=yes
23985
23986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23987
23988  # Input might be given as Windows format, start by converting to
23989  # unix format.
23990  path="$BOOT_JDK"
23991  new_path=`$CYGPATH -u "$path"`
23992
23993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23996  # "foo.exe" is OK but "foo" is an error.
23997  #
23998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23999  # It is also a way to make sure we got the proper file name for the real test later on.
24000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24001  if test "x$test_shortpath" = x; then
24002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24004    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24005  fi
24006
24007  # Call helper function which possibly converts this using DOS-style short mode.
24008  # If so, the updated path is stored in $new_path.
24009
24010  input_path="$new_path"
24011  # Check if we need to convert this using DOS-style short mode. If the path
24012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013  # take no chances and rewrite it.
24014  # Note: m4 eats our [], so we need to use [ and ] instead.
24015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24016  if test "x$has_forbidden_chars" != x; then
24017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24021      # Going to short mode and back again did indeed matter. Since short mode is
24022      # case insensitive, let's make it lowercase to improve readability.
24023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24024      # Now convert it back to Unix-stile (cygpath)
24025      input_path=`$CYGPATH -u "$shortmode_path"`
24026      new_path="$input_path"
24027    fi
24028  fi
24029
24030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24031  if test "x$test_cygdrive_prefix" = x; then
24032    # As a simple fix, exclude /usr/bin since it's not a real path.
24033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24035      # a path prefixed by /cygdrive for fixpath to work.
24036      new_path="$CYGWIN_ROOT_PATH$input_path"
24037    fi
24038  fi
24039
24040
24041  if test "x$path" != "x$new_path"; then
24042    BOOT_JDK="$new_path"
24043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24044$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24045  fi
24046
24047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24048
24049  path="$BOOT_JDK"
24050  has_colon=`$ECHO $path | $GREP ^.:`
24051  new_path="$path"
24052  if test "x$has_colon" = x; then
24053    # Not in mixed or Windows style, start by that.
24054    new_path=`cmd //c echo $path`
24055  fi
24056
24057
24058  input_path="$new_path"
24059  # Check if we need to convert this using DOS-style short mode. If the path
24060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24061  # take no chances and rewrite it.
24062  # Note: m4 eats our [], so we need to use [ and ] instead.
24063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24064  if test "x$has_forbidden_chars" != x; then
24065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24067  fi
24068
24069
24070  windows_path="$new_path"
24071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24072    unix_path=`$CYGPATH -u "$windows_path"`
24073    new_path="$unix_path"
24074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24076    new_path="$unix_path"
24077  fi
24078
24079  if test "x$path" != "x$new_path"; then
24080    BOOT_JDK="$new_path"
24081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24083  fi
24084
24085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24087
24088  else
24089    # We're on a posix platform. Hooray! :)
24090    path="$BOOT_JDK"
24091    has_space=`$ECHO "$path" | $GREP " "`
24092    if test "x$has_space" != x; then
24093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24096    fi
24097
24098    # Use eval to expand a potential ~
24099    eval path="$path"
24100    if test ! -f "$path" && test ! -d "$path"; then
24101      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24102    fi
24103
24104    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24105  fi
24106
24107              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24108$as_echo_n "checking for Boot JDK... " >&6; }
24109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24110$as_echo "$BOOT_JDK" >&6; }
24111              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24112$as_echo_n "checking Boot JDK version... " >&6; }
24113              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24114              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24115$as_echo "$BOOT_JDK_VERSION" >&6; }
24116            fi # end check jdk version
24117          fi # end check rt.jar
24118        fi # end check javac
24119      fi # end check java
24120    fi # end check boot jdk found
24121  fi
24122
24123    done
24124  fi
24125
24126
24127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24129      # Do we have a bin/java?
24130      if test ! -x "$BOOT_JDK/bin/java"; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24133        BOOT_JDK_FOUND=no
24134      else
24135        # Do we have a bin/javac?
24136        if test ! -x "$BOOT_JDK/bin/javac"; then
24137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24141          BOOT_JDK_FOUND=no
24142        else
24143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24147            BOOT_JDK_FOUND=no
24148          else
24149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24151
24152            # Extra M4 quote needed to protect [] in grep expression.
24153            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24154            if test "x$FOUND_CORRECT_VERSION" = x; then
24155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24158$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24159              BOOT_JDK_FOUND=no
24160            else
24161              # We're done! :-)
24162              BOOT_JDK_FOUND=yes
24163
24164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24165
24166  # Input might be given as Windows format, start by converting to
24167  # unix format.
24168  path="$BOOT_JDK"
24169  new_path=`$CYGPATH -u "$path"`
24170
24171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24174  # "foo.exe" is OK but "foo" is an error.
24175  #
24176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24177  # It is also a way to make sure we got the proper file name for the real test later on.
24178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24179  if test "x$test_shortpath" = x; then
24180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24183  fi
24184
24185  # Call helper function which possibly converts this using DOS-style short mode.
24186  # If so, the updated path is stored in $new_path.
24187
24188  input_path="$new_path"
24189  # Check if we need to convert this using DOS-style short mode. If the path
24190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24191  # take no chances and rewrite it.
24192  # Note: m4 eats our [], so we need to use [ and ] instead.
24193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24194  if test "x$has_forbidden_chars" != x; then
24195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24199      # Going to short mode and back again did indeed matter. Since short mode is
24200      # case insensitive, let's make it lowercase to improve readability.
24201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24202      # Now convert it back to Unix-stile (cygpath)
24203      input_path=`$CYGPATH -u "$shortmode_path"`
24204      new_path="$input_path"
24205    fi
24206  fi
24207
24208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24209  if test "x$test_cygdrive_prefix" = x; then
24210    # As a simple fix, exclude /usr/bin since it's not a real path.
24211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24213      # a path prefixed by /cygdrive for fixpath to work.
24214      new_path="$CYGWIN_ROOT_PATH$input_path"
24215    fi
24216  fi
24217
24218
24219  if test "x$path" != "x$new_path"; then
24220    BOOT_JDK="$new_path"
24221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24223  fi
24224
24225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24226
24227  path="$BOOT_JDK"
24228  has_colon=`$ECHO $path | $GREP ^.:`
24229  new_path="$path"
24230  if test "x$has_colon" = x; then
24231    # Not in mixed or Windows style, start by that.
24232    new_path=`cmd //c echo $path`
24233  fi
24234
24235
24236  input_path="$new_path"
24237  # Check if we need to convert this using DOS-style short mode. If the path
24238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24239  # take no chances and rewrite it.
24240  # Note: m4 eats our [], so we need to use [ and ] instead.
24241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24242  if test "x$has_forbidden_chars" != x; then
24243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24245  fi
24246
24247
24248  windows_path="$new_path"
24249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24250    unix_path=`$CYGPATH -u "$windows_path"`
24251    new_path="$unix_path"
24252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24254    new_path="$unix_path"
24255  fi
24256
24257  if test "x$path" != "x$new_path"; then
24258    BOOT_JDK="$new_path"
24259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24261  fi
24262
24263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24265
24266  else
24267    # We're on a posix platform. Hooray! :)
24268    path="$BOOT_JDK"
24269    has_space=`$ECHO "$path" | $GREP " "`
24270    if test "x$has_space" != x; then
24271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24273      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24274    fi
24275
24276    # Use eval to expand a potential ~
24277    eval path="$path"
24278    if test ! -f "$path" && test ! -d "$path"; then
24279      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24280    fi
24281
24282    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24283  fi
24284
24285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24286$as_echo_n "checking for Boot JDK... " >&6; }
24287              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24288$as_echo "$BOOT_JDK" >&6; }
24289              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24290$as_echo_n "checking Boot JDK version... " >&6; }
24291              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24292              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24293$as_echo "$BOOT_JDK_VERSION" >&6; }
24294            fi # end check jdk version
24295          fi # end check rt.jar
24296        fi # end check javac
24297      fi # end check java
24298    fi # end check boot jdk found
24299  fi
24300
24301  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24302
24303  if test "x$BOOT_JDK_FOUND" = xno; then
24304    # Now execute the test
24305
24306  BOOT_JDK_PREFIX="/usr/lib/jvm"
24307  BOOT_JDK_SUFFIX=""
24308  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24309  if test "x$ALL_JDKS_FOUND" != x; then
24310    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24311
24312  if test "x$BOOT_JDK_FOUND" = xno; then
24313    # Now execute the test
24314
24315        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24316        if test -d "$BOOT_JDK"; then
24317          BOOT_JDK_FOUND=maybe
24318          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24319$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24320        fi
24321
24322
24323    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24324    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24325      # Do we have a bin/java?
24326      if test ! -x "$BOOT_JDK/bin/java"; then
24327        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24329        BOOT_JDK_FOUND=no
24330      else
24331        # Do we have a bin/javac?
24332        if test ! -x "$BOOT_JDK/bin/javac"; then
24333          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24335          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24336$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24337          BOOT_JDK_FOUND=no
24338        else
24339          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24340          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24343            BOOT_JDK_FOUND=no
24344          else
24345            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24347
24348            # Extra M4 quote needed to protect [] in grep expression.
24349            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24350            if test "x$FOUND_CORRECT_VERSION" = x; then
24351              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24353              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24354$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24355              BOOT_JDK_FOUND=no
24356            else
24357              # We're done! :-)
24358              BOOT_JDK_FOUND=yes
24359
24360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24361
24362  # Input might be given as Windows format, start by converting to
24363  # unix format.
24364  path="$BOOT_JDK"
24365  new_path=`$CYGPATH -u "$path"`
24366
24367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24370  # "foo.exe" is OK but "foo" is an error.
24371  #
24372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24373  # It is also a way to make sure we got the proper file name for the real test later on.
24374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24375  if test "x$test_shortpath" = x; then
24376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24379  fi
24380
24381  # Call helper function which possibly converts this using DOS-style short mode.
24382  # If so, the updated path is stored in $new_path.
24383
24384  input_path="$new_path"
24385  # Check if we need to convert this using DOS-style short mode. If the path
24386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24387  # take no chances and rewrite it.
24388  # Note: m4 eats our [], so we need to use [ and ] instead.
24389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24390  if test "x$has_forbidden_chars" != x; then
24391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24395      # Going to short mode and back again did indeed matter. Since short mode is
24396      # case insensitive, let's make it lowercase to improve readability.
24397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24398      # Now convert it back to Unix-stile (cygpath)
24399      input_path=`$CYGPATH -u "$shortmode_path"`
24400      new_path="$input_path"
24401    fi
24402  fi
24403
24404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24405  if test "x$test_cygdrive_prefix" = x; then
24406    # As a simple fix, exclude /usr/bin since it's not a real path.
24407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24409      # a path prefixed by /cygdrive for fixpath to work.
24410      new_path="$CYGWIN_ROOT_PATH$input_path"
24411    fi
24412  fi
24413
24414
24415  if test "x$path" != "x$new_path"; then
24416    BOOT_JDK="$new_path"
24417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24419  fi
24420
24421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24422
24423  path="$BOOT_JDK"
24424  has_colon=`$ECHO $path | $GREP ^.:`
24425  new_path="$path"
24426  if test "x$has_colon" = x; then
24427    # Not in mixed or Windows style, start by that.
24428    new_path=`cmd //c echo $path`
24429  fi
24430
24431
24432  input_path="$new_path"
24433  # Check if we need to convert this using DOS-style short mode. If the path
24434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24435  # take no chances and rewrite it.
24436  # Note: m4 eats our [], so we need to use [ and ] instead.
24437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24438  if test "x$has_forbidden_chars" != x; then
24439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24441  fi
24442
24443
24444  windows_path="$new_path"
24445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24446    unix_path=`$CYGPATH -u "$windows_path"`
24447    new_path="$unix_path"
24448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24450    new_path="$unix_path"
24451  fi
24452
24453  if test "x$path" != "x$new_path"; then
24454    BOOT_JDK="$new_path"
24455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24457  fi
24458
24459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24461
24462  else
24463    # We're on a posix platform. Hooray! :)
24464    path="$BOOT_JDK"
24465    has_space=`$ECHO "$path" | $GREP " "`
24466    if test "x$has_space" != x; then
24467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24469      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24470    fi
24471
24472    # Use eval to expand a potential ~
24473    eval path="$path"
24474    if test ! -f "$path" && test ! -d "$path"; then
24475      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24476    fi
24477
24478    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24479  fi
24480
24481              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24482$as_echo_n "checking for Boot JDK... " >&6; }
24483              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24484$as_echo "$BOOT_JDK" >&6; }
24485              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24486$as_echo_n "checking Boot JDK version... " >&6; }
24487              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24488              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24489$as_echo "$BOOT_JDK_VERSION" >&6; }
24490            fi # end check jdk version
24491          fi # end check rt.jar
24492        fi # end check javac
24493      fi # end check java
24494    fi # end check boot jdk found
24495  fi
24496
24497    done
24498  fi
24499
24500
24501    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24502    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24503      # Do we have a bin/java?
24504      if test ! -x "$BOOT_JDK/bin/java"; then
24505        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24507        BOOT_JDK_FOUND=no
24508      else
24509        # Do we have a bin/javac?
24510        if test ! -x "$BOOT_JDK/bin/javac"; then
24511          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24513          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24514$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24515          BOOT_JDK_FOUND=no
24516        else
24517          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24518          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24519            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24521            BOOT_JDK_FOUND=no
24522          else
24523            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24524            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24525
24526            # Extra M4 quote needed to protect [] in grep expression.
24527            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24528            if test "x$FOUND_CORRECT_VERSION" = x; then
24529              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24531              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24532$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24533              BOOT_JDK_FOUND=no
24534            else
24535              # We're done! :-)
24536              BOOT_JDK_FOUND=yes
24537
24538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24539
24540  # Input might be given as Windows format, start by converting to
24541  # unix format.
24542  path="$BOOT_JDK"
24543  new_path=`$CYGPATH -u "$path"`
24544
24545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24548  # "foo.exe" is OK but "foo" is an error.
24549  #
24550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24551  # It is also a way to make sure we got the proper file name for the real test later on.
24552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24553  if test "x$test_shortpath" = x; then
24554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24556    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24557  fi
24558
24559  # Call helper function which possibly converts this using DOS-style short mode.
24560  # If so, the updated path is stored in $new_path.
24561
24562  input_path="$new_path"
24563  # Check if we need to convert this using DOS-style short mode. If the path
24564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24565  # take no chances and rewrite it.
24566  # Note: m4 eats our [], so we need to use [ and ] instead.
24567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24568  if test "x$has_forbidden_chars" != x; then
24569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24573      # Going to short mode and back again did indeed matter. Since short mode is
24574      # case insensitive, let's make it lowercase to improve readability.
24575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24576      # Now convert it back to Unix-stile (cygpath)
24577      input_path=`$CYGPATH -u "$shortmode_path"`
24578      new_path="$input_path"
24579    fi
24580  fi
24581
24582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24583  if test "x$test_cygdrive_prefix" = x; then
24584    # As a simple fix, exclude /usr/bin since it's not a real path.
24585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24587      # a path prefixed by /cygdrive for fixpath to work.
24588      new_path="$CYGWIN_ROOT_PATH$input_path"
24589    fi
24590  fi
24591
24592
24593  if test "x$path" != "x$new_path"; then
24594    BOOT_JDK="$new_path"
24595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24597  fi
24598
24599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24600
24601  path="$BOOT_JDK"
24602  has_colon=`$ECHO $path | $GREP ^.:`
24603  new_path="$path"
24604  if test "x$has_colon" = x; then
24605    # Not in mixed or Windows style, start by that.
24606    new_path=`cmd //c echo $path`
24607  fi
24608
24609
24610  input_path="$new_path"
24611  # Check if we need to convert this using DOS-style short mode. If the path
24612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24613  # take no chances and rewrite it.
24614  # Note: m4 eats our [], so we need to use [ and ] instead.
24615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24616  if test "x$has_forbidden_chars" != x; then
24617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24619  fi
24620
24621
24622  windows_path="$new_path"
24623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24624    unix_path=`$CYGPATH -u "$windows_path"`
24625    new_path="$unix_path"
24626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24628    new_path="$unix_path"
24629  fi
24630
24631  if test "x$path" != "x$new_path"; then
24632    BOOT_JDK="$new_path"
24633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24634$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24635  fi
24636
24637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24639
24640  else
24641    # We're on a posix platform. Hooray! :)
24642    path="$BOOT_JDK"
24643    has_space=`$ECHO "$path" | $GREP " "`
24644    if test "x$has_space" != x; then
24645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24648    fi
24649
24650    # Use eval to expand a potential ~
24651    eval path="$path"
24652    if test ! -f "$path" && test ! -d "$path"; then
24653      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24654    fi
24655
24656    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24657  fi
24658
24659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24660$as_echo_n "checking for Boot JDK... " >&6; }
24661              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24662$as_echo "$BOOT_JDK" >&6; }
24663              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24664$as_echo_n "checking Boot JDK version... " >&6; }
24665              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24666              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24667$as_echo "$BOOT_JDK_VERSION" >&6; }
24668            fi # end check jdk version
24669          fi # end check rt.jar
24670        fi # end check javac
24671      fi # end check java
24672    fi # end check boot jdk found
24673  fi
24674
24675  fi
24676
24677
24678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24680      # Do we have a bin/java?
24681      if test ! -x "$BOOT_JDK/bin/java"; then
24682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24684        BOOT_JDK_FOUND=no
24685      else
24686        # Do we have a bin/javac?
24687        if test ! -x "$BOOT_JDK/bin/javac"; then
24688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24692          BOOT_JDK_FOUND=no
24693        else
24694          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24695          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24696            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24698            BOOT_JDK_FOUND=no
24699          else
24700            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24701            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24702
24703            # Extra M4 quote needed to protect [] in grep expression.
24704            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24705            if test "x$FOUND_CORRECT_VERSION" = x; then
24706              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24708              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24709$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24710              BOOT_JDK_FOUND=no
24711            else
24712              # We're done! :-)
24713              BOOT_JDK_FOUND=yes
24714
24715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24716
24717  # Input might be given as Windows format, start by converting to
24718  # unix format.
24719  path="$BOOT_JDK"
24720  new_path=`$CYGPATH -u "$path"`
24721
24722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24725  # "foo.exe" is OK but "foo" is an error.
24726  #
24727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24728  # It is also a way to make sure we got the proper file name for the real test later on.
24729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24730  if test "x$test_shortpath" = x; then
24731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24734  fi
24735
24736  # Call helper function which possibly converts this using DOS-style short mode.
24737  # If so, the updated path is stored in $new_path.
24738
24739  input_path="$new_path"
24740  # Check if we need to convert this using DOS-style short mode. If the path
24741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24742  # take no chances and rewrite it.
24743  # Note: m4 eats our [], so we need to use [ and ] instead.
24744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24745  if test "x$has_forbidden_chars" != x; then
24746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24750      # Going to short mode and back again did indeed matter. Since short mode is
24751      # case insensitive, let's make it lowercase to improve readability.
24752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24753      # Now convert it back to Unix-stile (cygpath)
24754      input_path=`$CYGPATH -u "$shortmode_path"`
24755      new_path="$input_path"
24756    fi
24757  fi
24758
24759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24760  if test "x$test_cygdrive_prefix" = x; then
24761    # As a simple fix, exclude /usr/bin since it's not a real path.
24762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24764      # a path prefixed by /cygdrive for fixpath to work.
24765      new_path="$CYGWIN_ROOT_PATH$input_path"
24766    fi
24767  fi
24768
24769
24770  if test "x$path" != "x$new_path"; then
24771    BOOT_JDK="$new_path"
24772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24774  fi
24775
24776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24777
24778  path="$BOOT_JDK"
24779  has_colon=`$ECHO $path | $GREP ^.:`
24780  new_path="$path"
24781  if test "x$has_colon" = x; then
24782    # Not in mixed or Windows style, start by that.
24783    new_path=`cmd //c echo $path`
24784  fi
24785
24786
24787  input_path="$new_path"
24788  # Check if we need to convert this using DOS-style short mode. If the path
24789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24790  # take no chances and rewrite it.
24791  # Note: m4 eats our [], so we need to use [ and ] instead.
24792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24793  if test "x$has_forbidden_chars" != x; then
24794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24796  fi
24797
24798
24799  windows_path="$new_path"
24800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24801    unix_path=`$CYGPATH -u "$windows_path"`
24802    new_path="$unix_path"
24803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24805    new_path="$unix_path"
24806  fi
24807
24808  if test "x$path" != "x$new_path"; then
24809    BOOT_JDK="$new_path"
24810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24812  fi
24813
24814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24816
24817  else
24818    # We're on a posix platform. Hooray! :)
24819    path="$BOOT_JDK"
24820    has_space=`$ECHO "$path" | $GREP " "`
24821    if test "x$has_space" != x; then
24822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24824      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24825    fi
24826
24827    # Use eval to expand a potential ~
24828    eval path="$path"
24829    if test ! -f "$path" && test ! -d "$path"; then
24830      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24831    fi
24832
24833    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24834  fi
24835
24836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24837$as_echo_n "checking for Boot JDK... " >&6; }
24838              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24839$as_echo "$BOOT_JDK" >&6; }
24840              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24841$as_echo_n "checking Boot JDK version... " >&6; }
24842              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24843              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24844$as_echo "$BOOT_JDK_VERSION" >&6; }
24845            fi # end check jdk version
24846          fi # end check rt.jar
24847        fi # end check javac
24848      fi # end check java
24849    fi # end check boot jdk found
24850  fi
24851
24852
24853  # If we haven't found anything yet, we've truly lost. Give up.
24854  if test "x$BOOT_JDK_FOUND" = xno; then
24855
24856  # Print a helpful message on how to acquire the necessary build dependency.
24857  # openjdk is the help tag: freetype, cups, pulse, alsa etc
24858  MISSING_DEPENDENCY=openjdk
24859
24860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24861    cygwin_help $MISSING_DEPENDENCY
24862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24863    msys_help $MISSING_DEPENDENCY
24864  else
24865    PKGHANDLER_COMMAND=
24866
24867    case $PKGHANDLER in
24868      apt-get)
24869        apt_help     $MISSING_DEPENDENCY ;;
24870      yum)
24871        yum_help     $MISSING_DEPENDENCY ;;
24872      port)
24873        port_help    $MISSING_DEPENDENCY ;;
24874      pkgutil)
24875        pkgutil_help $MISSING_DEPENDENCY ;;
24876      pkgadd)
24877        pkgadd_help  $MISSING_DEPENDENCY ;;
24878    esac
24879
24880    if test "x$PKGHANDLER_COMMAND" != x; then
24881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24882    fi
24883  fi
24884
24885    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24886$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24887    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24888$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24889    as_fn_error $? "Cannot continue" "$LINENO" 5
24890  fi
24891
24892  # Setup proper paths for what we found
24893  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24894  if test ! -f "$BOOT_RTJAR"; then
24895    # On MacOSX it is called classes.jar
24896    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24897    if test -f "$BOOT_RTJAR"; then
24898      # Remove the ..
24899      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24900    fi
24901  fi
24902  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24903  BOOT_JDK="$BOOT_JDK"
24904
24905
24906
24907
24908  # Setup tools from the Boot JDK.
24909
24910  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
24911
24912  # Publish this variable in the help.
24913
24914
24915  if test "x$JAVA" = x; then
24916    # The variable is not set by user, try to locate tool using the code snippet
24917
24918      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24919$as_echo_n "checking for java in Boot JDK... " >&6; }
24920      JAVA=$BOOT_JDK/bin/java
24921      if test ! -x $JAVA; then
24922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24923$as_echo "not found" >&6; }
24924        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24925$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24926        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24927      fi
24928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24929$as_echo "ok" >&6; }
24930
24931
24932  else
24933    # The variable is set, but is it from the command line or the environment?
24934
24935    # Try to remove the string !JAVA! from our list.
24936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
24937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24938      # If it failed, the variable was not from the command line. Ignore it,
24939      # but warn the user (except for BASH, which is always set by the calling BASH).
24940      if test "xJAVA" != xBASH; then
24941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
24942$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
24943      fi
24944      # Try to locate tool using the code snippet
24945
24946      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24947$as_echo_n "checking for java in Boot JDK... " >&6; }
24948      JAVA=$BOOT_JDK/bin/java
24949      if test ! -x $JAVA; then
24950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24951$as_echo "not found" >&6; }
24952        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24953$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24954        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24955      fi
24956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24957$as_echo "ok" >&6; }
24958
24959
24960    else
24961      # If it succeeded, then it was overridden by the user. We will use it
24962      # for the tool.
24963
24964      # First remove it from the list of overridden variables, so we can test
24965      # for unknown variables in the end.
24966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24967
24968      # Check if the provided tool contains a complete path.
24969      tool_specified="$JAVA"
24970      tool_basename="${tool_specified##*/}"
24971      if test "x$tool_basename" = "x$tool_specified"; then
24972        # A command without a complete path is provided, search $PATH.
24973        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
24974$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
24975        # Extract the first word of "$tool_basename", so it can be a program name with args.
24976set dummy $tool_basename; ac_word=$2
24977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24978$as_echo_n "checking for $ac_word... " >&6; }
24979if ${ac_cv_path_JAVA+:} false; then :
24980  $as_echo_n "(cached) " >&6
24981else
24982  case $JAVA in
24983  [\\/]* | ?:[\\/]*)
24984  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
24985  ;;
24986  *)
24987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24988for as_dir in $PATH
24989do
24990  IFS=$as_save_IFS
24991  test -z "$as_dir" && as_dir=.
24992    for ac_exec_ext in '' $ac_executable_extensions; do
24993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24994    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
24995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24996    break 2
24997  fi
24998done
24999  done
25000IFS=$as_save_IFS
25001
25002  ;;
25003esac
25004fi
25005JAVA=$ac_cv_path_JAVA
25006if test -n "$JAVA"; then
25007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25008$as_echo "$JAVA" >&6; }
25009else
25010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25011$as_echo "no" >&6; }
25012fi
25013
25014
25015        if test "x$JAVA" = x; then
25016          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25017        fi
25018      else
25019        # Otherwise we believe it is a complete path. Use it as it is.
25020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25021$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25023$as_echo_n "checking for JAVA... " >&6; }
25024        if test ! -x "$tool_specified"; then
25025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25026$as_echo "not found" >&6; }
25027          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25028        fi
25029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25030$as_echo "$tool_specified" >&6; }
25031      fi
25032    fi
25033  fi
25034
25035
25036
25037  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25038
25039  # Publish this variable in the help.
25040
25041
25042  if test "x$JAVAC" = x; then
25043    # The variable is not set by user, try to locate tool using the code snippet
25044
25045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25046$as_echo_n "checking for javac in Boot JDK... " >&6; }
25047      JAVAC=$BOOT_JDK/bin/javac
25048      if test ! -x $JAVAC; then
25049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25050$as_echo "not found" >&6; }
25051        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25052$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25053        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25054      fi
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25056$as_echo "ok" >&6; }
25057
25058
25059  else
25060    # The variable is set, but is it from the command line or the environment?
25061
25062    # Try to remove the string !JAVAC! from our list.
25063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25065      # If it failed, the variable was not from the command line. Ignore it,
25066      # but warn the user (except for BASH, which is always set by the calling BASH).
25067      if test "xJAVAC" != xBASH; then
25068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25069$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25070      fi
25071      # Try to locate tool using the code snippet
25072
25073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25074$as_echo_n "checking for javac in Boot JDK... " >&6; }
25075      JAVAC=$BOOT_JDK/bin/javac
25076      if test ! -x $JAVAC; then
25077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25078$as_echo "not found" >&6; }
25079        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25080$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25081        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25082      fi
25083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25084$as_echo "ok" >&6; }
25085
25086
25087    else
25088      # If it succeeded, then it was overridden by the user. We will use it
25089      # for the tool.
25090
25091      # First remove it from the list of overridden variables, so we can test
25092      # for unknown variables in the end.
25093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25094
25095      # Check if the provided tool contains a complete path.
25096      tool_specified="$JAVAC"
25097      tool_basename="${tool_specified##*/}"
25098      if test "x$tool_basename" = "x$tool_specified"; then
25099        # A command without a complete path is provided, search $PATH.
25100        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25101$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25102        # Extract the first word of "$tool_basename", so it can be a program name with args.
25103set dummy $tool_basename; ac_word=$2
25104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25105$as_echo_n "checking for $ac_word... " >&6; }
25106if ${ac_cv_path_JAVAC+:} false; then :
25107  $as_echo_n "(cached) " >&6
25108else
25109  case $JAVAC in
25110  [\\/]* | ?:[\\/]*)
25111  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25112  ;;
25113  *)
25114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25115for as_dir in $PATH
25116do
25117  IFS=$as_save_IFS
25118  test -z "$as_dir" && as_dir=.
25119    for ac_exec_ext in '' $ac_executable_extensions; do
25120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25121    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25123    break 2
25124  fi
25125done
25126  done
25127IFS=$as_save_IFS
25128
25129  ;;
25130esac
25131fi
25132JAVAC=$ac_cv_path_JAVAC
25133if test -n "$JAVAC"; then
25134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25135$as_echo "$JAVAC" >&6; }
25136else
25137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25138$as_echo "no" >&6; }
25139fi
25140
25141
25142        if test "x$JAVAC" = x; then
25143          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25144        fi
25145      else
25146        # Otherwise we believe it is a complete path. Use it as it is.
25147        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25148$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25150$as_echo_n "checking for JAVAC... " >&6; }
25151        if test ! -x "$tool_specified"; then
25152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25153$as_echo "not found" >&6; }
25154          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25155        fi
25156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25157$as_echo "$tool_specified" >&6; }
25158      fi
25159    fi
25160  fi
25161
25162
25163
25164  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25165
25166  # Publish this variable in the help.
25167
25168
25169  if test "x$JAVAH" = x; then
25170    # The variable is not set by user, try to locate tool using the code snippet
25171
25172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25173$as_echo_n "checking for javah in Boot JDK... " >&6; }
25174      JAVAH=$BOOT_JDK/bin/javah
25175      if test ! -x $JAVAH; then
25176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25177$as_echo "not found" >&6; }
25178        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25179$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25180        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25181      fi
25182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25183$as_echo "ok" >&6; }
25184
25185
25186  else
25187    # The variable is set, but is it from the command line or the environment?
25188
25189    # Try to remove the string !JAVAH! from our list.
25190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25192      # If it failed, the variable was not from the command line. Ignore it,
25193      # but warn the user (except for BASH, which is always set by the calling BASH).
25194      if test "xJAVAH" != xBASH; then
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25196$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25197      fi
25198      # Try to locate tool using the code snippet
25199
25200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25201$as_echo_n "checking for javah in Boot JDK... " >&6; }
25202      JAVAH=$BOOT_JDK/bin/javah
25203      if test ! -x $JAVAH; then
25204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25205$as_echo "not found" >&6; }
25206        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25207$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25208        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25209      fi
25210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25211$as_echo "ok" >&6; }
25212
25213
25214    else
25215      # If it succeeded, then it was overridden by the user. We will use it
25216      # for the tool.
25217
25218      # First remove it from the list of overridden variables, so we can test
25219      # for unknown variables in the end.
25220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25221
25222      # Check if the provided tool contains a complete path.
25223      tool_specified="$JAVAH"
25224      tool_basename="${tool_specified##*/}"
25225      if test "x$tool_basename" = "x$tool_specified"; then
25226        # A command without a complete path is provided, search $PATH.
25227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25228$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25229        # Extract the first word of "$tool_basename", so it can be a program name with args.
25230set dummy $tool_basename; ac_word=$2
25231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25232$as_echo_n "checking for $ac_word... " >&6; }
25233if ${ac_cv_path_JAVAH+:} false; then :
25234  $as_echo_n "(cached) " >&6
25235else
25236  case $JAVAH in
25237  [\\/]* | ?:[\\/]*)
25238  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25239  ;;
25240  *)
25241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25242for as_dir in $PATH
25243do
25244  IFS=$as_save_IFS
25245  test -z "$as_dir" && as_dir=.
25246    for ac_exec_ext in '' $ac_executable_extensions; do
25247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25248    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25250    break 2
25251  fi
25252done
25253  done
25254IFS=$as_save_IFS
25255
25256  ;;
25257esac
25258fi
25259JAVAH=$ac_cv_path_JAVAH
25260if test -n "$JAVAH"; then
25261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25262$as_echo "$JAVAH" >&6; }
25263else
25264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25265$as_echo "no" >&6; }
25266fi
25267
25268
25269        if test "x$JAVAH" = x; then
25270          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25271        fi
25272      else
25273        # Otherwise we believe it is a complete path. Use it as it is.
25274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25275$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25276        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25277$as_echo_n "checking for JAVAH... " >&6; }
25278        if test ! -x "$tool_specified"; then
25279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25280$as_echo "not found" >&6; }
25281          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25282        fi
25283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25284$as_echo "$tool_specified" >&6; }
25285      fi
25286    fi
25287  fi
25288
25289
25290
25291  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25292
25293  # Publish this variable in the help.
25294
25295
25296  if test "x$JAR" = x; then
25297    # The variable is not set by user, try to locate tool using the code snippet
25298
25299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25300$as_echo_n "checking for jar in Boot JDK... " >&6; }
25301      JAR=$BOOT_JDK/bin/jar
25302      if test ! -x $JAR; then
25303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25304$as_echo "not found" >&6; }
25305        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25306$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25307        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25308      fi
25309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25310$as_echo "ok" >&6; }
25311
25312
25313  else
25314    # The variable is set, but is it from the command line or the environment?
25315
25316    # Try to remove the string !JAR! from our list.
25317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25319      # If it failed, the variable was not from the command line. Ignore it,
25320      # but warn the user (except for BASH, which is always set by the calling BASH).
25321      if test "xJAR" != xBASH; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25323$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25324      fi
25325      # Try to locate tool using the code snippet
25326
25327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25328$as_echo_n "checking for jar in Boot JDK... " >&6; }
25329      JAR=$BOOT_JDK/bin/jar
25330      if test ! -x $JAR; then
25331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25332$as_echo "not found" >&6; }
25333        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25334$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25335        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25336      fi
25337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25338$as_echo "ok" >&6; }
25339
25340
25341    else
25342      # If it succeeded, then it was overridden by the user. We will use it
25343      # for the tool.
25344
25345      # First remove it from the list of overridden variables, so we can test
25346      # for unknown variables in the end.
25347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25348
25349      # Check if the provided tool contains a complete path.
25350      tool_specified="$JAR"
25351      tool_basename="${tool_specified##*/}"
25352      if test "x$tool_basename" = "x$tool_specified"; then
25353        # A command without a complete path is provided, search $PATH.
25354        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25355$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25356        # Extract the first word of "$tool_basename", so it can be a program name with args.
25357set dummy $tool_basename; ac_word=$2
25358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25359$as_echo_n "checking for $ac_word... " >&6; }
25360if ${ac_cv_path_JAR+:} false; then :
25361  $as_echo_n "(cached) " >&6
25362else
25363  case $JAR in
25364  [\\/]* | ?:[\\/]*)
25365  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25366  ;;
25367  *)
25368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25369for as_dir in $PATH
25370do
25371  IFS=$as_save_IFS
25372  test -z "$as_dir" && as_dir=.
25373    for ac_exec_ext in '' $ac_executable_extensions; do
25374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25375    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25377    break 2
25378  fi
25379done
25380  done
25381IFS=$as_save_IFS
25382
25383  ;;
25384esac
25385fi
25386JAR=$ac_cv_path_JAR
25387if test -n "$JAR"; then
25388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25389$as_echo "$JAR" >&6; }
25390else
25391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25392$as_echo "no" >&6; }
25393fi
25394
25395
25396        if test "x$JAR" = x; then
25397          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25398        fi
25399      else
25400        # Otherwise we believe it is a complete path. Use it as it is.
25401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25402$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25404$as_echo_n "checking for JAR... " >&6; }
25405        if test ! -x "$tool_specified"; then
25406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25407$as_echo "not found" >&6; }
25408          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25409        fi
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25411$as_echo "$tool_specified" >&6; }
25412      fi
25413    fi
25414  fi
25415
25416
25417
25418  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25419
25420  # Publish this variable in the help.
25421
25422
25423  if test "x$NATIVE2ASCII" = x; then
25424    # The variable is not set by user, try to locate tool using the code snippet
25425
25426      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25427$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25428      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25429      if test ! -x $NATIVE2ASCII; then
25430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25431$as_echo "not found" >&6; }
25432        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25433$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25434        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25435      fi
25436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25437$as_echo "ok" >&6; }
25438
25439
25440  else
25441    # The variable is set, but is it from the command line or the environment?
25442
25443    # Try to remove the string !NATIVE2ASCII! from our list.
25444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25446      # If it failed, the variable was not from the command line. Ignore it,
25447      # but warn the user (except for BASH, which is always set by the calling BASH).
25448      if test "xNATIVE2ASCII" != xBASH; then
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25450$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25451      fi
25452      # Try to locate tool using the code snippet
25453
25454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25455$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25456      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25457      if test ! -x $NATIVE2ASCII; then
25458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25459$as_echo "not found" >&6; }
25460        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25461$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25462        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25463      fi
25464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25465$as_echo "ok" >&6; }
25466
25467
25468    else
25469      # If it succeeded, then it was overridden by the user. We will use it
25470      # for the tool.
25471
25472      # First remove it from the list of overridden variables, so we can test
25473      # for unknown variables in the end.
25474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25475
25476      # Check if the provided tool contains a complete path.
25477      tool_specified="$NATIVE2ASCII"
25478      tool_basename="${tool_specified##*/}"
25479      if test "x$tool_basename" = "x$tool_specified"; then
25480        # A command without a complete path is provided, search $PATH.
25481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25482$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25483        # Extract the first word of "$tool_basename", so it can be a program name with args.
25484set dummy $tool_basename; ac_word=$2
25485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25486$as_echo_n "checking for $ac_word... " >&6; }
25487if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25488  $as_echo_n "(cached) " >&6
25489else
25490  case $NATIVE2ASCII in
25491  [\\/]* | ?:[\\/]*)
25492  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25493  ;;
25494  *)
25495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25496for as_dir in $PATH
25497do
25498  IFS=$as_save_IFS
25499  test -z "$as_dir" && as_dir=.
25500    for ac_exec_ext in '' $ac_executable_extensions; do
25501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25502    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25504    break 2
25505  fi
25506done
25507  done
25508IFS=$as_save_IFS
25509
25510  ;;
25511esac
25512fi
25513NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25514if test -n "$NATIVE2ASCII"; then
25515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25516$as_echo "$NATIVE2ASCII" >&6; }
25517else
25518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25519$as_echo "no" >&6; }
25520fi
25521
25522
25523        if test "x$NATIVE2ASCII" = x; then
25524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25525        fi
25526      else
25527        # Otherwise we believe it is a complete path. Use it as it is.
25528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25529$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25531$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25532        if test ! -x "$tool_specified"; then
25533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25534$as_echo "not found" >&6; }
25535          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25536        fi
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25538$as_echo "$tool_specified" >&6; }
25539      fi
25540    fi
25541  fi
25542
25543
25544
25545  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25546
25547  # Publish this variable in the help.
25548
25549
25550  if test "x$JARSIGNER" = x; then
25551    # The variable is not set by user, try to locate tool using the code snippet
25552
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25554$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25555      JARSIGNER=$BOOT_JDK/bin/jarsigner
25556      if test ! -x $JARSIGNER; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25558$as_echo "not found" >&6; }
25559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25561        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25562      fi
25563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25564$as_echo "ok" >&6; }
25565
25566
25567  else
25568    # The variable is set, but is it from the command line or the environment?
25569
25570    # Try to remove the string !JARSIGNER! from our list.
25571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25573      # If it failed, the variable was not from the command line. Ignore it,
25574      # but warn the user (except for BASH, which is always set by the calling BASH).
25575      if test "xJARSIGNER" != xBASH; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25577$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25578      fi
25579      # Try to locate tool using the code snippet
25580
25581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25582$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25583      JARSIGNER=$BOOT_JDK/bin/jarsigner
25584      if test ! -x $JARSIGNER; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25586$as_echo "not found" >&6; }
25587        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25588$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25589        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25590      fi
25591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25592$as_echo "ok" >&6; }
25593
25594
25595    else
25596      # If it succeeded, then it was overridden by the user. We will use it
25597      # for the tool.
25598
25599      # First remove it from the list of overridden variables, so we can test
25600      # for unknown variables in the end.
25601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25602
25603      # Check if the provided tool contains a complete path.
25604      tool_specified="$JARSIGNER"
25605      tool_basename="${tool_specified##*/}"
25606      if test "x$tool_basename" = "x$tool_specified"; then
25607        # A command without a complete path is provided, search $PATH.
25608        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25609$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25610        # Extract the first word of "$tool_basename", so it can be a program name with args.
25611set dummy $tool_basename; ac_word=$2
25612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25613$as_echo_n "checking for $ac_word... " >&6; }
25614if ${ac_cv_path_JARSIGNER+:} false; then :
25615  $as_echo_n "(cached) " >&6
25616else
25617  case $JARSIGNER in
25618  [\\/]* | ?:[\\/]*)
25619  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25620  ;;
25621  *)
25622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25623for as_dir in $PATH
25624do
25625  IFS=$as_save_IFS
25626  test -z "$as_dir" && as_dir=.
25627    for ac_exec_ext in '' $ac_executable_extensions; do
25628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25629    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25631    break 2
25632  fi
25633done
25634  done
25635IFS=$as_save_IFS
25636
25637  ;;
25638esac
25639fi
25640JARSIGNER=$ac_cv_path_JARSIGNER
25641if test -n "$JARSIGNER"; then
25642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25643$as_echo "$JARSIGNER" >&6; }
25644else
25645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25646$as_echo "no" >&6; }
25647fi
25648
25649
25650        if test "x$JARSIGNER" = x; then
25651          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25652        fi
25653      else
25654        # Otherwise we believe it is a complete path. Use it as it is.
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25656$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25658$as_echo_n "checking for JARSIGNER... " >&6; }
25659        if test ! -x "$tool_specified"; then
25660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25661$as_echo "not found" >&6; }
25662          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25663        fi
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25665$as_echo "$tool_specified" >&6; }
25666      fi
25667    fi
25668  fi
25669
25670
25671
25672  # Finally, set some other options...
25673
25674  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25675  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25676
25677
25678
25679
25680  ##############################################################################
25681  #
25682  # Specify options for anything that is run with the Boot JDK.
25683  #
25684
25685# Check whether --with-boot-jdk-jvmargs was given.
25686if test "${with_boot_jdk_jvmargs+set}" = set; then :
25687  withval=$with_boot_jdk_jvmargs;
25688fi
25689
25690
25691  if test "x$with_boot_jdk_jvmargs" = x; then
25692    # Not all JVM:s accept the same arguments on the command line.
25693    # OpenJDK specific increase in thread stack for JDK build,
25694    # well more specifically, when running javac.
25695    if test "x$BUILD_NUM_BITS" = x32; then
25696      STACK_SIZE=768
25697    else
25698      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25699      # since 64-bit pointers are pushed on the stach. Apparently, we need
25700      # to increase the stack space when javacing the JDK....
25701      STACK_SIZE=1536
25702    fi
25703
25704    # Minimum amount of heap memory.
25705
25706  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25707  $ECHO "Command: $JAVA -Xms64M -version" >&5
25708  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25709  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25710  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25711  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25712    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25713    JVM_ARG_OK=true
25714  else
25715    $ECHO "Arg failed:" >&5
25716    $ECHO "$OUTPUT" >&5
25717    JVM_ARG_OK=false
25718  fi
25719
25720    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25721      # Why does macosx need more heap? Its the huge JDK batch.
25722
25723  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25724  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25725  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25726  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25727  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25728  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25729    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25730    JVM_ARG_OK=true
25731  else
25732    $ECHO "Arg failed:" >&5
25733    $ECHO "$OUTPUT" >&5
25734    JVM_ARG_OK=false
25735  fi
25736
25737    else
25738
25739  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25740  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25741  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25742  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25743  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25744  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25745    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25746    JVM_ARG_OK=true
25747  else
25748    $ECHO "Arg failed:" >&5
25749    $ECHO "$OUTPUT" >&5
25750    JVM_ARG_OK=false
25751  fi
25752
25753    fi
25754    # When is adding -client something that speeds up the JVM?
25755    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25756
25757  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25758  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25759  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25760  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25761  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25762  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25763    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25764    JVM_ARG_OK=true
25765  else
25766    $ECHO "Arg failed:" >&5
25767    $ECHO "$OUTPUT" >&5
25768    JVM_ARG_OK=false
25769  fi
25770
25771    # Disable special log output when a debug build is used as Boot JDK...
25772
25773  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25774  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25775  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25776  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25777  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25778  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25779    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25780    JVM_ARG_OK=true
25781  else
25782    $ECHO "Arg failed:" >&5
25783    $ECHO "$OUTPUT" >&5
25784    JVM_ARG_OK=false
25785  fi
25786
25787  fi
25788
25789  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25790
25791
25792
25793###############################################################################
25794#
25795# Configure the sources to use. We can add or override individual directories.
25796#
25797###############################################################################
25798
25799
25800  # Where are the sources. Any of these can be overridden
25801  # using --with-override-corba and the likes.
25802  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25803  CORBA_TOPDIR="$SRC_ROOT/corba"
25804  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25805  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25806  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25807  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25808  JDK_TOPDIR="$SRC_ROOT/jdk"
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819  ###############################################################################
25820  #
25821  # Pickup additional source for a component from outside of the source root
25822  # or override source for a component.
25823  #
25824
25825# Check whether --with-add-source-root was given.
25826if test "${with_add_source_root+set}" = set; then :
25827  withval=$with_add_source_root;
25828fi
25829
25830
25831
25832# Check whether --with-override-source-root was given.
25833if test "${with_override_source_root+set}" = set; then :
25834  withval=$with_override_source_root;
25835fi
25836
25837
25838
25839# Check whether --with-adds-and-overrides was given.
25840if test "${with_adds_and_overrides+set}" = set; then :
25841  withval=$with_adds_and_overrides;
25842fi
25843
25844
25845  if test "x$with_adds_and_overrides" != x; then
25846    with_add_source_root="$with_adds_and_overrides/adds"
25847    with_override_source_root="$with_adds_and_overrides/overrides"
25848  fi
25849
25850  if test "x$with_add_source_root" != x; then
25851    if ! test -d $with_add_source_root; then
25852      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25853    fi
25854    CURDIR="$PWD"
25855    cd "$with_add_source_root"
25856    ADD_SRC_ROOT="`pwd`"
25857    cd "$CURDIR"
25858    # Verify that the addon source root does not have any root makefiles.
25859    # If it does, then it is usually an error, prevent this.
25860    if test -f $with_add_source_root/langtools/make/Makefile; then
25861      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
25862    fi
25863    if test -f $with_add_source_root/corba/make/Makefile; then
25864      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
25865    fi
25866    if test -f $with_add_source_root/jaxp/make/Makefile; then
25867      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
25868    fi
25869    if test -f $with_add_source_root/jaxws/make/Makefile; then
25870      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
25871    fi
25872    if test -f $with_add_source_root/hotspot/make/Makefile; then
25873      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
25874    fi
25875    if test -f $with_add_source_root/nashorn/make/Makefile; then
25876      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
25877    fi
25878    if test -f $with_add_source_root/jdk/make/Makefile; then
25879      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
25880    fi
25881  fi
25882
25883
25884  if test "x$with_override_source_root" != x; then
25885    if ! test -d $with_override_source_root; then
25886      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25887    fi
25888    CURDIR="$PWD"
25889    cd "$with_override_source_root"
25890    OVERRIDE_SRC_ROOT="`pwd`"
25891    cd "$CURDIR"
25892    if test -f $with_override_source_root/langtools/make/Makefile; then
25893      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
25894    fi
25895    if test -f $with_override_source_root/corba/make/Makefile; then
25896      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
25897    fi
25898    if test -f $with_override_source_root/jaxp/make/Makefile; then
25899      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
25900    fi
25901    if test -f $with_override_source_root/jaxws/make/Makefile; then
25902      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
25903    fi
25904    if test -f $with_override_source_root/hotspot/make/Makefile; then
25905      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
25906    fi
25907    if test -f $with_override_source_root/nashorn/make/Makefile; then
25908      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
25909    fi
25910    if test -f $with_override_source_root/jdk/make/Makefile; then
25911      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
25912    fi
25913  fi
25914
25915
25916  ###############################################################################
25917  #
25918  # Override a repo completely, this is used for example when you have 3 small
25919  # development sandboxes of the langtools sources and want to avoid having 3 full
25920  # OpenJDK sources checked out on disk.
25921  #
25922  # Assuming that the 3 langtools sandboxes are located here:
25923  # /home/fredrik/sandbox1/langtools
25924  # /home/fredrik/sandbox2/langtools
25925  # /home/fredrik/sandbox3/langtools
25926  #
25927  # From the source root you create build subdirs manually:
25928  #     mkdir -p build1 build2 build3
25929  # in each build directory run:
25930  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25931  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25932  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25933  #
25934
25935
25936# Check whether --with-override-langtools was given.
25937if test "${with_override_langtools+set}" = set; then :
25938  withval=$with_override_langtools;
25939fi
25940
25941
25942
25943# Check whether --with-override-corba was given.
25944if test "${with_override_corba+set}" = set; then :
25945  withval=$with_override_corba;
25946fi
25947
25948
25949
25950# Check whether --with-override-jaxp was given.
25951if test "${with_override_jaxp+set}" = set; then :
25952  withval=$with_override_jaxp;
25953fi
25954
25955
25956
25957# Check whether --with-override-jaxws was given.
25958if test "${with_override_jaxws+set}" = set; then :
25959  withval=$with_override_jaxws;
25960fi
25961
25962
25963
25964# Check whether --with-override-hotspot was given.
25965if test "${with_override_hotspot+set}" = set; then :
25966  withval=$with_override_hotspot;
25967fi
25968
25969
25970
25971# Check whether --with-override-nashorn was given.
25972if test "${with_override_nashorn+set}" = set; then :
25973  withval=$with_override_nashorn;
25974fi
25975
25976
25977
25978# Check whether --with-override-jdk was given.
25979if test "${with_override_jdk+set}" = set; then :
25980  withval=$with_override_jdk;
25981fi
25982
25983
25984  if test "x$with_override_langtools" != x; then
25985    CURDIR="$PWD"
25986    cd "$with_override_langtools"
25987    LANGTOOLS_TOPDIR="`pwd`"
25988    cd "$CURDIR"
25989    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
25990      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
25991    fi
25992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
25993$as_echo_n "checking if langtools should be overridden... " >&6; }
25994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
25995$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
25996  fi
25997  if test "x$with_override_corba" != x; then
25998    CURDIR="$PWD"
25999    cd "$with_override_corba"
26000    CORBA_TOPDIR="`pwd`"
26001    cd "$CURDIR"
26002    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26003      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26004    fi
26005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26006$as_echo_n "checking if corba should be overridden... " >&6; }
26007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26008$as_echo "yes with $CORBA_TOPDIR" >&6; }
26009  fi
26010  if test "x$with_override_jaxp" != x; then
26011    CURDIR="$PWD"
26012    cd "$with_override_jaxp"
26013    JAXP_TOPDIR="`pwd`"
26014    cd "$CURDIR"
26015    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26016      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26017    fi
26018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26019$as_echo_n "checking if jaxp should be overridden... " >&6; }
26020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26021$as_echo "yes with $JAXP_TOPDIR" >&6; }
26022  fi
26023  if test "x$with_override_jaxws" != x; then
26024    CURDIR="$PWD"
26025    cd "$with_override_jaxws"
26026    JAXWS_TOPDIR="`pwd`"
26027    cd "$CURDIR"
26028    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26029      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26030    fi
26031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26032$as_echo_n "checking if jaxws should be overridden... " >&6; }
26033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26034$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26035  fi
26036  if test "x$with_override_hotspot" != x; then
26037    CURDIR="$PWD"
26038    cd "$with_override_hotspot"
26039    HOTSPOT_TOPDIR="`pwd`"
26040    cd "$CURDIR"
26041    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26042      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26043    fi
26044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26045$as_echo_n "checking if hotspot should be overridden... " >&6; }
26046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26047$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26048  fi
26049  if test "x$with_override_nashorn" != x; then
26050    CURDIR="$PWD"
26051    cd "$with_override_nashorn"
26052    NASHORN_TOPDIR="`pwd`"
26053    cd "$CURDIR"
26054    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26055      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26056    fi
26057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26058$as_echo_n "checking if nashorn should be overridden... " >&6; }
26059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26060$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26061  fi
26062  if test "x$with_override_jdk" != x; then
26063    CURDIR="$PWD"
26064    cd "$with_override_jdk"
26065    JDK_TOPDIR="`pwd`"
26066    cd "$CURDIR"
26067    if ! test -f $JDK_TOPDIR/make/Makefile; then
26068      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26069    fi
26070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26071$as_echo_n "checking if JDK should be overridden... " >&6; }
26072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26073$as_echo "yes with $JDK_TOPDIR" >&6; }
26074  fi
26075
26076
26077  BUILD_OUTPUT="$OUTPUT_ROOT"
26078
26079
26080  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26081  BUILD_HOTSPOT=true
26082
26083
26084
26085# Check whether --with-import-hotspot was given.
26086if test "${with_import_hotspot+set}" = set; then :
26087  withval=$with_import_hotspot;
26088fi
26089
26090  if test "x$with_import_hotspot" != x; then
26091    CURDIR="$PWD"
26092    cd "$with_import_hotspot"
26093    HOTSPOT_DIST="`pwd`"
26094    cd "$CURDIR"
26095    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26096      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26097    fi
26098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26099$as_echo_n "checking if hotspot should be imported... " >&6; }
26100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26101$as_echo "yes from $HOTSPOT_DIST" >&6; }
26102    BUILD_HOTSPOT=false
26103  fi
26104
26105  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26106
26107
26108###############################################################################
26109#
26110# Setup the toolchain (compilers etc), i.e. the tools that need to be
26111# cross-compilation aware.
26112#
26113###############################################################################
26114
26115
26116  ###############################################################################
26117  #
26118  # Configure the development tool paths and potential sysroot.
26119  #
26120  ac_ext=cpp
26121ac_cpp='$CXXCPP $CPPFLAGS'
26122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26125
26126
26127  # The option used to specify the target .o,.a or .so file.
26128  # When compiling, how to specify the to be created object file.
26129  CC_OUT_OPTION='-o$(SPACE)'
26130  # When linking, how to specify the to be created executable.
26131  EXE_OUT_OPTION='-o$(SPACE)'
26132  # When linking, how to specify the to be created dynamically linkable library.
26133  LD_OUT_OPTION='-o$(SPACE)'
26134  # When archiving, how to specify the to be create static archive for object files.
26135  AR_OUT_OPTION='rcs$(SPACE)'
26136
26137
26138
26139
26140
26141# Locate the actual tools
26142
26143
26144# Check whether --with-jtreg was given.
26145if test "${with_jtreg+set}" = set; then :
26146  withval=$with_jtreg;
26147else
26148  with_jtreg=no
26149fi
26150
26151
26152  if test "x$with_jtreg" = xno; then
26153    # jtreg disabled
26154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26155$as_echo_n "checking for jtreg... " >&6; }
26156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26157$as_echo "no" >&6; }
26158  else
26159    if test "x$with_jtreg" != xyes; then
26160      # with path specified.
26161      JT_HOME="$with_jtreg"
26162    fi
26163
26164    if test "x$JT_HOME" != x; then
26165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26166$as_echo_n "checking for jtreg... " >&6; }
26167
26168      # use JT_HOME enviroment var.
26169
26170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26171
26172  # Input might be given as Windows format, start by converting to
26173  # unix format.
26174  path="$JT_HOME"
26175  new_path=`$CYGPATH -u "$path"`
26176
26177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26180  # "foo.exe" is OK but "foo" is an error.
26181  #
26182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26183  # It is also a way to make sure we got the proper file name for the real test later on.
26184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26185  if test "x$test_shortpath" = x; then
26186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26187$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26188    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
26189  fi
26190
26191  # Call helper function which possibly converts this using DOS-style short mode.
26192  # If so, the updated path is stored in $new_path.
26193
26194  input_path="$new_path"
26195  # Check if we need to convert this using DOS-style short mode. If the path
26196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26197  # take no chances and rewrite it.
26198  # Note: m4 eats our [], so we need to use [ and ] instead.
26199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26200  if test "x$has_forbidden_chars" != x; then
26201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26205      # Going to short mode and back again did indeed matter. Since short mode is
26206      # case insensitive, let's make it lowercase to improve readability.
26207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26208      # Now convert it back to Unix-stile (cygpath)
26209      input_path=`$CYGPATH -u "$shortmode_path"`
26210      new_path="$input_path"
26211    fi
26212  fi
26213
26214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26215  if test "x$test_cygdrive_prefix" = x; then
26216    # As a simple fix, exclude /usr/bin since it's not a real path.
26217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26219      # a path prefixed by /cygdrive for fixpath to work.
26220      new_path="$CYGWIN_ROOT_PATH$input_path"
26221    fi
26222  fi
26223
26224
26225  if test "x$path" != "x$new_path"; then
26226    JT_HOME="$new_path"
26227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26228$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26229  fi
26230
26231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26232
26233  path="$JT_HOME"
26234  has_colon=`$ECHO $path | $GREP ^.:`
26235  new_path="$path"
26236  if test "x$has_colon" = x; then
26237    # Not in mixed or Windows style, start by that.
26238    new_path=`cmd //c echo $path`
26239  fi
26240
26241
26242  input_path="$new_path"
26243  # Check if we need to convert this using DOS-style short mode. If the path
26244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26245  # take no chances and rewrite it.
26246  # Note: m4 eats our [], so we need to use [ and ] instead.
26247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26248  if test "x$has_forbidden_chars" != x; then
26249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26251  fi
26252
26253
26254  windows_path="$new_path"
26255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26256    unix_path=`$CYGPATH -u "$windows_path"`
26257    new_path="$unix_path"
26258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26260    new_path="$unix_path"
26261  fi
26262
26263  if test "x$path" != "x$new_path"; then
26264    JT_HOME="$new_path"
26265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26266$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26267  fi
26268
26269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26271
26272  else
26273    # We're on a posix platform. Hooray! :)
26274    path="$JT_HOME"
26275    has_space=`$ECHO "$path" | $GREP " "`
26276    if test "x$has_space" != x; then
26277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26278$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26280    fi
26281
26282    # Use eval to expand a potential ~
26283    eval path="$path"
26284    if test ! -f "$path" && test ! -d "$path"; then
26285      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
26286    fi
26287
26288    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
26289  fi
26290
26291
26292      # jtreg win32 script works for everybody
26293      JTREGEXE="$JT_HOME/win32/bin/jtreg"
26294
26295      if test ! -f "$JTREGEXE"; then
26296        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
26297      fi
26298
26299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26300$as_echo "$JTREGEXE" >&6; }
26301    else
26302      # try to find jtreg on path
26303
26304
26305
26306  # Publish this variable in the help.
26307
26308
26309  if test "x$JTREGEXE" = x; then
26310    # The variable is not set by user, try to locate tool using the code snippet
26311    for ac_prog in jtreg
26312do
26313  # Extract the first word of "$ac_prog", so it can be a program name with args.
26314set dummy $ac_prog; ac_word=$2
26315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26316$as_echo_n "checking for $ac_word... " >&6; }
26317if ${ac_cv_path_JTREGEXE+:} false; then :
26318  $as_echo_n "(cached) " >&6
26319else
26320  case $JTREGEXE in
26321  [\\/]* | ?:[\\/]*)
26322  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26323  ;;
26324  *)
26325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26326for as_dir in $PATH
26327do
26328  IFS=$as_save_IFS
26329  test -z "$as_dir" && as_dir=.
26330    for ac_exec_ext in '' $ac_executable_extensions; do
26331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26332    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26334    break 2
26335  fi
26336done
26337  done
26338IFS=$as_save_IFS
26339
26340  ;;
26341esac
26342fi
26343JTREGEXE=$ac_cv_path_JTREGEXE
26344if test -n "$JTREGEXE"; then
26345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26346$as_echo "$JTREGEXE" >&6; }
26347else
26348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26349$as_echo "no" >&6; }
26350fi
26351
26352
26353  test -n "$JTREGEXE" && break
26354done
26355
26356  else
26357    # The variable is set, but is it from the command line or the environment?
26358
26359    # Try to remove the string !JTREGEXE! from our list.
26360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
26361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26362      # If it failed, the variable was not from the command line. Ignore it,
26363      # but warn the user (except for BASH, which is always set by the calling BASH).
26364      if test "xJTREGEXE" != xBASH; then
26365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
26366$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
26367      fi
26368      # Try to locate tool using the code snippet
26369      for ac_prog in jtreg
26370do
26371  # Extract the first word of "$ac_prog", so it can be a program name with args.
26372set dummy $ac_prog; ac_word=$2
26373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26374$as_echo_n "checking for $ac_word... " >&6; }
26375if ${ac_cv_path_JTREGEXE+:} false; then :
26376  $as_echo_n "(cached) " >&6
26377else
26378  case $JTREGEXE in
26379  [\\/]* | ?:[\\/]*)
26380  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26381  ;;
26382  *)
26383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26384for as_dir in $PATH
26385do
26386  IFS=$as_save_IFS
26387  test -z "$as_dir" && as_dir=.
26388    for ac_exec_ext in '' $ac_executable_extensions; do
26389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26390    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26392    break 2
26393  fi
26394done
26395  done
26396IFS=$as_save_IFS
26397
26398  ;;
26399esac
26400fi
26401JTREGEXE=$ac_cv_path_JTREGEXE
26402if test -n "$JTREGEXE"; then
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26404$as_echo "$JTREGEXE" >&6; }
26405else
26406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26407$as_echo "no" >&6; }
26408fi
26409
26410
26411  test -n "$JTREGEXE" && break
26412done
26413
26414    else
26415      # If it succeeded, then it was overridden by the user. We will use it
26416      # for the tool.
26417
26418      # First remove it from the list of overridden variables, so we can test
26419      # for unknown variables in the end.
26420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26421
26422      # Check if the provided tool contains a complete path.
26423      tool_specified="$JTREGEXE"
26424      tool_basename="${tool_specified##*/}"
26425      if test "x$tool_basename" = "x$tool_specified"; then
26426        # A command without a complete path is provided, search $PATH.
26427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
26428$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
26429        # Extract the first word of "$tool_basename", so it can be a program name with args.
26430set dummy $tool_basename; ac_word=$2
26431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26432$as_echo_n "checking for $ac_word... " >&6; }
26433if ${ac_cv_path_JTREGEXE+:} false; then :
26434  $as_echo_n "(cached) " >&6
26435else
26436  case $JTREGEXE in
26437  [\\/]* | ?:[\\/]*)
26438  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26439  ;;
26440  *)
26441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26442for as_dir in $PATH
26443do
26444  IFS=$as_save_IFS
26445  test -z "$as_dir" && as_dir=.
26446    for ac_exec_ext in '' $ac_executable_extensions; do
26447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26448    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26450    break 2
26451  fi
26452done
26453  done
26454IFS=$as_save_IFS
26455
26456  ;;
26457esac
26458fi
26459JTREGEXE=$ac_cv_path_JTREGEXE
26460if test -n "$JTREGEXE"; then
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26462$as_echo "$JTREGEXE" >&6; }
26463else
26464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26465$as_echo "no" >&6; }
26466fi
26467
26468
26469        if test "x$JTREGEXE" = x; then
26470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26471        fi
26472      else
26473        # Otherwise we believe it is a complete path. Use it as it is.
26474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
26475$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
26476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
26477$as_echo_n "checking for JTREGEXE... " >&6; }
26478        if test ! -x "$tool_specified"; then
26479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26480$as_echo "not found" >&6; }
26481          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
26482        fi
26483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26484$as_echo "$tool_specified" >&6; }
26485      fi
26486    fi
26487  fi
26488
26489
26490
26491  if test "x$JTREGEXE" = x; then
26492    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
26493  fi
26494
26495
26496      JT_HOME="`$DIRNAME $JTREGEXE`"
26497    fi
26498  fi
26499
26500
26501
26502
26503
26504  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
26505
26506  # Store path to cygwin link.exe to help excluding it when searching for
26507  # VS linker. This must be done before changing the PATH when looking for VS.
26508  # Extract the first word of "link", so it can be a program name with args.
26509set dummy link; ac_word=$2
26510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26511$as_echo_n "checking for $ac_word... " >&6; }
26512if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26513  $as_echo_n "(cached) " >&6
26514else
26515  case $CYGWIN_LINK in
26516  [\\/]* | ?:[\\/]*)
26517  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26518  ;;
26519  *)
26520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26521for as_dir in $PATH
26522do
26523  IFS=$as_save_IFS
26524  test -z "$as_dir" && as_dir=.
26525    for ac_exec_ext in '' $ac_executable_extensions; do
26526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26527    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26529    break 2
26530  fi
26531done
26532  done
26533IFS=$as_save_IFS
26534
26535  ;;
26536esac
26537fi
26538CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26539if test -n "$CYGWIN_LINK"; then
26540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26541$as_echo "$CYGWIN_LINK" >&6; }
26542else
26543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26544$as_echo "no" >&6; }
26545fi
26546
26547
26548  if test "x$CYGWIN_LINK" != x; then
26549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26550$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26551    "$CYGWIN_LINK" --version > /dev/null
26552    if test $? -eq 0 ; then
26553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26554$as_echo "yes" >&6; }
26555    else
26556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26557$as_echo "no" >&6; }
26558      # This might be the VS linker. Don't exclude it later on.
26559      CYGWIN_LINK=""
26560    fi
26561  fi
26562
26563  # First-hand choice is to locate and run the vsvars bat file.
26564
26565  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26566    VCVARSFILE="vc/bin/vcvars32.bat"
26567  else
26568    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26569  fi
26570
26571  VS_ENV_CMD=""
26572  VS_ENV_ARGS=""
26573  if test "x$with_toolsdir" != x; then
26574
26575  if test "x$VS_ENV_CMD" = x; then
26576    VS100BASE="$with_toolsdir/../.."
26577    METHOD="--with-tools-dir"
26578
26579  windows_path="$VS100BASE"
26580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26581    unix_path=`$CYGPATH -u "$windows_path"`
26582    VS100BASE="$unix_path"
26583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26585    VS100BASE="$unix_path"
26586  fi
26587
26588    if test -d "$VS100BASE"; then
26589      if test -f "$VS100BASE/$VCVARSFILE"; then
26590        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26591$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26592        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26593      else
26594        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26595$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26596        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26597$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26598      fi
26599    fi
26600  fi
26601
26602  fi
26603
26604  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26605    # Having specified an argument which is incorrect will produce an instant failure;
26606    # we should not go on looking
26607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26608$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26609    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26610$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26611    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26612  fi
26613
26614  if test "x$VS100COMNTOOLS" != x; then
26615
26616  if test "x$VS_ENV_CMD" = x; then
26617    VS100BASE="$VS100COMNTOOLS/../.."
26618    METHOD="VS100COMNTOOLS variable"
26619
26620  windows_path="$VS100BASE"
26621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26622    unix_path=`$CYGPATH -u "$windows_path"`
26623    VS100BASE="$unix_path"
26624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26626    VS100BASE="$unix_path"
26627  fi
26628
26629    if test -d "$VS100BASE"; then
26630      if test -f "$VS100BASE/$VCVARSFILE"; then
26631        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26632$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26633        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26634      else
26635        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26636$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26637        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26638$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26639      fi
26640    fi
26641  fi
26642
26643  fi
26644  if test "x$PROGRAMFILES" != x; then
26645
26646  if test "x$VS_ENV_CMD" = x; then
26647    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26648    METHOD="well-known name"
26649
26650  windows_path="$VS100BASE"
26651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26652    unix_path=`$CYGPATH -u "$windows_path"`
26653    VS100BASE="$unix_path"
26654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26656    VS100BASE="$unix_path"
26657  fi
26658
26659    if test -d "$VS100BASE"; then
26660      if test -f "$VS100BASE/$VCVARSFILE"; then
26661        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26662$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26663        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26664      else
26665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26666$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26668$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26669      fi
26670    fi
26671  fi
26672
26673  fi
26674
26675  if test "x$VS_ENV_CMD" = x; then
26676    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26677    METHOD="well-known name"
26678
26679  windows_path="$VS100BASE"
26680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26681    unix_path=`$CYGPATH -u "$windows_path"`
26682    VS100BASE="$unix_path"
26683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26685    VS100BASE="$unix_path"
26686  fi
26687
26688    if test -d "$VS100BASE"; then
26689      if test -f "$VS100BASE/$VCVARSFILE"; then
26690        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26691$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26692        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26693      else
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26695$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26696        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26697$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26698      fi
26699    fi
26700  fi
26701
26702
26703  if test "x$VS_ENV_CMD" = x; then
26704    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26705    METHOD="well-known name"
26706
26707  windows_path="$VS100BASE"
26708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26709    unix_path=`$CYGPATH -u "$windows_path"`
26710    VS100BASE="$unix_path"
26711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26713    VS100BASE="$unix_path"
26714  fi
26715
26716    if test -d "$VS100BASE"; then
26717      if test -f "$VS100BASE/$VCVARSFILE"; then
26718        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26719$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26720        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26721      else
26722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26723$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26724        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26725$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26726      fi
26727    fi
26728  fi
26729
26730
26731  if test "x$ProgramW6432" != x; then
26732
26733  if test "x$VS_ENV_CMD" = x; then
26734    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26735    METHOD="well-known name"
26736
26737  windows_path="$WIN_SDK_BASE"
26738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26739    unix_path=`$CYGPATH -u "$windows_path"`
26740    WIN_SDK_BASE="$unix_path"
26741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26743    WIN_SDK_BASE="$unix_path"
26744  fi
26745
26746    if test -d "$WIN_SDK_BASE"; then
26747      # There have been cases of partial or broken SDK installations. A missing
26748      # lib dir is not going to work.
26749      if test ! -d "$WIN_SDK_BASE/../lib"; then
26750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26751$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26752        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26753$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26754      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26756$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26757        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26758        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26759          VS_ENV_ARGS="/x86"
26760        else
26761          VS_ENV_ARGS="/x64"
26762        fi
26763      else
26764        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26765$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26767$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26768      fi
26769    fi
26770  fi
26771
26772  fi
26773  if test "x$PROGRAMW6432" != x; then
26774
26775  if test "x$VS_ENV_CMD" = x; then
26776    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26777    METHOD="well-known name"
26778
26779  windows_path="$WIN_SDK_BASE"
26780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26781    unix_path=`$CYGPATH -u "$windows_path"`
26782    WIN_SDK_BASE="$unix_path"
26783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26785    WIN_SDK_BASE="$unix_path"
26786  fi
26787
26788    if test -d "$WIN_SDK_BASE"; then
26789      # There have been cases of partial or broken SDK installations. A missing
26790      # lib dir is not going to work.
26791      if test ! -d "$WIN_SDK_BASE/../lib"; then
26792        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26793$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26795$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26796      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26797        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26798$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26799        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26800        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26801          VS_ENV_ARGS="/x86"
26802        else
26803          VS_ENV_ARGS="/x64"
26804        fi
26805      else
26806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26807$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26808        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26809$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26810      fi
26811    fi
26812  fi
26813
26814  fi
26815  if test "x$PROGRAMFILES" != x; then
26816
26817  if test "x$VS_ENV_CMD" = x; then
26818    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26819    METHOD="well-known name"
26820
26821  windows_path="$WIN_SDK_BASE"
26822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26823    unix_path=`$CYGPATH -u "$windows_path"`
26824    WIN_SDK_BASE="$unix_path"
26825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26827    WIN_SDK_BASE="$unix_path"
26828  fi
26829
26830    if test -d "$WIN_SDK_BASE"; then
26831      # There have been cases of partial or broken SDK installations. A missing
26832      # lib dir is not going to work.
26833      if test ! -d "$WIN_SDK_BASE/../lib"; then
26834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26835$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26837$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26838      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26839        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26840$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26841        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26842        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26843          VS_ENV_ARGS="/x86"
26844        else
26845          VS_ENV_ARGS="/x64"
26846        fi
26847      else
26848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26849$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26851$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26852      fi
26853    fi
26854  fi
26855
26856  fi
26857
26858  if test "x$VS_ENV_CMD" = x; then
26859    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26860    METHOD="well-known name"
26861
26862  windows_path="$WIN_SDK_BASE"
26863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26864    unix_path=`$CYGPATH -u "$windows_path"`
26865    WIN_SDK_BASE="$unix_path"
26866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26868    WIN_SDK_BASE="$unix_path"
26869  fi
26870
26871    if test -d "$WIN_SDK_BASE"; then
26872      # There have been cases of partial or broken SDK installations. A missing
26873      # lib dir is not going to work.
26874      if test ! -d "$WIN_SDK_BASE/../lib"; then
26875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26876$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26878$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26879      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26881$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26882        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26883        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26884          VS_ENV_ARGS="/x86"
26885        else
26886          VS_ENV_ARGS="/x64"
26887        fi
26888      else
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26890$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26892$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26893      fi
26894    fi
26895  fi
26896
26897
26898  if test "x$VS_ENV_CMD" = x; then
26899    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26900    METHOD="well-known name"
26901
26902  windows_path="$WIN_SDK_BASE"
26903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26904    unix_path=`$CYGPATH -u "$windows_path"`
26905    WIN_SDK_BASE="$unix_path"
26906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26908    WIN_SDK_BASE="$unix_path"
26909  fi
26910
26911    if test -d "$WIN_SDK_BASE"; then
26912      # There have been cases of partial or broken SDK installations. A missing
26913      # lib dir is not going to work.
26914      if test ! -d "$WIN_SDK_BASE/../lib"; then
26915        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26916$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26918$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26919      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26920        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26921$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26922        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26923        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26924          VS_ENV_ARGS="/x86"
26925        else
26926          VS_ENV_ARGS="/x64"
26927        fi
26928      else
26929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26930$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26931        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26932$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26933      fi
26934    fi
26935  fi
26936
26937
26938  if test "x$VS_ENV_CMD" != x; then
26939    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26940
26941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26942
26943  # First separate the path from the arguments. This will split at the first
26944  # space.
26945  complete="$VS_ENV_CMD"
26946  path="${complete%% *}"
26947  tmp="$complete EOL"
26948  arguments="${tmp#* }"
26949
26950  # Input might be given as Windows format, start by converting to
26951  # unix format.
26952  new_path=`$CYGPATH -u "$path"`
26953
26954  # Now try to locate executable using which
26955  new_path=`$WHICH "$new_path" 2> /dev/null`
26956  # bat and cmd files are not always considered executable in cygwin causing which
26957  # to not find them
26958  if test "x$new_path" = x \
26959      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26960      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26961    new_path=`$CYGPATH -u "$path"`
26962  fi
26963  if test "x$new_path" = x; then
26964    # Oops. Which didn't find the executable.
26965    # The splitting of arguments from the executable at a space might have been incorrect,
26966    # since paths with space are more likely in Windows. Give it another try with the whole
26967    # argument.
26968    path="$complete"
26969    arguments="EOL"
26970    new_path=`$CYGPATH -u "$path"`
26971    new_path=`$WHICH "$new_path" 2> /dev/null`
26972    # bat and cmd files are not always considered executable in cygwin causing which
26973    # to not find them
26974    if test "x$new_path" = x \
26975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26977      new_path=`$CYGPATH -u "$path"`
26978    fi
26979    if test "x$new_path" = x; then
26980      # It's still not found. Now this is an unrecoverable error.
26981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26982$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26983      has_space=`$ECHO "$complete" | $GREP " "`
26984      if test "x$has_space" != x; then
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26987      fi
26988      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26989    fi
26990  fi
26991
26992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26995  # "foo.exe" is OK but "foo" is an error.
26996  #
26997  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26998  # It is also a way to make sure we got the proper file name for the real test later on.
26999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27000  if test "x$test_shortpath" = x; then
27001    # Short path failed, file does not exist as specified.
27002    # Try adding .exe or .cmd
27003    if test -f "${new_path}.exe"; then
27004      input_to_shortpath="${new_path}.exe"
27005    elif test -f "${new_path}.cmd"; then
27006      input_to_shortpath="${new_path}.cmd"
27007    else
27008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27009$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27010      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27011$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27012      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27013    fi
27014  else
27015    input_to_shortpath="$new_path"
27016  fi
27017
27018  # Call helper function which possibly converts this using DOS-style short mode.
27019  # If so, the updated path is stored in $new_path.
27020  new_path="$input_to_shortpath"
27021
27022  input_path="$input_to_shortpath"
27023  # Check if we need to convert this using DOS-style short mode. If the path
27024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27025  # take no chances and rewrite it.
27026  # Note: m4 eats our [], so we need to use [ and ] instead.
27027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27028  if test "x$has_forbidden_chars" != x; then
27029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27030    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27031    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27032    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27033      # Going to short mode and back again did indeed matter. Since short mode is
27034      # case insensitive, let's make it lowercase to improve readability.
27035      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27036      # Now convert it back to Unix-stile (cygpath)
27037      input_path=`$CYGPATH -u "$shortmode_path"`
27038      new_path="$input_path"
27039    fi
27040  fi
27041
27042  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27043  if test "x$test_cygdrive_prefix" = x; then
27044    # As a simple fix, exclude /usr/bin since it's not a real path.
27045    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27046      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27047      # a path prefixed by /cygdrive for fixpath to work.
27048      new_path="$CYGWIN_ROOT_PATH$input_path"
27049    fi
27050  fi
27051
27052  # remove trailing .exe if any
27053  new_path="${new_path/%.exe/}"
27054
27055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27056
27057  # First separate the path from the arguments. This will split at the first
27058  # space.
27059  complete="$VS_ENV_CMD"
27060  path="${complete%% *}"
27061  tmp="$complete EOL"
27062  arguments="${tmp#* }"
27063
27064  # Input might be given as Windows format, start by converting to
27065  # unix format.
27066  new_path="$path"
27067
27068  windows_path="$new_path"
27069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27070    unix_path=`$CYGPATH -u "$windows_path"`
27071    new_path="$unix_path"
27072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27074    new_path="$unix_path"
27075  fi
27076
27077
27078  # Now try to locate executable using which
27079  new_path=`$WHICH "$new_path" 2> /dev/null`
27080
27081  if test "x$new_path" = x; then
27082    # Oops. Which didn't find the executable.
27083    # The splitting of arguments from the executable at a space might have been incorrect,
27084    # since paths with space are more likely in Windows. Give it another try with the whole
27085    # argument.
27086    path="$complete"
27087    arguments="EOL"
27088    new_path="$path"
27089
27090  windows_path="$new_path"
27091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27092    unix_path=`$CYGPATH -u "$windows_path"`
27093    new_path="$unix_path"
27094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27096    new_path="$unix_path"
27097  fi
27098
27099
27100    new_path=`$WHICH "$new_path" 2> /dev/null`
27101
27102    if test "x$new_path" = x; then
27103      # It's still not found. Now this is an unrecoverable error.
27104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27105$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27106      has_space=`$ECHO "$complete" | $GREP " "`
27107      if test "x$has_space" != x; then
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27110      fi
27111      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27112    fi
27113  fi
27114
27115  # Now new_path has a complete unix path to the binary
27116  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27117    # Keep paths in /bin as-is, but remove trailing .exe if any
27118    new_path="${new_path/%.exe/}"
27119    # Do not save /bin paths to all_fixpath_prefixes!
27120  else
27121    # Not in mixed or Windows style, start by that.
27122    new_path=`cmd //c echo $new_path`
27123
27124  input_path="$new_path"
27125  # Check if we need to convert this using DOS-style short mode. If the path
27126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27127  # take no chances and rewrite it.
27128  # Note: m4 eats our [], so we need to use [ and ] instead.
27129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27130  if test "x$has_forbidden_chars" != x; then
27131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27133  fi
27134
27135    # Output is in $new_path
27136
27137  windows_path="$new_path"
27138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27139    unix_path=`$CYGPATH -u "$windows_path"`
27140    new_path="$unix_path"
27141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27143    new_path="$unix_path"
27144  fi
27145
27146    # remove trailing .exe if any
27147    new_path="${new_path/%.exe/}"
27148
27149    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27150    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27151  fi
27152
27153  else
27154    # We're on a posix platform. Hooray! :)
27155    # First separate the path from the arguments. This will split at the first
27156    # space.
27157    complete="$VS_ENV_CMD"
27158    path="${complete%% *}"
27159    tmp="$complete EOL"
27160    arguments="${tmp#* }"
27161
27162    # Cannot rely on the command "which" here since it doesn't always work.
27163    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27164    if test -z "$is_absolute_path"; then
27165      # Path to executable is not absolute. Find it.
27166      IFS_save="$IFS"
27167      IFS=:
27168      for p in $PATH; do
27169        if test -f "$p/$path" && test -x "$p/$path"; then
27170          new_path="$p/$path"
27171          break
27172        fi
27173      done
27174      IFS="$IFS_save"
27175    else
27176      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
27177$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
27178      new_path="$path"
27179    fi
27180
27181    if test "x$new_path" = x; then
27182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27183$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27184      has_space=`$ECHO "$complete" | $GREP " "`
27185      if test "x$has_space" != x; then
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27188      fi
27189      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27190    fi
27191  fi
27192
27193  # Now join together the path and the arguments once again
27194  if test "x$arguments" != xEOL; then
27195    new_complete="$new_path ${arguments% *}"
27196  else
27197    new_complete="$new_path"
27198  fi
27199
27200  if test "x$complete" != "x$new_complete"; then
27201    VS_ENV_CMD="$new_complete"
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27203$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27204  fi
27205
27206
27207    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27208    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27209$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27210    cd $OUTPUT_ROOT
27211    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27212    # to autoconf standards.
27213
27214    #----
27215
27216    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27217    # but calculate the difference in Cygwin environment before/after running it and then
27218    # apply the diff.
27219
27220    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27221      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27222      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27223      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27224    else
27225      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27226      _dosbash=`cmd //c echo \`which bash\``
27227    fi
27228
27229    # generate the set of exported vars before/after the vs10 setup
27230    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27231    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27232    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27233    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27234
27235    # Now execute the newly created bat file.
27236    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27237    cmd /c localdevenvtmp.bat | cat
27238
27239    # apply the diff (less some non-vs10 vars named by "!")
27240    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27241    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27242    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27243
27244    # cleanup
27245    $RM localdevenvtmp*
27246    #----
27247    cd $CURDIR
27248    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27250$as_echo "no" >&6; }
27251      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27252$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27253      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27254$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27255      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27256$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27257      as_fn_error $? "Cannot continue" "$LINENO" 5
27258    fi
27259
27260    # Now set all paths and other env variables. This will allow the rest of
27261    # the configure script to find and run the compiler in the proper way.
27262    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27263$as_echo "$as_me: Setting extracted environment variables" >&6;}
27264    . $OUTPUT_ROOT/localdevenv.sh
27265  else
27266    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27267    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27268$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27269  fi
27270
27271  # At this point, we should have corrent variables in the environment, or we can't continue.
27272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27273$as_echo_n "checking for Visual Studio variables... " >&6; }
27274
27275  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27276    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27278$as_echo "present but broken" >&6; }
27279      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27280    else
27281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27282$as_echo "ok" >&6; }
27283      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27284      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27285      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27286      # Remove any paths containing # (typically F#) as that messes up make
27287      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27288      VS_PATH="$PATH"
27289
27290
27291
27292    fi
27293  else
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27295$as_echo "not found" >&6; }
27296
27297    if test "x$VS_ENV_CMD" = x; then
27298      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27299$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27300      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27301$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27302    else
27303      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27304$as_echo "$as_me: Running the extraction script failed." >&6;}
27305    fi
27306    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27307$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27308    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27309$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27310    as_fn_error $? "Cannot continue" "$LINENO" 5
27311  fi
27312
27313
27314
27315# Check whether --with-msvcr-dll was given.
27316if test "${with_msvcr_dll+set}" = set; then :
27317  withval=$with_msvcr_dll;
27318fi
27319
27320
27321  if test "x$with_msvcr_dll" != x; then
27322    # If given explicitely by user, do not probe. If not present, fail directly.
27323
27324  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
27325  METHOD="--with-msvcr-dll"
27326  if test -e "$POSSIBLE_MSVCR_DLL"; then
27327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27328$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27329
27330    # Need to check if the found msvcr is correct architecture
27331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27332$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27333    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27334    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27335      CORRECT_MSVCR_ARCH=386
27336    else
27337      CORRECT_MSVCR_ARCH=x86-64
27338    fi
27339    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27341$as_echo "ok" >&6; }
27342      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27344$as_echo_n "checking for msvcr100.dll... " >&6; }
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27346$as_echo "$MSVCR_DLL" >&6; }
27347    else
27348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27349$as_echo "incorrect, ignoring" >&6; }
27350      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27351$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27352    fi
27353  fi
27354
27355    if test "x$MSVCR_DLL" = x; then
27356      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
27357    fi
27358  fi
27359
27360  if test "x$MSVCR_DLL" = x; then
27361    # Probe: Using well-known location from Visual Studio 10.0
27362    if test "x$VCINSTALLDIR" != x; then
27363      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
27364
27365  windows_path="$CYGWIN_VC_INSTALL_DIR"
27366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27367    unix_path=`$CYGPATH -u "$windows_path"`
27368    CYGWIN_VC_INSTALL_DIR="$unix_path"
27369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27371    CYGWIN_VC_INSTALL_DIR="$unix_path"
27372  fi
27373
27374      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27375        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
27376      else
27377        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
27378      fi
27379
27380  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27381  METHOD="well-known location in VCINSTALLDIR"
27382  if test -e "$POSSIBLE_MSVCR_DLL"; then
27383    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27384$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27385
27386    # Need to check if the found msvcr is correct architecture
27387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27388$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27389    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27390    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27391      CORRECT_MSVCR_ARCH=386
27392    else
27393      CORRECT_MSVCR_ARCH=x86-64
27394    fi
27395    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27397$as_echo "ok" >&6; }
27398      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27399      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27400$as_echo_n "checking for msvcr100.dll... " >&6; }
27401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27402$as_echo "$MSVCR_DLL" >&6; }
27403    else
27404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27405$as_echo "incorrect, ignoring" >&6; }
27406      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27407$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27408    fi
27409  fi
27410
27411    fi
27412  fi
27413
27414  if test "x$MSVCR_DLL" = x; then
27415    # Probe: Check in the Boot JDK directory.
27416    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
27417
27418  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27419  METHOD="well-known location in Boot JDK"
27420  if test -e "$POSSIBLE_MSVCR_DLL"; then
27421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27422$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27423
27424    # Need to check if the found msvcr is correct architecture
27425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27426$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27427    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27428    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27429      CORRECT_MSVCR_ARCH=386
27430    else
27431      CORRECT_MSVCR_ARCH=x86-64
27432    fi
27433    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27435$as_echo "ok" >&6; }
27436      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27437      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27438$as_echo_n "checking for msvcr100.dll... " >&6; }
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27440$as_echo "$MSVCR_DLL" >&6; }
27441    else
27442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27443$as_echo "incorrect, ignoring" >&6; }
27444      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27445$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27446    fi
27447  fi
27448
27449  fi
27450
27451  if test "x$MSVCR_DLL" = x; then
27452    # Probe: Look in the Windows system32 directory
27453    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
27454
27455  windows_path="$CYGWIN_SYSTEMROOT"
27456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27457    unix_path=`$CYGPATH -u "$windows_path"`
27458    CYGWIN_SYSTEMROOT="$unix_path"
27459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27461    CYGWIN_SYSTEMROOT="$unix_path"
27462  fi
27463
27464    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
27465
27466  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27467  METHOD="well-known location in SYSTEMROOT"
27468  if test -e "$POSSIBLE_MSVCR_DLL"; then
27469    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27470$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27471
27472    # Need to check if the found msvcr is correct architecture
27473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27474$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27475    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27476    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27477      CORRECT_MSVCR_ARCH=386
27478    else
27479      CORRECT_MSVCR_ARCH=x86-64
27480    fi
27481    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27483$as_echo "ok" >&6; }
27484      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27486$as_echo_n "checking for msvcr100.dll... " >&6; }
27487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27488$as_echo "$MSVCR_DLL" >&6; }
27489    else
27490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27491$as_echo "incorrect, ignoring" >&6; }
27492      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27493$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27494    fi
27495  fi
27496
27497  fi
27498
27499  if test "x$MSVCR_DLL" = x; then
27500    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
27501    if test "x$VS100COMNTOOLS" != x; then
27502      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
27503
27504  windows_path="$CYGWIN_VS_TOOLS_DIR"
27505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27506    unix_path=`$CYGPATH -u "$windows_path"`
27507    CYGWIN_VS_TOOLS_DIR="$unix_path"
27508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27510    CYGWIN_VS_TOOLS_DIR="$unix_path"
27511  fi
27512
27513      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27514        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
27515      else
27516        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
27517      fi
27518
27519  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27520  METHOD="search of VS100COMNTOOLS"
27521  if test -e "$POSSIBLE_MSVCR_DLL"; then
27522    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27523$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27524
27525    # Need to check if the found msvcr is correct architecture
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27527$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27528    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27529    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27530      CORRECT_MSVCR_ARCH=386
27531    else
27532      CORRECT_MSVCR_ARCH=x86-64
27533    fi
27534    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27536$as_echo "ok" >&6; }
27537      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27539$as_echo_n "checking for msvcr100.dll... " >&6; }
27540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27541$as_echo "$MSVCR_DLL" >&6; }
27542    else
27543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27544$as_echo "incorrect, ignoring" >&6; }
27545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27546$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27547    fi
27548  fi
27549
27550    fi
27551  fi
27552
27553  if test "x$MSVCR_DLL" = x; then
27554    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
27555    # (This was the original behaviour; kept since it might turn up something)
27556    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
27557      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27558        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
27559      else
27560        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
27561        if test "x$POSSIBLE_MSVCR_DLL" = x; then
27562          # We're grasping at straws now...
27563          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
27564        fi
27565      fi
27566
27567
27568  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27569  METHOD="search of VCINSTALLDIR"
27570  if test -e "$POSSIBLE_MSVCR_DLL"; then
27571    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27572$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27573
27574    # Need to check if the found msvcr is correct architecture
27575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27576$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27577    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27578    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27579      CORRECT_MSVCR_ARCH=386
27580    else
27581      CORRECT_MSVCR_ARCH=x86-64
27582    fi
27583    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27585$as_echo "ok" >&6; }
27586      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27587      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27588$as_echo_n "checking for msvcr100.dll... " >&6; }
27589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27590$as_echo "$MSVCR_DLL" >&6; }
27591    else
27592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27593$as_echo "incorrect, ignoring" >&6; }
27594      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27595$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27596    fi
27597  fi
27598
27599    fi
27600  fi
27601
27602  if test "x$MSVCR_DLL" = x; then
27603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27604$as_echo_n "checking for msvcr100.dll... " >&6; }
27605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27606$as_echo "no" >&6; }
27607    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
27608  fi
27609
27610
27611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27612
27613  # Input might be given as Windows format, start by converting to
27614  # unix format.
27615  path="$MSVCR_DLL"
27616  new_path=`$CYGPATH -u "$path"`
27617
27618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27621  # "foo.exe" is OK but "foo" is an error.
27622  #
27623  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27624  # It is also a way to make sure we got the proper file name for the real test later on.
27625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27626  if test "x$test_shortpath" = x; then
27627    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27628$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27629    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
27630  fi
27631
27632  # Call helper function which possibly converts this using DOS-style short mode.
27633  # If so, the updated path is stored in $new_path.
27634
27635  input_path="$new_path"
27636  # Check if we need to convert this using DOS-style short mode. If the path
27637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27638  # take no chances and rewrite it.
27639  # Note: m4 eats our [], so we need to use [ and ] instead.
27640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27641  if test "x$has_forbidden_chars" != x; then
27642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27646      # Going to short mode and back again did indeed matter. Since short mode is
27647      # case insensitive, let's make it lowercase to improve readability.
27648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27649      # Now convert it back to Unix-stile (cygpath)
27650      input_path=`$CYGPATH -u "$shortmode_path"`
27651      new_path="$input_path"
27652    fi
27653  fi
27654
27655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27656  if test "x$test_cygdrive_prefix" = x; then
27657    # As a simple fix, exclude /usr/bin since it's not a real path.
27658    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27660      # a path prefixed by /cygdrive for fixpath to work.
27661      new_path="$CYGWIN_ROOT_PATH$input_path"
27662    fi
27663  fi
27664
27665
27666  if test "x$path" != "x$new_path"; then
27667    MSVCR_DLL="$new_path"
27668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27669$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27670  fi
27671
27672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673
27674  path="$MSVCR_DLL"
27675  has_colon=`$ECHO $path | $GREP ^.:`
27676  new_path="$path"
27677  if test "x$has_colon" = x; then
27678    # Not in mixed or Windows style, start by that.
27679    new_path=`cmd //c echo $path`
27680  fi
27681
27682
27683  input_path="$new_path"
27684  # Check if we need to convert this using DOS-style short mode. If the path
27685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27686  # take no chances and rewrite it.
27687  # Note: m4 eats our [], so we need to use [ and ] instead.
27688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27689  if test "x$has_forbidden_chars" != x; then
27690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27691    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27692  fi
27693
27694
27695  windows_path="$new_path"
27696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27697    unix_path=`$CYGPATH -u "$windows_path"`
27698    new_path="$unix_path"
27699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27701    new_path="$unix_path"
27702  fi
27703
27704  if test "x$path" != "x$new_path"; then
27705    MSVCR_DLL="$new_path"
27706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27707$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27708  fi
27709
27710  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27711  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27712
27713  else
27714    # We're on a posix platform. Hooray! :)
27715    path="$MSVCR_DLL"
27716    has_space=`$ECHO "$path" | $GREP " "`
27717    if test "x$has_space" != x; then
27718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27719$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27721    fi
27722
27723    # Use eval to expand a potential ~
27724    eval path="$path"
27725    if test ! -f "$path" && test ! -d "$path"; then
27726      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
27727    fi
27728
27729    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
27730  fi
27731
27732
27733
27734
27735# Check whether --with-dxsdk was given.
27736if test "${with_dxsdk+set}" = set; then :
27737  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
27738$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
27739fi
27740
27741
27742
27743
27744# Check whether --with-dxsdk-lib was given.
27745if test "${with_dxsdk_lib+set}" = set; then :
27746  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
27747$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
27748fi
27749
27750
27751
27752
27753# Check whether --with-dxsdk-include was given.
27754if test "${with_dxsdk_include+set}" = set; then :
27755  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
27756$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
27757fi
27758
27759
27760  fi
27761
27762
27763
27764  # If --build AND --host is set, then the configure script will find any
27765  # cross compilation tools in the PATH. Cross compilation tools
27766  # follows the cross compilation standard where they are prefixed with ${host}.
27767  # For example the binary i686-sun-solaris2.10-gcc
27768  # will cross compile for i686-sun-solaris2.10
27769  # If neither of build and host is not set, then build=host and the
27770  # default compiler found in the path will be used.
27771  # Setting only --host, does not seem to be really supported.
27772  # Please set both --build and --host if you want to cross compile.
27773
27774  if test "x$COMPILE_TYPE" = "xcross"; then
27775    # Now we to find a C/C++ compiler that can build executables for the build
27776    # platform. We can't use the AC_PROG_CC macro, since it can only be used
27777    # once. Also, we need to do this before adding a tools dir to the path,
27778    # otherwise we might pick up cross-compilers which don't use standard naming.
27779    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
27780    # to wait until they are properly discovered.
27781
27782
27783  # Publish this variable in the help.
27784
27785
27786  if test "x$BUILD_CC" = x; then
27787    # The variable is not set by user, try to locate tool using the code snippet
27788    for ac_prog in cl cc gcc
27789do
27790  # Extract the first word of "$ac_prog", so it can be a program name with args.
27791set dummy $ac_prog; ac_word=$2
27792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27793$as_echo_n "checking for $ac_word... " >&6; }
27794if ${ac_cv_path_BUILD_CC+:} false; then :
27795  $as_echo_n "(cached) " >&6
27796else
27797  case $BUILD_CC in
27798  [\\/]* | ?:[\\/]*)
27799  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27800  ;;
27801  *)
27802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27803for as_dir in $PATH
27804do
27805  IFS=$as_save_IFS
27806  test -z "$as_dir" && as_dir=.
27807    for ac_exec_ext in '' $ac_executable_extensions; do
27808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27809    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27811    break 2
27812  fi
27813done
27814  done
27815IFS=$as_save_IFS
27816
27817  ;;
27818esac
27819fi
27820BUILD_CC=$ac_cv_path_BUILD_CC
27821if test -n "$BUILD_CC"; then
27822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27823$as_echo "$BUILD_CC" >&6; }
27824else
27825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27826$as_echo "no" >&6; }
27827fi
27828
27829
27830  test -n "$BUILD_CC" && break
27831done
27832
27833  else
27834    # The variable is set, but is it from the command line or the environment?
27835
27836    # Try to remove the string !BUILD_CC! from our list.
27837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
27838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27839      # If it failed, the variable was not from the command line. Ignore it,
27840      # but warn the user (except for BASH, which is always set by the calling BASH).
27841      if test "xBUILD_CC" != xBASH; then
27842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
27843$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
27844      fi
27845      # Try to locate tool using the code snippet
27846      for ac_prog in cl cc gcc
27847do
27848  # Extract the first word of "$ac_prog", so it can be a program name with args.
27849set dummy $ac_prog; ac_word=$2
27850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27851$as_echo_n "checking for $ac_word... " >&6; }
27852if ${ac_cv_path_BUILD_CC+:} false; then :
27853  $as_echo_n "(cached) " >&6
27854else
27855  case $BUILD_CC in
27856  [\\/]* | ?:[\\/]*)
27857  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27858  ;;
27859  *)
27860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27861for as_dir in $PATH
27862do
27863  IFS=$as_save_IFS
27864  test -z "$as_dir" && as_dir=.
27865    for ac_exec_ext in '' $ac_executable_extensions; do
27866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27867    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27869    break 2
27870  fi
27871done
27872  done
27873IFS=$as_save_IFS
27874
27875  ;;
27876esac
27877fi
27878BUILD_CC=$ac_cv_path_BUILD_CC
27879if test -n "$BUILD_CC"; then
27880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27881$as_echo "$BUILD_CC" >&6; }
27882else
27883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27884$as_echo "no" >&6; }
27885fi
27886
27887
27888  test -n "$BUILD_CC" && break
27889done
27890
27891    else
27892      # If it succeeded, then it was overridden by the user. We will use it
27893      # for the tool.
27894
27895      # First remove it from the list of overridden variables, so we can test
27896      # for unknown variables in the end.
27897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27898
27899      # Check if the provided tool contains a complete path.
27900      tool_specified="$BUILD_CC"
27901      tool_basename="${tool_specified##*/}"
27902      if test "x$tool_basename" = "x$tool_specified"; then
27903        # A command without a complete path is provided, search $PATH.
27904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
27905$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
27906        # Extract the first word of "$tool_basename", so it can be a program name with args.
27907set dummy $tool_basename; ac_word=$2
27908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27909$as_echo_n "checking for $ac_word... " >&6; }
27910if ${ac_cv_path_BUILD_CC+:} false; then :
27911  $as_echo_n "(cached) " >&6
27912else
27913  case $BUILD_CC in
27914  [\\/]* | ?:[\\/]*)
27915  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27916  ;;
27917  *)
27918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27919for as_dir in $PATH
27920do
27921  IFS=$as_save_IFS
27922  test -z "$as_dir" && as_dir=.
27923    for ac_exec_ext in '' $ac_executable_extensions; do
27924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27925    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27927    break 2
27928  fi
27929done
27930  done
27931IFS=$as_save_IFS
27932
27933  ;;
27934esac
27935fi
27936BUILD_CC=$ac_cv_path_BUILD_CC
27937if test -n "$BUILD_CC"; then
27938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27939$as_echo "$BUILD_CC" >&6; }
27940else
27941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27942$as_echo "no" >&6; }
27943fi
27944
27945
27946        if test "x$BUILD_CC" = x; then
27947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27948        fi
27949      else
27950        # Otherwise we believe it is a complete path. Use it as it is.
27951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
27952$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
27953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
27954$as_echo_n "checking for BUILD_CC... " >&6; }
27955        if test ! -x "$tool_specified"; then
27956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27957$as_echo "not found" >&6; }
27958          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
27959        fi
27960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27961$as_echo "$tool_specified" >&6; }
27962      fi
27963    fi
27964  fi
27965
27966
27967
27968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969
27970  # First separate the path from the arguments. This will split at the first
27971  # space.
27972  complete="$BUILD_CC"
27973  path="${complete%% *}"
27974  tmp="$complete EOL"
27975  arguments="${tmp#* }"
27976
27977  # Input might be given as Windows format, start by converting to
27978  # unix format.
27979  new_path=`$CYGPATH -u "$path"`
27980
27981  # Now try to locate executable using which
27982  new_path=`$WHICH "$new_path" 2> /dev/null`
27983  # bat and cmd files are not always considered executable in cygwin causing which
27984  # to not find them
27985  if test "x$new_path" = x \
27986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27988    new_path=`$CYGPATH -u "$path"`
27989  fi
27990  if test "x$new_path" = x; then
27991    # Oops. Which didn't find the executable.
27992    # The splitting of arguments from the executable at a space might have been incorrect,
27993    # since paths with space are more likely in Windows. Give it another try with the whole
27994    # argument.
27995    path="$complete"
27996    arguments="EOL"
27997    new_path=`$CYGPATH -u "$path"`
27998    new_path=`$WHICH "$new_path" 2> /dev/null`
27999    # bat and cmd files are not always considered executable in cygwin causing which
28000    # to not find them
28001    if test "x$new_path" = x \
28002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28004      new_path=`$CYGPATH -u "$path"`
28005    fi
28006    if test "x$new_path" = x; then
28007      # It's still not found. Now this is an unrecoverable error.
28008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28009$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28010      has_space=`$ECHO "$complete" | $GREP " "`
28011      if test "x$has_space" != x; then
28012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28014      fi
28015      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28016    fi
28017  fi
28018
28019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28022  # "foo.exe" is OK but "foo" is an error.
28023  #
28024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28025  # It is also a way to make sure we got the proper file name for the real test later on.
28026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28027  if test "x$test_shortpath" = x; then
28028    # Short path failed, file does not exist as specified.
28029    # Try adding .exe or .cmd
28030    if test -f "${new_path}.exe"; then
28031      input_to_shortpath="${new_path}.exe"
28032    elif test -f "${new_path}.cmd"; then
28033      input_to_shortpath="${new_path}.cmd"
28034    else
28035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
28036$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
28037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28039      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28040    fi
28041  else
28042    input_to_shortpath="$new_path"
28043  fi
28044
28045  # Call helper function which possibly converts this using DOS-style short mode.
28046  # If so, the updated path is stored in $new_path.
28047  new_path="$input_to_shortpath"
28048
28049  input_path="$input_to_shortpath"
28050  # Check if we need to convert this using DOS-style short mode. If the path
28051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28052  # take no chances and rewrite it.
28053  # Note: m4 eats our [], so we need to use [ and ] instead.
28054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28055  if test "x$has_forbidden_chars" != x; then
28056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28060      # Going to short mode and back again did indeed matter. Since short mode is
28061      # case insensitive, let's make it lowercase to improve readability.
28062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28063      # Now convert it back to Unix-stile (cygpath)
28064      input_path=`$CYGPATH -u "$shortmode_path"`
28065      new_path="$input_path"
28066    fi
28067  fi
28068
28069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28070  if test "x$test_cygdrive_prefix" = x; then
28071    # As a simple fix, exclude /usr/bin since it's not a real path.
28072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28074      # a path prefixed by /cygdrive for fixpath to work.
28075      new_path="$CYGWIN_ROOT_PATH$input_path"
28076    fi
28077  fi
28078
28079  # remove trailing .exe if any
28080  new_path="${new_path/%.exe/}"
28081
28082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28083
28084  # First separate the path from the arguments. This will split at the first
28085  # space.
28086  complete="$BUILD_CC"
28087  path="${complete%% *}"
28088  tmp="$complete EOL"
28089  arguments="${tmp#* }"
28090
28091  # Input might be given as Windows format, start by converting to
28092  # unix format.
28093  new_path="$path"
28094
28095  windows_path="$new_path"
28096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28097    unix_path=`$CYGPATH -u "$windows_path"`
28098    new_path="$unix_path"
28099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28101    new_path="$unix_path"
28102  fi
28103
28104
28105  # Now try to locate executable using which
28106  new_path=`$WHICH "$new_path" 2> /dev/null`
28107
28108  if test "x$new_path" = x; then
28109    # Oops. Which didn't find the executable.
28110    # The splitting of arguments from the executable at a space might have been incorrect,
28111    # since paths with space are more likely in Windows. Give it another try with the whole
28112    # argument.
28113    path="$complete"
28114    arguments="EOL"
28115    new_path="$path"
28116
28117  windows_path="$new_path"
28118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28119    unix_path=`$CYGPATH -u "$windows_path"`
28120    new_path="$unix_path"
28121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28123    new_path="$unix_path"
28124  fi
28125
28126
28127    new_path=`$WHICH "$new_path" 2> /dev/null`
28128
28129    if test "x$new_path" = x; then
28130      # It's still not found. Now this is an unrecoverable error.
28131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28132$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28133      has_space=`$ECHO "$complete" | $GREP " "`
28134      if test "x$has_space" != x; then
28135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28137      fi
28138      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28139    fi
28140  fi
28141
28142  # Now new_path has a complete unix path to the binary
28143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28144    # Keep paths in /bin as-is, but remove trailing .exe if any
28145    new_path="${new_path/%.exe/}"
28146    # Do not save /bin paths to all_fixpath_prefixes!
28147  else
28148    # Not in mixed or Windows style, start by that.
28149    new_path=`cmd //c echo $new_path`
28150
28151  input_path="$new_path"
28152  # Check if we need to convert this using DOS-style short mode. If the path
28153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28154  # take no chances and rewrite it.
28155  # Note: m4 eats our [], so we need to use [ and ] instead.
28156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28157  if test "x$has_forbidden_chars" != x; then
28158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160  fi
28161
28162    # Output is in $new_path
28163
28164  windows_path="$new_path"
28165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28166    unix_path=`$CYGPATH -u "$windows_path"`
28167    new_path="$unix_path"
28168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28170    new_path="$unix_path"
28171  fi
28172
28173    # remove trailing .exe if any
28174    new_path="${new_path/%.exe/}"
28175
28176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28178  fi
28179
28180  else
28181    # We're on a posix platform. Hooray! :)
28182    # First separate the path from the arguments. This will split at the first
28183    # space.
28184    complete="$BUILD_CC"
28185    path="${complete%% *}"
28186    tmp="$complete EOL"
28187    arguments="${tmp#* }"
28188
28189    # Cannot rely on the command "which" here since it doesn't always work.
28190    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28191    if test -z "$is_absolute_path"; then
28192      # Path to executable is not absolute. Find it.
28193      IFS_save="$IFS"
28194      IFS=:
28195      for p in $PATH; do
28196        if test -f "$p/$path" && test -x "$p/$path"; then
28197          new_path="$p/$path"
28198          break
28199        fi
28200      done
28201      IFS="$IFS_save"
28202    else
28203      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
28204$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
28205      new_path="$path"
28206    fi
28207
28208    if test "x$new_path" = x; then
28209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28210$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28211      has_space=`$ECHO "$complete" | $GREP " "`
28212      if test "x$has_space" != x; then
28213        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28214$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28215      fi
28216      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28217    fi
28218  fi
28219
28220  # Now join together the path and the arguments once again
28221  if test "x$arguments" != xEOL; then
28222    new_complete="$new_path ${arguments% *}"
28223  else
28224    new_complete="$new_path"
28225  fi
28226
28227  if test "x$complete" != "x$new_complete"; then
28228    BUILD_CC="$new_complete"
28229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
28230$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
28231  fi
28232
28233
28234
28235  # Publish this variable in the help.
28236
28237
28238  if test "x$BUILD_CXX" = x; then
28239    # The variable is not set by user, try to locate tool using the code snippet
28240    for ac_prog in cl CC g++
28241do
28242  # Extract the first word of "$ac_prog", so it can be a program name with args.
28243set dummy $ac_prog; ac_word=$2
28244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28245$as_echo_n "checking for $ac_word... " >&6; }
28246if ${ac_cv_path_BUILD_CXX+:} false; then :
28247  $as_echo_n "(cached) " >&6
28248else
28249  case $BUILD_CXX in
28250  [\\/]* | ?:[\\/]*)
28251  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28252  ;;
28253  *)
28254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28255for as_dir in $PATH
28256do
28257  IFS=$as_save_IFS
28258  test -z "$as_dir" && as_dir=.
28259    for ac_exec_ext in '' $ac_executable_extensions; do
28260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28261    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28263    break 2
28264  fi
28265done
28266  done
28267IFS=$as_save_IFS
28268
28269  ;;
28270esac
28271fi
28272BUILD_CXX=$ac_cv_path_BUILD_CXX
28273if test -n "$BUILD_CXX"; then
28274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28275$as_echo "$BUILD_CXX" >&6; }
28276else
28277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28278$as_echo "no" >&6; }
28279fi
28280
28281
28282  test -n "$BUILD_CXX" && break
28283done
28284
28285  else
28286    # The variable is set, but is it from the command line or the environment?
28287
28288    # Try to remove the string !BUILD_CXX! from our list.
28289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
28290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28291      # If it failed, the variable was not from the command line. Ignore it,
28292      # but warn the user (except for BASH, which is always set by the calling BASH).
28293      if test "xBUILD_CXX" != xBASH; then
28294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
28295$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
28296      fi
28297      # Try to locate tool using the code snippet
28298      for ac_prog in cl CC g++
28299do
28300  # Extract the first word of "$ac_prog", so it can be a program name with args.
28301set dummy $ac_prog; ac_word=$2
28302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28303$as_echo_n "checking for $ac_word... " >&6; }
28304if ${ac_cv_path_BUILD_CXX+:} false; then :
28305  $as_echo_n "(cached) " >&6
28306else
28307  case $BUILD_CXX in
28308  [\\/]* | ?:[\\/]*)
28309  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28310  ;;
28311  *)
28312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28313for as_dir in $PATH
28314do
28315  IFS=$as_save_IFS
28316  test -z "$as_dir" && as_dir=.
28317    for ac_exec_ext in '' $ac_executable_extensions; do
28318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28319    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28321    break 2
28322  fi
28323done
28324  done
28325IFS=$as_save_IFS
28326
28327  ;;
28328esac
28329fi
28330BUILD_CXX=$ac_cv_path_BUILD_CXX
28331if test -n "$BUILD_CXX"; then
28332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28333$as_echo "$BUILD_CXX" >&6; }
28334else
28335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28336$as_echo "no" >&6; }
28337fi
28338
28339
28340  test -n "$BUILD_CXX" && break
28341done
28342
28343    else
28344      # If it succeeded, then it was overridden by the user. We will use it
28345      # for the tool.
28346
28347      # First remove it from the list of overridden variables, so we can test
28348      # for unknown variables in the end.
28349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28350
28351      # Check if the provided tool contains a complete path.
28352      tool_specified="$BUILD_CXX"
28353      tool_basename="${tool_specified##*/}"
28354      if test "x$tool_basename" = "x$tool_specified"; then
28355        # A command without a complete path is provided, search $PATH.
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
28357$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
28358        # Extract the first word of "$tool_basename", so it can be a program name with args.
28359set dummy $tool_basename; ac_word=$2
28360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28361$as_echo_n "checking for $ac_word... " >&6; }
28362if ${ac_cv_path_BUILD_CXX+:} false; then :
28363  $as_echo_n "(cached) " >&6
28364else
28365  case $BUILD_CXX in
28366  [\\/]* | ?:[\\/]*)
28367  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28368  ;;
28369  *)
28370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28371for as_dir in $PATH
28372do
28373  IFS=$as_save_IFS
28374  test -z "$as_dir" && as_dir=.
28375    for ac_exec_ext in '' $ac_executable_extensions; do
28376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28377    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28379    break 2
28380  fi
28381done
28382  done
28383IFS=$as_save_IFS
28384
28385  ;;
28386esac
28387fi
28388BUILD_CXX=$ac_cv_path_BUILD_CXX
28389if test -n "$BUILD_CXX"; then
28390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28391$as_echo "$BUILD_CXX" >&6; }
28392else
28393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28394$as_echo "no" >&6; }
28395fi
28396
28397
28398        if test "x$BUILD_CXX" = x; then
28399          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28400        fi
28401      else
28402        # Otherwise we believe it is a complete path. Use it as it is.
28403        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
28404$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
28405        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
28406$as_echo_n "checking for BUILD_CXX... " >&6; }
28407        if test ! -x "$tool_specified"; then
28408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28409$as_echo "not found" >&6; }
28410          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
28411        fi
28412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28413$as_echo "$tool_specified" >&6; }
28414      fi
28415    fi
28416  fi
28417
28418
28419
28420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28421
28422  # First separate the path from the arguments. This will split at the first
28423  # space.
28424  complete="$BUILD_CXX"
28425  path="${complete%% *}"
28426  tmp="$complete EOL"
28427  arguments="${tmp#* }"
28428
28429  # Input might be given as Windows format, start by converting to
28430  # unix format.
28431  new_path=`$CYGPATH -u "$path"`
28432
28433  # Now try to locate executable using which
28434  new_path=`$WHICH "$new_path" 2> /dev/null`
28435  # bat and cmd files are not always considered executable in cygwin causing which
28436  # to not find them
28437  if test "x$new_path" = x \
28438      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28439      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28440    new_path=`$CYGPATH -u "$path"`
28441  fi
28442  if test "x$new_path" = x; then
28443    # Oops. Which didn't find the executable.
28444    # The splitting of arguments from the executable at a space might have been incorrect,
28445    # since paths with space are more likely in Windows. Give it another try with the whole
28446    # argument.
28447    path="$complete"
28448    arguments="EOL"
28449    new_path=`$CYGPATH -u "$path"`
28450    new_path=`$WHICH "$new_path" 2> /dev/null`
28451    # bat and cmd files are not always considered executable in cygwin causing which
28452    # to not find them
28453    if test "x$new_path" = x \
28454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28456      new_path=`$CYGPATH -u "$path"`
28457    fi
28458    if test "x$new_path" = x; then
28459      # It's still not found. Now this is an unrecoverable error.
28460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28461$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28462      has_space=`$ECHO "$complete" | $GREP " "`
28463      if test "x$has_space" != x; then
28464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28466      fi
28467      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28468    fi
28469  fi
28470
28471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28474  # "foo.exe" is OK but "foo" is an error.
28475  #
28476  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28477  # It is also a way to make sure we got the proper file name for the real test later on.
28478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28479  if test "x$test_shortpath" = x; then
28480    # Short path failed, file does not exist as specified.
28481    # Try adding .exe or .cmd
28482    if test -f "${new_path}.exe"; then
28483      input_to_shortpath="${new_path}.exe"
28484    elif test -f "${new_path}.cmd"; then
28485      input_to_shortpath="${new_path}.cmd"
28486    else
28487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
28488$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
28489      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28490$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28491      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28492    fi
28493  else
28494    input_to_shortpath="$new_path"
28495  fi
28496
28497  # Call helper function which possibly converts this using DOS-style short mode.
28498  # If so, the updated path is stored in $new_path.
28499  new_path="$input_to_shortpath"
28500
28501  input_path="$input_to_shortpath"
28502  # Check if we need to convert this using DOS-style short mode. If the path
28503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28504  # take no chances and rewrite it.
28505  # Note: m4 eats our [], so we need to use [ and ] instead.
28506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28507  if test "x$has_forbidden_chars" != x; then
28508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28512      # Going to short mode and back again did indeed matter. Since short mode is
28513      # case insensitive, let's make it lowercase to improve readability.
28514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28515      # Now convert it back to Unix-stile (cygpath)
28516      input_path=`$CYGPATH -u "$shortmode_path"`
28517      new_path="$input_path"
28518    fi
28519  fi
28520
28521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28522  if test "x$test_cygdrive_prefix" = x; then
28523    # As a simple fix, exclude /usr/bin since it's not a real path.
28524    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28526      # a path prefixed by /cygdrive for fixpath to work.
28527      new_path="$CYGWIN_ROOT_PATH$input_path"
28528    fi
28529  fi
28530
28531  # remove trailing .exe if any
28532  new_path="${new_path/%.exe/}"
28533
28534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28535
28536  # First separate the path from the arguments. This will split at the first
28537  # space.
28538  complete="$BUILD_CXX"
28539  path="${complete%% *}"
28540  tmp="$complete EOL"
28541  arguments="${tmp#* }"
28542
28543  # Input might be given as Windows format, start by converting to
28544  # unix format.
28545  new_path="$path"
28546
28547  windows_path="$new_path"
28548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28549    unix_path=`$CYGPATH -u "$windows_path"`
28550    new_path="$unix_path"
28551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28553    new_path="$unix_path"
28554  fi
28555
28556
28557  # Now try to locate executable using which
28558  new_path=`$WHICH "$new_path" 2> /dev/null`
28559
28560  if test "x$new_path" = x; then
28561    # Oops. Which didn't find the executable.
28562    # The splitting of arguments from the executable at a space might have been incorrect,
28563    # since paths with space are more likely in Windows. Give it another try with the whole
28564    # argument.
28565    path="$complete"
28566    arguments="EOL"
28567    new_path="$path"
28568
28569  windows_path="$new_path"
28570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28571    unix_path=`$CYGPATH -u "$windows_path"`
28572    new_path="$unix_path"
28573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28575    new_path="$unix_path"
28576  fi
28577
28578
28579    new_path=`$WHICH "$new_path" 2> /dev/null`
28580
28581    if test "x$new_path" = x; then
28582      # It's still not found. Now this is an unrecoverable error.
28583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28584$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28585      has_space=`$ECHO "$complete" | $GREP " "`
28586      if test "x$has_space" != x; then
28587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28589      fi
28590      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28591    fi
28592  fi
28593
28594  # Now new_path has a complete unix path to the binary
28595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28596    # Keep paths in /bin as-is, but remove trailing .exe if any
28597    new_path="${new_path/%.exe/}"
28598    # Do not save /bin paths to all_fixpath_prefixes!
28599  else
28600    # Not in mixed or Windows style, start by that.
28601    new_path=`cmd //c echo $new_path`
28602
28603  input_path="$new_path"
28604  # Check if we need to convert this using DOS-style short mode. If the path
28605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28606  # take no chances and rewrite it.
28607  # Note: m4 eats our [], so we need to use [ and ] instead.
28608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28609  if test "x$has_forbidden_chars" != x; then
28610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28612  fi
28613
28614    # Output is in $new_path
28615
28616  windows_path="$new_path"
28617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28618    unix_path=`$CYGPATH -u "$windows_path"`
28619    new_path="$unix_path"
28620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28622    new_path="$unix_path"
28623  fi
28624
28625    # remove trailing .exe if any
28626    new_path="${new_path/%.exe/}"
28627
28628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28630  fi
28631
28632  else
28633    # We're on a posix platform. Hooray! :)
28634    # First separate the path from the arguments. This will split at the first
28635    # space.
28636    complete="$BUILD_CXX"
28637    path="${complete%% *}"
28638    tmp="$complete EOL"
28639    arguments="${tmp#* }"
28640
28641    # Cannot rely on the command "which" here since it doesn't always work.
28642    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28643    if test -z "$is_absolute_path"; then
28644      # Path to executable is not absolute. Find it.
28645      IFS_save="$IFS"
28646      IFS=:
28647      for p in $PATH; do
28648        if test -f "$p/$path" && test -x "$p/$path"; then
28649          new_path="$p/$path"
28650          break
28651        fi
28652      done
28653      IFS="$IFS_save"
28654    else
28655      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
28656$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
28657      new_path="$path"
28658    fi
28659
28660    if test "x$new_path" = x; then
28661      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28662$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28663      has_space=`$ECHO "$complete" | $GREP " "`
28664      if test "x$has_space" != x; then
28665        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28666$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28667      fi
28668      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28669    fi
28670  fi
28671
28672  # Now join together the path and the arguments once again
28673  if test "x$arguments" != xEOL; then
28674    new_complete="$new_path ${arguments% *}"
28675  else
28676    new_complete="$new_path"
28677  fi
28678
28679  if test "x$complete" != "x$new_complete"; then
28680    BUILD_CXX="$new_complete"
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
28682$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
28683  fi
28684
28685
28686
28687  # Publish this variable in the help.
28688
28689
28690  if test "x$BUILD_LD" = x; then
28691    # The variable is not set by user, try to locate tool using the code snippet
28692    for ac_prog in ld
28693do
28694  # Extract the first word of "$ac_prog", so it can be a program name with args.
28695set dummy $ac_prog; ac_word=$2
28696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28697$as_echo_n "checking for $ac_word... " >&6; }
28698if ${ac_cv_path_BUILD_LD+:} false; then :
28699  $as_echo_n "(cached) " >&6
28700else
28701  case $BUILD_LD in
28702  [\\/]* | ?:[\\/]*)
28703  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28704  ;;
28705  *)
28706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28707for as_dir in $PATH
28708do
28709  IFS=$as_save_IFS
28710  test -z "$as_dir" && as_dir=.
28711    for ac_exec_ext in '' $ac_executable_extensions; do
28712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28713    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28715    break 2
28716  fi
28717done
28718  done
28719IFS=$as_save_IFS
28720
28721  ;;
28722esac
28723fi
28724BUILD_LD=$ac_cv_path_BUILD_LD
28725if test -n "$BUILD_LD"; then
28726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28727$as_echo "$BUILD_LD" >&6; }
28728else
28729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28730$as_echo "no" >&6; }
28731fi
28732
28733
28734  test -n "$BUILD_LD" && break
28735done
28736
28737  else
28738    # The variable is set, but is it from the command line or the environment?
28739
28740    # Try to remove the string !BUILD_LD! from our list.
28741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
28742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28743      # If it failed, the variable was not from the command line. Ignore it,
28744      # but warn the user (except for BASH, which is always set by the calling BASH).
28745      if test "xBUILD_LD" != xBASH; then
28746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
28747$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
28748      fi
28749      # Try to locate tool using the code snippet
28750      for ac_prog in ld
28751do
28752  # Extract the first word of "$ac_prog", so it can be a program name with args.
28753set dummy $ac_prog; ac_word=$2
28754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28755$as_echo_n "checking for $ac_word... " >&6; }
28756if ${ac_cv_path_BUILD_LD+:} false; then :
28757  $as_echo_n "(cached) " >&6
28758else
28759  case $BUILD_LD in
28760  [\\/]* | ?:[\\/]*)
28761  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28762  ;;
28763  *)
28764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28765for as_dir in $PATH
28766do
28767  IFS=$as_save_IFS
28768  test -z "$as_dir" && as_dir=.
28769    for ac_exec_ext in '' $ac_executable_extensions; do
28770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28771    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28773    break 2
28774  fi
28775done
28776  done
28777IFS=$as_save_IFS
28778
28779  ;;
28780esac
28781fi
28782BUILD_LD=$ac_cv_path_BUILD_LD
28783if test -n "$BUILD_LD"; then
28784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28785$as_echo "$BUILD_LD" >&6; }
28786else
28787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28788$as_echo "no" >&6; }
28789fi
28790
28791
28792  test -n "$BUILD_LD" && break
28793done
28794
28795    else
28796      # If it succeeded, then it was overridden by the user. We will use it
28797      # for the tool.
28798
28799      # First remove it from the list of overridden variables, so we can test
28800      # for unknown variables in the end.
28801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28802
28803      # Check if the provided tool contains a complete path.
28804      tool_specified="$BUILD_LD"
28805      tool_basename="${tool_specified##*/}"
28806      if test "x$tool_basename" = "x$tool_specified"; then
28807        # A command without a complete path is provided, search $PATH.
28808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
28809$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
28810        # Extract the first word of "$tool_basename", so it can be a program name with args.
28811set dummy $tool_basename; ac_word=$2
28812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28813$as_echo_n "checking for $ac_word... " >&6; }
28814if ${ac_cv_path_BUILD_LD+:} false; then :
28815  $as_echo_n "(cached) " >&6
28816else
28817  case $BUILD_LD in
28818  [\\/]* | ?:[\\/]*)
28819  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28820  ;;
28821  *)
28822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28823for as_dir in $PATH
28824do
28825  IFS=$as_save_IFS
28826  test -z "$as_dir" && as_dir=.
28827    for ac_exec_ext in '' $ac_executable_extensions; do
28828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28829    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28831    break 2
28832  fi
28833done
28834  done
28835IFS=$as_save_IFS
28836
28837  ;;
28838esac
28839fi
28840BUILD_LD=$ac_cv_path_BUILD_LD
28841if test -n "$BUILD_LD"; then
28842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28843$as_echo "$BUILD_LD" >&6; }
28844else
28845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28846$as_echo "no" >&6; }
28847fi
28848
28849
28850        if test "x$BUILD_LD" = x; then
28851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28852        fi
28853      else
28854        # Otherwise we believe it is a complete path. Use it as it is.
28855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
28856$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
28857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
28858$as_echo_n "checking for BUILD_LD... " >&6; }
28859        if test ! -x "$tool_specified"; then
28860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28861$as_echo "not found" >&6; }
28862          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
28863        fi
28864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28865$as_echo "$tool_specified" >&6; }
28866      fi
28867    fi
28868  fi
28869
28870
28871
28872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28873
28874  # First separate the path from the arguments. This will split at the first
28875  # space.
28876  complete="$BUILD_LD"
28877  path="${complete%% *}"
28878  tmp="$complete EOL"
28879  arguments="${tmp#* }"
28880
28881  # Input might be given as Windows format, start by converting to
28882  # unix format.
28883  new_path=`$CYGPATH -u "$path"`
28884
28885  # Now try to locate executable using which
28886  new_path=`$WHICH "$new_path" 2> /dev/null`
28887  # bat and cmd files are not always considered executable in cygwin causing which
28888  # to not find them
28889  if test "x$new_path" = x \
28890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28892    new_path=`$CYGPATH -u "$path"`
28893  fi
28894  if test "x$new_path" = x; then
28895    # Oops. Which didn't find the executable.
28896    # The splitting of arguments from the executable at a space might have been incorrect,
28897    # since paths with space are more likely in Windows. Give it another try with the whole
28898    # argument.
28899    path="$complete"
28900    arguments="EOL"
28901    new_path=`$CYGPATH -u "$path"`
28902    new_path=`$WHICH "$new_path" 2> /dev/null`
28903    # bat and cmd files are not always considered executable in cygwin causing which
28904    # to not find them
28905    if test "x$new_path" = x \
28906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28908      new_path=`$CYGPATH -u "$path"`
28909    fi
28910    if test "x$new_path" = x; then
28911      # It's still not found. Now this is an unrecoverable error.
28912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
28913$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
28914      has_space=`$ECHO "$complete" | $GREP " "`
28915      if test "x$has_space" != x; then
28916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28918      fi
28919      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28920    fi
28921  fi
28922
28923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28926  # "foo.exe" is OK but "foo" is an error.
28927  #
28928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28929  # It is also a way to make sure we got the proper file name for the real test later on.
28930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28931  if test "x$test_shortpath" = x; then
28932    # Short path failed, file does not exist as specified.
28933    # Try adding .exe or .cmd
28934    if test -f "${new_path}.exe"; then
28935      input_to_shortpath="${new_path}.exe"
28936    elif test -f "${new_path}.cmd"; then
28937      input_to_shortpath="${new_path}.cmd"
28938    else
28939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
28940$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
28941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28943      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28944    fi
28945  else
28946    input_to_shortpath="$new_path"
28947  fi
28948
28949  # Call helper function which possibly converts this using DOS-style short mode.
28950  # If so, the updated path is stored in $new_path.
28951  new_path="$input_to_shortpath"
28952
28953  input_path="$input_to_shortpath"
28954  # Check if we need to convert this using DOS-style short mode. If the path
28955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28956  # take no chances and rewrite it.
28957  # Note: m4 eats our [], so we need to use [ and ] instead.
28958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28959  if test "x$has_forbidden_chars" != x; then
28960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28964      # Going to short mode and back again did indeed matter. Since short mode is
28965      # case insensitive, let's make it lowercase to improve readability.
28966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28967      # Now convert it back to Unix-stile (cygpath)
28968      input_path=`$CYGPATH -u "$shortmode_path"`
28969      new_path="$input_path"
28970    fi
28971  fi
28972
28973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28974  if test "x$test_cygdrive_prefix" = x; then
28975    # As a simple fix, exclude /usr/bin since it's not a real path.
28976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28978      # a path prefixed by /cygdrive for fixpath to work.
28979      new_path="$CYGWIN_ROOT_PATH$input_path"
28980    fi
28981  fi
28982
28983  # remove trailing .exe if any
28984  new_path="${new_path/%.exe/}"
28985
28986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28987
28988  # First separate the path from the arguments. This will split at the first
28989  # space.
28990  complete="$BUILD_LD"
28991  path="${complete%% *}"
28992  tmp="$complete EOL"
28993  arguments="${tmp#* }"
28994
28995  # Input might be given as Windows format, start by converting to
28996  # unix format.
28997  new_path="$path"
28998
28999  windows_path="$new_path"
29000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29001    unix_path=`$CYGPATH -u "$windows_path"`
29002    new_path="$unix_path"
29003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29005    new_path="$unix_path"
29006  fi
29007
29008
29009  # Now try to locate executable using which
29010  new_path=`$WHICH "$new_path" 2> /dev/null`
29011
29012  if test "x$new_path" = x; then
29013    # Oops. Which didn't find the executable.
29014    # The splitting of arguments from the executable at a space might have been incorrect,
29015    # since paths with space are more likely in Windows. Give it another try with the whole
29016    # argument.
29017    path="$complete"
29018    arguments="EOL"
29019    new_path="$path"
29020
29021  windows_path="$new_path"
29022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29023    unix_path=`$CYGPATH -u "$windows_path"`
29024    new_path="$unix_path"
29025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29027    new_path="$unix_path"
29028  fi
29029
29030
29031    new_path=`$WHICH "$new_path" 2> /dev/null`
29032
29033    if test "x$new_path" = x; then
29034      # It's still not found. Now this is an unrecoverable error.
29035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29036$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29037      has_space=`$ECHO "$complete" | $GREP " "`
29038      if test "x$has_space" != x; then
29039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29041      fi
29042      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29043    fi
29044  fi
29045
29046  # Now new_path has a complete unix path to the binary
29047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29048    # Keep paths in /bin as-is, but remove trailing .exe if any
29049    new_path="${new_path/%.exe/}"
29050    # Do not save /bin paths to all_fixpath_prefixes!
29051  else
29052    # Not in mixed or Windows style, start by that.
29053    new_path=`cmd //c echo $new_path`
29054
29055  input_path="$new_path"
29056  # Check if we need to convert this using DOS-style short mode. If the path
29057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29058  # take no chances and rewrite it.
29059  # Note: m4 eats our [], so we need to use [ and ] instead.
29060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29061  if test "x$has_forbidden_chars" != x; then
29062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29064  fi
29065
29066    # Output is in $new_path
29067
29068  windows_path="$new_path"
29069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29070    unix_path=`$CYGPATH -u "$windows_path"`
29071    new_path="$unix_path"
29072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29074    new_path="$unix_path"
29075  fi
29076
29077    # remove trailing .exe if any
29078    new_path="${new_path/%.exe/}"
29079
29080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29082  fi
29083
29084  else
29085    # We're on a posix platform. Hooray! :)
29086    # First separate the path from the arguments. This will split at the first
29087    # space.
29088    complete="$BUILD_LD"
29089    path="${complete%% *}"
29090    tmp="$complete EOL"
29091    arguments="${tmp#* }"
29092
29093    # Cannot rely on the command "which" here since it doesn't always work.
29094    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29095    if test -z "$is_absolute_path"; then
29096      # Path to executable is not absolute. Find it.
29097      IFS_save="$IFS"
29098      IFS=:
29099      for p in $PATH; do
29100        if test -f "$p/$path" && test -x "$p/$path"; then
29101          new_path="$p/$path"
29102          break
29103        fi
29104      done
29105      IFS="$IFS_save"
29106    else
29107      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
29108$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
29109      new_path="$path"
29110    fi
29111
29112    if test "x$new_path" = x; then
29113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29114$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29115      has_space=`$ECHO "$complete" | $GREP " "`
29116      if test "x$has_space" != x; then
29117        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29118$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29119      fi
29120      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29121    fi
29122  fi
29123
29124  # Now join together the path and the arguments once again
29125  if test "x$arguments" != xEOL; then
29126    new_complete="$new_path ${arguments% *}"
29127  else
29128    new_complete="$new_path"
29129  fi
29130
29131  if test "x$complete" != "x$new_complete"; then
29132    BUILD_LD="$new_complete"
29133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
29134$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
29135  fi
29136
29137  fi
29138
29139
29140
29141
29142  # If a devkit is found on the builddeps server, then prepend its path to the
29143  # PATH variable. If there are cross compilers available in the devkit, these
29144  # will be found by AC_PROG_CC et al.
29145  DEVKIT=
29146
29147
29148  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29149    # Source the builddeps file again, to make sure it uses the latest variables!
29150    . $builddepsfile
29151    # Look for a target and build machine specific resource!
29152    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29153    if test "x$resource" = x; then
29154      # Ok, lets instead look for a target specific resource
29155      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
29156    fi
29157    if test "x$resource" = x; then
29158      # Ok, lets instead look for a build specific resource
29159      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
29160    fi
29161    if test "x$resource" = x; then
29162      # Ok, lets instead look for a generic resource
29163      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
29164      resource=${builddep_devkit}
29165    fi
29166    if test "x$resource" != x; then
29167      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
29168$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
29169      # If the resource in the builddeps.conf file is an existing directory,
29170      # for example /java/linux/cups
29171      if test -d ${resource}; then
29172        depdir=${resource}
29173      else
29174
29175  # devkit is for example mymodule
29176  # $resource is for example libs/general/libmymod_1_2_3.zip
29177  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29178  # $with_builddeps_dir is for example /localhome/builddeps
29179  # depdir is the name of the variable into which we store the depdir, eg MYMOD
29180  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29181  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29182  filename=`basename $resource`
29183  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29184  filebase=${filename%%.*}
29185  extension=${filename#*.}
29186  installdir=$with_builddeps_dir/$filebase
29187  if test ! -f $installdir/$filename.unpacked; then
29188    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
29189$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29190    if test ! -d $installdir; then
29191      mkdir -p $installdir
29192    fi
29193    if test ! -d $installdir; then
29194      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29195    fi
29196    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
29197    touch $tmpfile
29198    if test ! -f $tmpfile; then
29199      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29200    fi
29201
29202  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29203  # $tmpfile is the local file name for the downloaded file.
29204  VALID_TOOL=no
29205  if test "x$BDEPS_FTP" = xwget; then
29206    VALID_TOOL=yes
29207    wget -O $tmpfile $with_builddeps_server/$resource
29208  fi
29209  if test "x$BDEPS_FTP" = xlftp; then
29210    VALID_TOOL=yes
29211    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29212  fi
29213  if test "x$BDEPS_FTP" = xftp; then
29214    VALID_TOOL=yes
29215    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29216    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29217    FTPUSERPWD=${FTPSERVER%%@*}
29218    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29219      FTPUSER=${userpwd%%:*}
29220      FTPPWD=${userpwd#*@}
29221      FTPSERVER=${FTPSERVER#*@}
29222    else
29223      FTPUSER=ftp
29224      FTPPWD=ftp
29225    fi
29226    # the "pass" command does not work on some
29227    # ftp clients (read ftp.exe) but if it works,
29228    # passive mode is better!
29229    ( \
29230        echo "user $FTPUSER $FTPPWD"        ; \
29231        echo "pass"                         ; \
29232        echo "bin"                          ; \
29233        echo "get $FTPPATH $tmpfile"              ; \
29234    ) | ftp -in $FTPSERVER
29235  fi
29236  if test "x$VALID_TOOL" != xyes; then
29237    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29238  fi
29239
29240    mv $tmpfile $installdir/$filename
29241    if test ! -s $installdir/$filename; then
29242      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29243    fi
29244    case "$extension" in
29245      zip)  echo "Unzipping $installdir/$filename..."
29246        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29247        ;;
29248      tar.gz) echo "Untaring $installdir/$filename..."
29249        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29250        ;;
29251      tgz) echo "Untaring $installdir/$filename..."
29252        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29253        ;;
29254      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29255        ;;
29256    esac
29257  fi
29258  if test -f $installdir/$filename.unpacked; then
29259    depdir=$installdir
29260  fi
29261
29262      fi
29263      # Source the builddeps file again, because in the previous command, the depdir
29264      # was updated to point at the current build dependency install directory.
29265      . $builddepsfile
29266      # Now extract variables from the builddeps.conf files.
29267      theroot=${builddep_devkit_ROOT}
29268      thecflags=${builddep_devkit_CFLAGS}
29269      thelibs=${builddep_devkit_LIBS}
29270      if test "x$depdir" = x; then
29271        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
29272      fi
29273      DEVKIT=$depdir
29274      if test "x$theroot" != x; then
29275        DEVKIT="$theroot"
29276      fi
29277      if test "x$thecflags" != x; then
29278        DEVKIT_CFLAGS="$thecflags"
29279      fi
29280      if test "x$thelibs" != x; then
29281        DEVKIT_LIBS="$thelibs"
29282      fi
29283
29284        # Found devkit
29285        PATH="$DEVKIT/bin:$PATH"
29286        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
29287        if test "x$x_includes" = "xNONE"; then
29288          x_includes="$SYS_ROOT/usr/include/X11"
29289        fi
29290        if test "x$x_libraries" = "xNONE"; then
29291          x_libraries="$SYS_ROOT/usr/lib"
29292        fi
29293
29294
29295    fi
29296
29297  fi
29298
29299
29300  # Store the CFLAGS etal passed to the configure script.
29301  ORG_CFLAGS="$CFLAGS"
29302  ORG_CXXFLAGS="$CXXFLAGS"
29303  ORG_OBJCFLAGS="$OBJCFLAGS"
29304
29305  # autoconf magic only relies on PATH, so update it if tools dir is specified
29306  OLD_PATH="$PATH"
29307  if test "x$TOOLS_DIR" != x; then
29308    PATH=$TOOLS_DIR:$PATH
29309  fi
29310
29311
29312  ### Locate C compiler (CC)
29313
29314  # On windows, only cl.exe is supported.
29315  # On Solaris, cc is preferred to gcc.
29316  # Elsewhere, gcc is preferred to cc.
29317
29318  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29319    COMPILER_CHECK_LIST="cl"
29320  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29321    COMPILER_CHECK_LIST="cc gcc"
29322  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29323    # Do not probe for cc on AIX.
29324    COMPILER_CHECK_LIST="xlc_r"
29325  else
29326    COMPILER_CHECK_LIST="gcc cc"
29327  fi
29328
29329
29330  COMPILER_NAME=C
29331  SEARCH_LIST="$COMPILER_CHECK_LIST"
29332
29333  if test "x$CC" != x; then
29334    # User has supplied compiler name already, always let that override.
29335    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29336$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29337    if test "x`basename $CC`" = "x$CC"; then
29338      # A command without a complete path is provided, search $PATH.
29339
29340      for ac_prog in $CC
29341do
29342  # Extract the first word of "$ac_prog", so it can be a program name with args.
29343set dummy $ac_prog; ac_word=$2
29344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29345$as_echo_n "checking for $ac_word... " >&6; }
29346if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29347  $as_echo_n "(cached) " >&6
29348else
29349  case $POTENTIAL_CC in
29350  [\\/]* | ?:[\\/]*)
29351  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29352  ;;
29353  *)
29354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29355for as_dir in $PATH
29356do
29357  IFS=$as_save_IFS
29358  test -z "$as_dir" && as_dir=.
29359    for ac_exec_ext in '' $ac_executable_extensions; do
29360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29361    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29363    break 2
29364  fi
29365done
29366  done
29367IFS=$as_save_IFS
29368
29369  ;;
29370esac
29371fi
29372POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29373if test -n "$POTENTIAL_CC"; then
29374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29375$as_echo "$POTENTIAL_CC" >&6; }
29376else
29377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29378$as_echo "no" >&6; }
29379fi
29380
29381
29382  test -n "$POTENTIAL_CC" && break
29383done
29384
29385      if test "x$POTENTIAL_CC" != x; then
29386        CC=$POTENTIAL_CC
29387      else
29388        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29389      fi
29390    else
29391      # Otherwise it might already be a complete path
29392      if test ! -x "$CC"; then
29393        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29394      fi
29395    fi
29396  else
29397    # No user supplied value. Locate compiler ourselves
29398    CC=
29399    # If TOOLS_DIR is set, check for all compiler names in there first
29400    # before checking the rest of the PATH.
29401    if test -n "$TOOLS_DIR"; then
29402      PATH_save="$PATH"
29403      PATH="$TOOLS_DIR"
29404      for ac_prog in $SEARCH_LIST
29405do
29406  # Extract the first word of "$ac_prog", so it can be a program name with args.
29407set dummy $ac_prog; ac_word=$2
29408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29409$as_echo_n "checking for $ac_word... " >&6; }
29410if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
29411  $as_echo_n "(cached) " >&6
29412else
29413  case $TOOLS_DIR_CC in
29414  [\\/]* | ?:[\\/]*)
29415  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
29416  ;;
29417  *)
29418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29419for as_dir in $PATH
29420do
29421  IFS=$as_save_IFS
29422  test -z "$as_dir" && as_dir=.
29423    for ac_exec_ext in '' $ac_executable_extensions; do
29424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29425    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
29426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29427    break 2
29428  fi
29429done
29430  done
29431IFS=$as_save_IFS
29432
29433  ;;
29434esac
29435fi
29436TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
29437if test -n "$TOOLS_DIR_CC"; then
29438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
29439$as_echo "$TOOLS_DIR_CC" >&6; }
29440else
29441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29442$as_echo "no" >&6; }
29443fi
29444
29445
29446  test -n "$TOOLS_DIR_CC" && break
29447done
29448
29449      CC=$TOOLS_DIR_CC
29450      PATH="$PATH_save"
29451    fi
29452
29453    # AC_PATH_PROGS can't be run multiple times with the same variable,
29454    # so create a new name for this run.
29455    if test "x$CC" = x; then
29456      for ac_prog in $SEARCH_LIST
29457do
29458  # Extract the first word of "$ac_prog", so it can be a program name with args.
29459set dummy $ac_prog; ac_word=$2
29460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29461$as_echo_n "checking for $ac_word... " >&6; }
29462if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29463  $as_echo_n "(cached) " >&6
29464else
29465  case $POTENTIAL_CC in
29466  [\\/]* | ?:[\\/]*)
29467  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29468  ;;
29469  *)
29470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29471for as_dir in $PATH
29472do
29473  IFS=$as_save_IFS
29474  test -z "$as_dir" && as_dir=.
29475    for ac_exec_ext in '' $ac_executable_extensions; do
29476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29477    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29479    break 2
29480  fi
29481done
29482  done
29483IFS=$as_save_IFS
29484
29485  ;;
29486esac
29487fi
29488POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29489if test -n "$POTENTIAL_CC"; then
29490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29491$as_echo "$POTENTIAL_CC" >&6; }
29492else
29493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29494$as_echo "no" >&6; }
29495fi
29496
29497
29498  test -n "$POTENTIAL_CC" && break
29499done
29500
29501      CC=$POTENTIAL_CC
29502    fi
29503
29504    if test "x$CC" = x; then
29505
29506  # Print a helpful message on how to acquire the necessary build dependency.
29507  # devkit is the help tag: freetype, cups, pulse, alsa etc
29508  MISSING_DEPENDENCY=devkit
29509
29510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29511    cygwin_help $MISSING_DEPENDENCY
29512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29513    msys_help $MISSING_DEPENDENCY
29514  else
29515    PKGHANDLER_COMMAND=
29516
29517    case $PKGHANDLER in
29518      apt-get)
29519        apt_help     $MISSING_DEPENDENCY ;;
29520      yum)
29521        yum_help     $MISSING_DEPENDENCY ;;
29522      port)
29523        port_help    $MISSING_DEPENDENCY ;;
29524      pkgutil)
29525        pkgutil_help $MISSING_DEPENDENCY ;;
29526      pkgadd)
29527        pkgadd_help  $MISSING_DEPENDENCY ;;
29528    esac
29529
29530    if test "x$PKGHANDLER_COMMAND" != x; then
29531      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29532    fi
29533  fi
29534
29535      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29536    fi
29537  fi
29538
29539  # Now we have a compiler binary in CC. Make sure it's okay.
29540
29541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29542
29543  # First separate the path from the arguments. This will split at the first
29544  # space.
29545  complete="$CC"
29546  path="${complete%% *}"
29547  tmp="$complete EOL"
29548  arguments="${tmp#* }"
29549
29550  # Input might be given as Windows format, start by converting to
29551  # unix format.
29552  new_path=`$CYGPATH -u "$path"`
29553
29554  # Now try to locate executable using which
29555  new_path=`$WHICH "$new_path" 2> /dev/null`
29556  # bat and cmd files are not always considered executable in cygwin causing which
29557  # to not find them
29558  if test "x$new_path" = x \
29559      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29560      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29561    new_path=`$CYGPATH -u "$path"`
29562  fi
29563  if test "x$new_path" = x; then
29564    # Oops. Which didn't find the executable.
29565    # The splitting of arguments from the executable at a space might have been incorrect,
29566    # since paths with space are more likely in Windows. Give it another try with the whole
29567    # argument.
29568    path="$complete"
29569    arguments="EOL"
29570    new_path=`$CYGPATH -u "$path"`
29571    new_path=`$WHICH "$new_path" 2> /dev/null`
29572    # bat and cmd files are not always considered executable in cygwin causing which
29573    # to not find them
29574    if test "x$new_path" = x \
29575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29577      new_path=`$CYGPATH -u "$path"`
29578    fi
29579    if test "x$new_path" = x; then
29580      # It's still not found. Now this is an unrecoverable error.
29581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29582$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29583      has_space=`$ECHO "$complete" | $GREP " "`
29584      if test "x$has_space" != x; then
29585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29587      fi
29588      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29589    fi
29590  fi
29591
29592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29595  # "foo.exe" is OK but "foo" is an error.
29596  #
29597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29598  # It is also a way to make sure we got the proper file name for the real test later on.
29599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29600  if test "x$test_shortpath" = x; then
29601    # Short path failed, file does not exist as specified.
29602    # Try adding .exe or .cmd
29603    if test -f "${new_path}.exe"; then
29604      input_to_shortpath="${new_path}.exe"
29605    elif test -f "${new_path}.cmd"; then
29606      input_to_shortpath="${new_path}.cmd"
29607    else
29608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29609$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29612      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29613    fi
29614  else
29615    input_to_shortpath="$new_path"
29616  fi
29617
29618  # Call helper function which possibly converts this using DOS-style short mode.
29619  # If so, the updated path is stored in $new_path.
29620  new_path="$input_to_shortpath"
29621
29622  input_path="$input_to_shortpath"
29623  # Check if we need to convert this using DOS-style short mode. If the path
29624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29625  # take no chances and rewrite it.
29626  # Note: m4 eats our [], so we need to use [ and ] instead.
29627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29628  if test "x$has_forbidden_chars" != x; then
29629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29633      # Going to short mode and back again did indeed matter. Since short mode is
29634      # case insensitive, let's make it lowercase to improve readability.
29635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29636      # Now convert it back to Unix-stile (cygpath)
29637      input_path=`$CYGPATH -u "$shortmode_path"`
29638      new_path="$input_path"
29639    fi
29640  fi
29641
29642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29643  if test "x$test_cygdrive_prefix" = x; then
29644    # As a simple fix, exclude /usr/bin since it's not a real path.
29645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29647      # a path prefixed by /cygdrive for fixpath to work.
29648      new_path="$CYGWIN_ROOT_PATH$input_path"
29649    fi
29650  fi
29651
29652  # remove trailing .exe if any
29653  new_path="${new_path/%.exe/}"
29654
29655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29656
29657  # First separate the path from the arguments. This will split at the first
29658  # space.
29659  complete="$CC"
29660  path="${complete%% *}"
29661  tmp="$complete EOL"
29662  arguments="${tmp#* }"
29663
29664  # Input might be given as Windows format, start by converting to
29665  # unix format.
29666  new_path="$path"
29667
29668  windows_path="$new_path"
29669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29670    unix_path=`$CYGPATH -u "$windows_path"`
29671    new_path="$unix_path"
29672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29674    new_path="$unix_path"
29675  fi
29676
29677
29678  # Now try to locate executable using which
29679  new_path=`$WHICH "$new_path" 2> /dev/null`
29680
29681  if test "x$new_path" = x; then
29682    # Oops. Which didn't find the executable.
29683    # The splitting of arguments from the executable at a space might have been incorrect,
29684    # since paths with space are more likely in Windows. Give it another try with the whole
29685    # argument.
29686    path="$complete"
29687    arguments="EOL"
29688    new_path="$path"
29689
29690  windows_path="$new_path"
29691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29692    unix_path=`$CYGPATH -u "$windows_path"`
29693    new_path="$unix_path"
29694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29696    new_path="$unix_path"
29697  fi
29698
29699
29700    new_path=`$WHICH "$new_path" 2> /dev/null`
29701
29702    if test "x$new_path" = x; then
29703      # It's still not found. Now this is an unrecoverable error.
29704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29705$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29706      has_space=`$ECHO "$complete" | $GREP " "`
29707      if test "x$has_space" != x; then
29708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29710      fi
29711      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29712    fi
29713  fi
29714
29715  # Now new_path has a complete unix path to the binary
29716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29717    # Keep paths in /bin as-is, but remove trailing .exe if any
29718    new_path="${new_path/%.exe/}"
29719    # Do not save /bin paths to all_fixpath_prefixes!
29720  else
29721    # Not in mixed or Windows style, start by that.
29722    new_path=`cmd //c echo $new_path`
29723
29724  input_path="$new_path"
29725  # Check if we need to convert this using DOS-style short mode. If the path
29726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29727  # take no chances and rewrite it.
29728  # Note: m4 eats our [], so we need to use [ and ] instead.
29729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29730  if test "x$has_forbidden_chars" != x; then
29731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29733  fi
29734
29735    # Output is in $new_path
29736
29737  windows_path="$new_path"
29738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29739    unix_path=`$CYGPATH -u "$windows_path"`
29740    new_path="$unix_path"
29741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29743    new_path="$unix_path"
29744  fi
29745
29746    # remove trailing .exe if any
29747    new_path="${new_path/%.exe/}"
29748
29749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29751  fi
29752
29753  else
29754    # We're on a posix platform. Hooray! :)
29755    # First separate the path from the arguments. This will split at the first
29756    # space.
29757    complete="$CC"
29758    path="${complete%% *}"
29759    tmp="$complete EOL"
29760    arguments="${tmp#* }"
29761
29762    # Cannot rely on the command "which" here since it doesn't always work.
29763    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29764    if test -z "$is_absolute_path"; then
29765      # Path to executable is not absolute. Find it.
29766      IFS_save="$IFS"
29767      IFS=:
29768      for p in $PATH; do
29769        if test -f "$p/$path" && test -x "$p/$path"; then
29770          new_path="$p/$path"
29771          break
29772        fi
29773      done
29774      IFS="$IFS_save"
29775    else
29776      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
29777$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
29778      new_path="$path"
29779    fi
29780
29781    if test "x$new_path" = x; then
29782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29783$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29784      has_space=`$ECHO "$complete" | $GREP " "`
29785      if test "x$has_space" != x; then
29786        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29788      fi
29789      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29790    fi
29791  fi
29792
29793  # Now join together the path and the arguments once again
29794  if test "x$arguments" != xEOL; then
29795    new_complete="$new_path ${arguments% *}"
29796  else
29797    new_complete="$new_path"
29798  fi
29799
29800  if test "x$complete" != "x$new_complete"; then
29801    CC="$new_complete"
29802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29803$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29804  fi
29805
29806  TEST_COMPILER="$CC"
29807  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29808  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29809  if test "x$OPENJDK_BUILD_OS" != xaix; then
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29811$as_echo_n "checking resolved symbolic links for CC... " >&6; }
29812
29813  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29814    # Follow a chain of symbolic links. Use readlink
29815    # where it exists, else fall back to horribly
29816    # complicated shell code.
29817    if test "x$READLINK_TESTED" != yes; then
29818      # On MacOSX there is a readlink tool with a different
29819      # purpose than the GNU readlink tool. Check the found readlink.
29820      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29821      if test "x$ISGNU" = x; then
29822        # A readlink that we do not know how to use.
29823        # Are there other non-GNU readlinks out there?
29824        READLINK_TESTED=yes
29825        READLINK=
29826      fi
29827    fi
29828
29829    if test "x$READLINK" != x; then
29830      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29831    else
29832      # Save the current directory for restoring afterwards
29833      STARTDIR=$PWD
29834      COUNTER=0
29835      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29836      sym_link_file=`$BASENAME $TEST_COMPILER`
29837      cd $sym_link_dir
29838      # Use -P flag to resolve symlinks in directories.
29839      cd `$THEPWDCMD -P`
29840      sym_link_dir=`$THEPWDCMD -P`
29841      # Resolve file symlinks
29842      while test $COUNTER -lt 20; do
29843        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29844        if test "x$ISLINK" == x; then
29845          # This is not a symbolic link! We are done!
29846          break
29847        fi
29848        # Again resolve directory symlinks since the target of the just found
29849        # link could be in a different directory
29850        cd `$DIRNAME $ISLINK`
29851        sym_link_dir=`$THEPWDCMD -P`
29852        sym_link_file=`$BASENAME $ISLINK`
29853        let COUNTER=COUNTER+1
29854      done
29855      cd $STARTDIR
29856      TEST_COMPILER=$sym_link_dir/$sym_link_file
29857    fi
29858  fi
29859
29860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29861$as_echo "$TEST_COMPILER" >&6; }
29862  fi
29863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29864$as_echo_n "checking if CC is disguised ccache... " >&6; }
29865
29866  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29867  if test "x$COMPILER_BASENAME" = "xccache"; then
29868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29869$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29870    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29871    # We want to control ccache invocation ourselves, so ignore this cc and try
29872    # searching again.
29873
29874    # Remove the path to the fake ccache cc from the PATH
29875    RETRY_COMPILER_SAVED_PATH="$PATH"
29876    COMPILER_DIRNAME=`$DIRNAME $CC`
29877    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29878
29879    # Try again looking for our compiler
29880    if test -n "$ac_tool_prefix"; then
29881  for ac_prog in $COMPILER_CHECK_LIST
29882  do
29883    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29884set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29886$as_echo_n "checking for $ac_word... " >&6; }
29887if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29888  $as_echo_n "(cached) " >&6
29889else
29890  if test -n "$PROPER_COMPILER_CC"; then
29891  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29892else
29893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29894for as_dir in $PATH
29895do
29896  IFS=$as_save_IFS
29897  test -z "$as_dir" && as_dir=.
29898    for ac_exec_ext in '' $ac_executable_extensions; do
29899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29900    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29902    break 2
29903  fi
29904done
29905  done
29906IFS=$as_save_IFS
29907
29908fi
29909fi
29910PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29911if test -n "$PROPER_COMPILER_CC"; then
29912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29913$as_echo "$PROPER_COMPILER_CC" >&6; }
29914else
29915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29916$as_echo "no" >&6; }
29917fi
29918
29919
29920    test -n "$PROPER_COMPILER_CC" && break
29921  done
29922fi
29923if test -z "$PROPER_COMPILER_CC"; then
29924  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29925  for ac_prog in $COMPILER_CHECK_LIST
29926do
29927  # Extract the first word of "$ac_prog", so it can be a program name with args.
29928set dummy $ac_prog; ac_word=$2
29929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29930$as_echo_n "checking for $ac_word... " >&6; }
29931if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29932  $as_echo_n "(cached) " >&6
29933else
29934  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29935  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29936else
29937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29938for as_dir in $PATH
29939do
29940  IFS=$as_save_IFS
29941  test -z "$as_dir" && as_dir=.
29942    for ac_exec_ext in '' $ac_executable_extensions; do
29943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29944    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29946    break 2
29947  fi
29948done
29949  done
29950IFS=$as_save_IFS
29951
29952fi
29953fi
29954ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29955if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29957$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29958else
29959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29960$as_echo "no" >&6; }
29961fi
29962
29963
29964  test -n "$ac_ct_PROPER_COMPILER_CC" && break
29965done
29966
29967  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29968    PROPER_COMPILER_CC=""
29969  else
29970    case $cross_compiling:$ac_tool_warned in
29971yes:)
29972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29974ac_tool_warned=yes ;;
29975esac
29976    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29977  fi
29978fi
29979
29980
29981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29982
29983  # First separate the path from the arguments. This will split at the first
29984  # space.
29985  complete="$PROPER_COMPILER_CC"
29986  path="${complete%% *}"
29987  tmp="$complete EOL"
29988  arguments="${tmp#* }"
29989
29990  # Input might be given as Windows format, start by converting to
29991  # unix format.
29992  new_path=`$CYGPATH -u "$path"`
29993
29994  # Now try to locate executable using which
29995  new_path=`$WHICH "$new_path" 2> /dev/null`
29996  # bat and cmd files are not always considered executable in cygwin causing which
29997  # to not find them
29998  if test "x$new_path" = x \
29999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30001    new_path=`$CYGPATH -u "$path"`
30002  fi
30003  if test "x$new_path" = x; then
30004    # Oops. Which didn't find the executable.
30005    # The splitting of arguments from the executable at a space might have been incorrect,
30006    # since paths with space are more likely in Windows. Give it another try with the whole
30007    # argument.
30008    path="$complete"
30009    arguments="EOL"
30010    new_path=`$CYGPATH -u "$path"`
30011    new_path=`$WHICH "$new_path" 2> /dev/null`
30012    # bat and cmd files are not always considered executable in cygwin causing which
30013    # to not find them
30014    if test "x$new_path" = x \
30015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30017      new_path=`$CYGPATH -u "$path"`
30018    fi
30019    if test "x$new_path" = x; then
30020      # It's still not found. Now this is an unrecoverable error.
30021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30022$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30023      has_space=`$ECHO "$complete" | $GREP " "`
30024      if test "x$has_space" != x; then
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30027      fi
30028      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30029    fi
30030  fi
30031
30032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30035  # "foo.exe" is OK but "foo" is an error.
30036  #
30037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30038  # It is also a way to make sure we got the proper file name for the real test later on.
30039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30040  if test "x$test_shortpath" = x; then
30041    # Short path failed, file does not exist as specified.
30042    # Try adding .exe or .cmd
30043    if test -f "${new_path}.exe"; then
30044      input_to_shortpath="${new_path}.exe"
30045    elif test -f "${new_path}.cmd"; then
30046      input_to_shortpath="${new_path}.cmd"
30047    else
30048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
30049$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
30050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30052      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30053    fi
30054  else
30055    input_to_shortpath="$new_path"
30056  fi
30057
30058  # Call helper function which possibly converts this using DOS-style short mode.
30059  # If so, the updated path is stored in $new_path.
30060  new_path="$input_to_shortpath"
30061
30062  input_path="$input_to_shortpath"
30063  # Check if we need to convert this using DOS-style short mode. If the path
30064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30065  # take no chances and rewrite it.
30066  # Note: m4 eats our [], so we need to use [ and ] instead.
30067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30068  if test "x$has_forbidden_chars" != x; then
30069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30073      # Going to short mode and back again did indeed matter. Since short mode is
30074      # case insensitive, let's make it lowercase to improve readability.
30075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30076      # Now convert it back to Unix-stile (cygpath)
30077      input_path=`$CYGPATH -u "$shortmode_path"`
30078      new_path="$input_path"
30079    fi
30080  fi
30081
30082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30083  if test "x$test_cygdrive_prefix" = x; then
30084    # As a simple fix, exclude /usr/bin since it's not a real path.
30085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30087      # a path prefixed by /cygdrive for fixpath to work.
30088      new_path="$CYGWIN_ROOT_PATH$input_path"
30089    fi
30090  fi
30091
30092  # remove trailing .exe if any
30093  new_path="${new_path/%.exe/}"
30094
30095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30096
30097  # First separate the path from the arguments. This will split at the first
30098  # space.
30099  complete="$PROPER_COMPILER_CC"
30100  path="${complete%% *}"
30101  tmp="$complete EOL"
30102  arguments="${tmp#* }"
30103
30104  # Input might be given as Windows format, start by converting to
30105  # unix format.
30106  new_path="$path"
30107
30108  windows_path="$new_path"
30109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30110    unix_path=`$CYGPATH -u "$windows_path"`
30111    new_path="$unix_path"
30112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30114    new_path="$unix_path"
30115  fi
30116
30117
30118  # Now try to locate executable using which
30119  new_path=`$WHICH "$new_path" 2> /dev/null`
30120
30121  if test "x$new_path" = x; then
30122    # Oops. Which didn't find the executable.
30123    # The splitting of arguments from the executable at a space might have been incorrect,
30124    # since paths with space are more likely in Windows. Give it another try with the whole
30125    # argument.
30126    path="$complete"
30127    arguments="EOL"
30128    new_path="$path"
30129
30130  windows_path="$new_path"
30131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30132    unix_path=`$CYGPATH -u "$windows_path"`
30133    new_path="$unix_path"
30134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30136    new_path="$unix_path"
30137  fi
30138
30139
30140    new_path=`$WHICH "$new_path" 2> /dev/null`
30141
30142    if test "x$new_path" = x; then
30143      # It's still not found. Now this is an unrecoverable error.
30144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30145$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30146      has_space=`$ECHO "$complete" | $GREP " "`
30147      if test "x$has_space" != x; then
30148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30150      fi
30151      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30152    fi
30153  fi
30154
30155  # Now new_path has a complete unix path to the binary
30156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30157    # Keep paths in /bin as-is, but remove trailing .exe if any
30158    new_path="${new_path/%.exe/}"
30159    # Do not save /bin paths to all_fixpath_prefixes!
30160  else
30161    # Not in mixed or Windows style, start by that.
30162    new_path=`cmd //c echo $new_path`
30163
30164  input_path="$new_path"
30165  # Check if we need to convert this using DOS-style short mode. If the path
30166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30167  # take no chances and rewrite it.
30168  # Note: m4 eats our [], so we need to use [ and ] instead.
30169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30170  if test "x$has_forbidden_chars" != x; then
30171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30173  fi
30174
30175    # Output is in $new_path
30176
30177  windows_path="$new_path"
30178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30179    unix_path=`$CYGPATH -u "$windows_path"`
30180    new_path="$unix_path"
30181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30183    new_path="$unix_path"
30184  fi
30185
30186    # remove trailing .exe if any
30187    new_path="${new_path/%.exe/}"
30188
30189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30191  fi
30192
30193  else
30194    # We're on a posix platform. Hooray! :)
30195    # First separate the path from the arguments. This will split at the first
30196    # space.
30197    complete="$PROPER_COMPILER_CC"
30198    path="${complete%% *}"
30199    tmp="$complete EOL"
30200    arguments="${tmp#* }"
30201
30202    # Cannot rely on the command "which" here since it doesn't always work.
30203    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30204    if test -z "$is_absolute_path"; then
30205      # Path to executable is not absolute. Find it.
30206      IFS_save="$IFS"
30207      IFS=:
30208      for p in $PATH; do
30209        if test -f "$p/$path" && test -x "$p/$path"; then
30210          new_path="$p/$path"
30211          break
30212        fi
30213      done
30214      IFS="$IFS_save"
30215    else
30216      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
30217$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
30218      new_path="$path"
30219    fi
30220
30221    if test "x$new_path" = x; then
30222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30223$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30224      has_space=`$ECHO "$complete" | $GREP " "`
30225      if test "x$has_space" != x; then
30226        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30228      fi
30229      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30230    fi
30231  fi
30232
30233  # Now join together the path and the arguments once again
30234  if test "x$arguments" != xEOL; then
30235    new_complete="$new_path ${arguments% *}"
30236  else
30237    new_complete="$new_path"
30238  fi
30239
30240  if test "x$complete" != "x$new_complete"; then
30241    PROPER_COMPILER_CC="$new_complete"
30242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30243$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30244  fi
30245
30246    PATH="$RETRY_COMPILER_SAVED_PATH"
30247
30248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30249$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30250
30251  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30252    # Follow a chain of symbolic links. Use readlink
30253    # where it exists, else fall back to horribly
30254    # complicated shell code.
30255    if test "x$READLINK_TESTED" != yes; then
30256      # On MacOSX there is a readlink tool with a different
30257      # purpose than the GNU readlink tool. Check the found readlink.
30258      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30259      if test "x$ISGNU" = x; then
30260        # A readlink that we do not know how to use.
30261        # Are there other non-GNU readlinks out there?
30262        READLINK_TESTED=yes
30263        READLINK=
30264      fi
30265    fi
30266
30267    if test "x$READLINK" != x; then
30268      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30269    else
30270      # Save the current directory for restoring afterwards
30271      STARTDIR=$PWD
30272      COUNTER=0
30273      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30274      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30275      cd $sym_link_dir
30276      # Use -P flag to resolve symlinks in directories.
30277      cd `$THEPWDCMD -P`
30278      sym_link_dir=`$THEPWDCMD -P`
30279      # Resolve file symlinks
30280      while test $COUNTER -lt 20; do
30281        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30282        if test "x$ISLINK" == x; then
30283          # This is not a symbolic link! We are done!
30284          break
30285        fi
30286        # Again resolve directory symlinks since the target of the just found
30287        # link could be in a different directory
30288        cd `$DIRNAME $ISLINK`
30289        sym_link_dir=`$THEPWDCMD -P`
30290        sym_link_file=`$BASENAME $ISLINK`
30291        let COUNTER=COUNTER+1
30292      done
30293      cd $STARTDIR
30294      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30295    fi
30296  fi
30297
30298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30299$as_echo "$PROPER_COMPILER_CC" >&6; }
30300    CC="$PROPER_COMPILER_CC"
30301  else
30302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30303$as_echo "no, keeping CC" >&6; }
30304  fi
30305
30306
30307  COMPILER=$CC
30308  COMPILER_NAME=$COMPILER_NAME
30309
30310  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30311    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30312    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30313    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30314    if test $? -ne 0; then
30315      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30316
30317      { $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
30318$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30320$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30321      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30322    else
30323      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30324      COMPILER_VENDOR="Sun Studio"
30325    fi
30326  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30327      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30328      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30329      if test $? -ne 0; then
30330        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30331      else
30332        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30333        COMPILER_VENDOR='IBM'
30334      fi
30335  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30336    # First line typically looks something like:
30337    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30338    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30339    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30340    COMPILER_VENDOR="Microsoft CL.EXE"
30341    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30342    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30343      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30344        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30345      fi
30346    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30347      if test "x$COMPILER_CPU_TEST" != "xx64"; then
30348        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30349      fi
30350    fi
30351  else
30352    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30353    # Check that this is likely to be GCC.
30354    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30355    if test $? -ne 0; then
30356      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30357$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30359$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30360      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30361    fi
30362
30363    # First line typically looks something like:
30364    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30365    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30366    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30367  fi
30368  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30369  CC_VERSION="$COMPILER_VERSION"
30370  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30371  CC_VENDOR="$COMPILER_VENDOR"
30372
30373  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30374$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30375
30376
30377  # Now that we have resolved CC ourself, let autoconf have its go at it
30378  ac_ext=c
30379ac_cpp='$CPP $CPPFLAGS'
30380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30382ac_compiler_gnu=$ac_cv_c_compiler_gnu
30383if test -n "$ac_tool_prefix"; then
30384  for ac_prog in $CC
30385  do
30386    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30387set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30389$as_echo_n "checking for $ac_word... " >&6; }
30390if ${ac_cv_prog_CC+:} false; then :
30391  $as_echo_n "(cached) " >&6
30392else
30393  if test -n "$CC"; then
30394  ac_cv_prog_CC="$CC" # Let the user override the test.
30395else
30396as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30397for as_dir in $PATH
30398do
30399  IFS=$as_save_IFS
30400  test -z "$as_dir" && as_dir=.
30401    for ac_exec_ext in '' $ac_executable_extensions; do
30402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30403    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30405    break 2
30406  fi
30407done
30408  done
30409IFS=$as_save_IFS
30410
30411fi
30412fi
30413CC=$ac_cv_prog_CC
30414if test -n "$CC"; then
30415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30416$as_echo "$CC" >&6; }
30417else
30418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30419$as_echo "no" >&6; }
30420fi
30421
30422
30423    test -n "$CC" && break
30424  done
30425fi
30426if test -z "$CC"; then
30427  ac_ct_CC=$CC
30428  for ac_prog in $CC
30429do
30430  # Extract the first word of "$ac_prog", so it can be a program name with args.
30431set dummy $ac_prog; ac_word=$2
30432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30433$as_echo_n "checking for $ac_word... " >&6; }
30434if ${ac_cv_prog_ac_ct_CC+:} false; then :
30435  $as_echo_n "(cached) " >&6
30436else
30437  if test -n "$ac_ct_CC"; then
30438  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30439else
30440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30441for as_dir in $PATH
30442do
30443  IFS=$as_save_IFS
30444  test -z "$as_dir" && as_dir=.
30445    for ac_exec_ext in '' $ac_executable_extensions; do
30446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30447    ac_cv_prog_ac_ct_CC="$ac_prog"
30448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30449    break 2
30450  fi
30451done
30452  done
30453IFS=$as_save_IFS
30454
30455fi
30456fi
30457ac_ct_CC=$ac_cv_prog_ac_ct_CC
30458if test -n "$ac_ct_CC"; then
30459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30460$as_echo "$ac_ct_CC" >&6; }
30461else
30462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30463$as_echo "no" >&6; }
30464fi
30465
30466
30467  test -n "$ac_ct_CC" && break
30468done
30469
30470  if test "x$ac_ct_CC" = x; then
30471    CC=""
30472  else
30473    case $cross_compiling:$ac_tool_warned in
30474yes:)
30475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30477ac_tool_warned=yes ;;
30478esac
30479    CC=$ac_ct_CC
30480  fi
30481fi
30482
30483
30484test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30486as_fn_error $? "no acceptable C compiler found in \$PATH
30487See \`config.log' for more details" "$LINENO" 5; }
30488
30489# Provide some information about the compiler.
30490$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30491set X $ac_compile
30492ac_compiler=$2
30493for ac_option in --version -v -V -qversion; do
30494  { { ac_try="$ac_compiler $ac_option >&5"
30495case "(($ac_try" in
30496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30497  *) ac_try_echo=$ac_try;;
30498esac
30499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30500$as_echo "$ac_try_echo"; } >&5
30501  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30502  ac_status=$?
30503  if test -s conftest.err; then
30504    sed '10a\
30505... rest of stderr output deleted ...
30506         10q' conftest.err >conftest.er1
30507    cat conftest.er1 >&5
30508  fi
30509  rm -f conftest.er1 conftest.err
30510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30511  test $ac_status = 0; }
30512done
30513
30514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30515/* end confdefs.h.  */
30516
30517int
30518main ()
30519{
30520
30521  ;
30522  return 0;
30523}
30524_ACEOF
30525ac_clean_files_save=$ac_clean_files
30526ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30527# Try to create an executable without -o first, disregard a.out.
30528# It will help us diagnose broken compilers, and finding out an intuition
30529# of exeext.
30530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30531$as_echo_n "checking whether the C compiler works... " >&6; }
30532ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30533
30534# The possible output files:
30535ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30536
30537ac_rmfiles=
30538for ac_file in $ac_files
30539do
30540  case $ac_file in
30541    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30542    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30543  esac
30544done
30545rm -f $ac_rmfiles
30546
30547if { { ac_try="$ac_link_default"
30548case "(($ac_try" in
30549  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30550  *) ac_try_echo=$ac_try;;
30551esac
30552eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30553$as_echo "$ac_try_echo"; } >&5
30554  (eval "$ac_link_default") 2>&5
30555  ac_status=$?
30556  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30557  test $ac_status = 0; }; then :
30558  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30559# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30560# in a Makefile.  We should not override ac_cv_exeext if it was cached,
30561# so that the user can short-circuit this test for compilers unknown to
30562# Autoconf.
30563for ac_file in $ac_files ''
30564do
30565  test -f "$ac_file" || continue
30566  case $ac_file in
30567    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30568	;;
30569    [ab].out )
30570	# We found the default executable, but exeext='' is most
30571	# certainly right.
30572	break;;
30573    *.* )
30574	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30575	then :; else
30576	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30577	fi
30578	# We set ac_cv_exeext here because the later test for it is not
30579	# safe: cross compilers may not add the suffix if given an `-o'
30580	# argument, so we may need to know it at that point already.
30581	# Even if this section looks crufty: it has the advantage of
30582	# actually working.
30583	break;;
30584    * )
30585	break;;
30586  esac
30587done
30588test "$ac_cv_exeext" = no && ac_cv_exeext=
30589
30590else
30591  ac_file=''
30592fi
30593if test -z "$ac_file"; then :
30594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30595$as_echo "no" >&6; }
30596$as_echo "$as_me: failed program was:" >&5
30597sed 's/^/| /' conftest.$ac_ext >&5
30598
30599{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30601as_fn_error 77 "C compiler cannot create executables
30602See \`config.log' for more details" "$LINENO" 5; }
30603else
30604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30605$as_echo "yes" >&6; }
30606fi
30607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30608$as_echo_n "checking for C compiler default output file name... " >&6; }
30609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30610$as_echo "$ac_file" >&6; }
30611ac_exeext=$ac_cv_exeext
30612
30613rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30614ac_clean_files=$ac_clean_files_save
30615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30616$as_echo_n "checking for suffix of executables... " >&6; }
30617if { { ac_try="$ac_link"
30618case "(($ac_try" in
30619  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30620  *) ac_try_echo=$ac_try;;
30621esac
30622eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30623$as_echo "$ac_try_echo"; } >&5
30624  (eval "$ac_link") 2>&5
30625  ac_status=$?
30626  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30627  test $ac_status = 0; }; then :
30628  # If both `conftest.exe' and `conftest' are `present' (well, observable)
30629# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30630# work properly (i.e., refer to `conftest.exe'), while it won't with
30631# `rm'.
30632for ac_file in conftest.exe conftest conftest.*; do
30633  test -f "$ac_file" || continue
30634  case $ac_file in
30635    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30636    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30637	  break;;
30638    * ) break;;
30639  esac
30640done
30641else
30642  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30643$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30644as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30645See \`config.log' for more details" "$LINENO" 5; }
30646fi
30647rm -f conftest conftest$ac_cv_exeext
30648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30649$as_echo "$ac_cv_exeext" >&6; }
30650
30651rm -f conftest.$ac_ext
30652EXEEXT=$ac_cv_exeext
30653ac_exeext=$EXEEXT
30654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30655/* end confdefs.h.  */
30656#include <stdio.h>
30657int
30658main ()
30659{
30660FILE *f = fopen ("conftest.out", "w");
30661 return ferror (f) || fclose (f) != 0;
30662
30663  ;
30664  return 0;
30665}
30666_ACEOF
30667ac_clean_files="$ac_clean_files conftest.out"
30668# Check that the compiler produces executables we can run.  If not, either
30669# the compiler is broken, or we cross compile.
30670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30671$as_echo_n "checking whether we are cross compiling... " >&6; }
30672if test "$cross_compiling" != yes; then
30673  { { ac_try="$ac_link"
30674case "(($ac_try" in
30675  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30676  *) ac_try_echo=$ac_try;;
30677esac
30678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30679$as_echo "$ac_try_echo"; } >&5
30680  (eval "$ac_link") 2>&5
30681  ac_status=$?
30682  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30683  test $ac_status = 0; }
30684  if { ac_try='./conftest$ac_cv_exeext'
30685  { { case "(($ac_try" in
30686  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30687  *) ac_try_echo=$ac_try;;
30688esac
30689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30690$as_echo "$ac_try_echo"; } >&5
30691  (eval "$ac_try") 2>&5
30692  ac_status=$?
30693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30694  test $ac_status = 0; }; }; then
30695    cross_compiling=no
30696  else
30697    if test "$cross_compiling" = maybe; then
30698	cross_compiling=yes
30699    else
30700	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30702as_fn_error $? "cannot run C compiled programs.
30703If you meant to cross compile, use \`--host'.
30704See \`config.log' for more details" "$LINENO" 5; }
30705    fi
30706  fi
30707fi
30708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30709$as_echo "$cross_compiling" >&6; }
30710
30711rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30712ac_clean_files=$ac_clean_files_save
30713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30714$as_echo_n "checking for suffix of object files... " >&6; }
30715if ${ac_cv_objext+:} false; then :
30716  $as_echo_n "(cached) " >&6
30717else
30718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30719/* end confdefs.h.  */
30720
30721int
30722main ()
30723{
30724
30725  ;
30726  return 0;
30727}
30728_ACEOF
30729rm -f conftest.o conftest.obj
30730if { { ac_try="$ac_compile"
30731case "(($ac_try" in
30732  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30733  *) ac_try_echo=$ac_try;;
30734esac
30735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30736$as_echo "$ac_try_echo"; } >&5
30737  (eval "$ac_compile") 2>&5
30738  ac_status=$?
30739  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30740  test $ac_status = 0; }; then :
30741  for ac_file in conftest.o conftest.obj conftest.*; do
30742  test -f "$ac_file" || continue;
30743  case $ac_file in
30744    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30745    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30746       break;;
30747  esac
30748done
30749else
30750  $as_echo "$as_me: failed program was:" >&5
30751sed 's/^/| /' conftest.$ac_ext >&5
30752
30753{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30755as_fn_error $? "cannot compute suffix of object files: cannot compile
30756See \`config.log' for more details" "$LINENO" 5; }
30757fi
30758rm -f conftest.$ac_cv_objext conftest.$ac_ext
30759fi
30760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30761$as_echo "$ac_cv_objext" >&6; }
30762OBJEXT=$ac_cv_objext
30763ac_objext=$OBJEXT
30764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30765$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30766if ${ac_cv_c_compiler_gnu+:} false; then :
30767  $as_echo_n "(cached) " >&6
30768else
30769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30770/* end confdefs.h.  */
30771
30772int
30773main ()
30774{
30775#ifndef __GNUC__
30776       choke me
30777#endif
30778
30779  ;
30780  return 0;
30781}
30782_ACEOF
30783if ac_fn_c_try_compile "$LINENO"; then :
30784  ac_compiler_gnu=yes
30785else
30786  ac_compiler_gnu=no
30787fi
30788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30789ac_cv_c_compiler_gnu=$ac_compiler_gnu
30790
30791fi
30792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30793$as_echo "$ac_cv_c_compiler_gnu" >&6; }
30794if test $ac_compiler_gnu = yes; then
30795  GCC=yes
30796else
30797  GCC=
30798fi
30799ac_test_CFLAGS=${CFLAGS+set}
30800ac_save_CFLAGS=$CFLAGS
30801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30802$as_echo_n "checking whether $CC accepts -g... " >&6; }
30803if ${ac_cv_prog_cc_g+:} false; then :
30804  $as_echo_n "(cached) " >&6
30805else
30806  ac_save_c_werror_flag=$ac_c_werror_flag
30807   ac_c_werror_flag=yes
30808   ac_cv_prog_cc_g=no
30809   CFLAGS="-g"
30810   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30811/* end confdefs.h.  */
30812
30813int
30814main ()
30815{
30816
30817  ;
30818  return 0;
30819}
30820_ACEOF
30821if ac_fn_c_try_compile "$LINENO"; then :
30822  ac_cv_prog_cc_g=yes
30823else
30824  CFLAGS=""
30825      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30826/* end confdefs.h.  */
30827
30828int
30829main ()
30830{
30831
30832  ;
30833  return 0;
30834}
30835_ACEOF
30836if ac_fn_c_try_compile "$LINENO"; then :
30837
30838else
30839  ac_c_werror_flag=$ac_save_c_werror_flag
30840	 CFLAGS="-g"
30841	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30842/* end confdefs.h.  */
30843
30844int
30845main ()
30846{
30847
30848  ;
30849  return 0;
30850}
30851_ACEOF
30852if ac_fn_c_try_compile "$LINENO"; then :
30853  ac_cv_prog_cc_g=yes
30854fi
30855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30856fi
30857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30858fi
30859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30860   ac_c_werror_flag=$ac_save_c_werror_flag
30861fi
30862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30863$as_echo "$ac_cv_prog_cc_g" >&6; }
30864if test "$ac_test_CFLAGS" = set; then
30865  CFLAGS=$ac_save_CFLAGS
30866elif test $ac_cv_prog_cc_g = yes; then
30867  if test "$GCC" = yes; then
30868    CFLAGS="-g -O2"
30869  else
30870    CFLAGS="-g"
30871  fi
30872else
30873  if test "$GCC" = yes; then
30874    CFLAGS="-O2"
30875  else
30876    CFLAGS=
30877  fi
30878fi
30879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30880$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30881if ${ac_cv_prog_cc_c89+:} false; then :
30882  $as_echo_n "(cached) " >&6
30883else
30884  ac_cv_prog_cc_c89=no
30885ac_save_CC=$CC
30886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30887/* end confdefs.h.  */
30888#include <stdarg.h>
30889#include <stdio.h>
30890struct stat;
30891/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30892struct buf { int x; };
30893FILE * (*rcsopen) (struct buf *, struct stat *, int);
30894static char *e (p, i)
30895     char **p;
30896     int i;
30897{
30898  return p[i];
30899}
30900static char *f (char * (*g) (char **, int), char **p, ...)
30901{
30902  char *s;
30903  va_list v;
30904  va_start (v,p);
30905  s = g (p, va_arg (v,int));
30906  va_end (v);
30907  return s;
30908}
30909
30910/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30911   function prototypes and stuff, but not '\xHH' hex character constants.
30912   These don't provoke an error unfortunately, instead are silently treated
30913   as 'x'.  The following induces an error, until -std is added to get
30914   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30915   array size at least.  It's necessary to write '\x00'==0 to get something
30916   that's true only with -std.  */
30917int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30918
30919/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30920   inside strings and character constants.  */
30921#define FOO(x) 'x'
30922int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30923
30924int test (int i, double x);
30925struct s1 {int (*f) (int a);};
30926struct s2 {int (*f) (double a);};
30927int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30928int argc;
30929char **argv;
30930int
30931main ()
30932{
30933return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30934  ;
30935  return 0;
30936}
30937_ACEOF
30938for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30939	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30940do
30941  CC="$ac_save_CC $ac_arg"
30942  if ac_fn_c_try_compile "$LINENO"; then :
30943  ac_cv_prog_cc_c89=$ac_arg
30944fi
30945rm -f core conftest.err conftest.$ac_objext
30946  test "x$ac_cv_prog_cc_c89" != "xno" && break
30947done
30948rm -f conftest.$ac_ext
30949CC=$ac_save_CC
30950
30951fi
30952# AC_CACHE_VAL
30953case "x$ac_cv_prog_cc_c89" in
30954  x)
30955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30956$as_echo "none needed" >&6; } ;;
30957  xno)
30958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30959$as_echo "unsupported" >&6; } ;;
30960  *)
30961    CC="$CC $ac_cv_prog_cc_c89"
30962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30963$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30964esac
30965if test "x$ac_cv_prog_cc_c89" != xno; then :
30966
30967fi
30968
30969ac_ext=cpp
30970ac_cpp='$CXXCPP $CPPFLAGS'
30971ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30972ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30973ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30974
30975
30976  # Option used to tell the compiler whether to create 32- or 64-bit executables
30977  # Notice that CC contains the full compiler path at this point.
30978  case $CC in
30979    *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
30980    *)      COMPILER_TARGET_BITS_FLAG="-m";;
30981  esac
30982
30983
30984  ### Locate C++ compiler (CXX)
30985
30986  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30987    COMPILER_CHECK_LIST="cl"
30988  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
30989    COMPILER_CHECK_LIST="CC g++"
30990  elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
30991    # Do not probe for CC on AIX .
30992    COMPILER_CHECK_LIST="xlC_r"
30993  else
30994    COMPILER_CHECK_LIST="g++ CC"
30995  fi
30996
30997
30998  COMPILER_NAME=C++
30999  SEARCH_LIST="$COMPILER_CHECK_LIST"
31000
31001  if test "x$CXX" != x; then
31002    # User has supplied compiler name already, always let that override.
31003    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
31004$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
31005    if test "x`basename $CXX`" = "x$CXX"; then
31006      # A command without a complete path is provided, search $PATH.
31007
31008      for ac_prog in $CXX
31009do
31010  # Extract the first word of "$ac_prog", so it can be a program name with args.
31011set dummy $ac_prog; ac_word=$2
31012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31013$as_echo_n "checking for $ac_word... " >&6; }
31014if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31015  $as_echo_n "(cached) " >&6
31016else
31017  case $POTENTIAL_CXX in
31018  [\\/]* | ?:[\\/]*)
31019  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31020  ;;
31021  *)
31022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31023for as_dir in $PATH
31024do
31025  IFS=$as_save_IFS
31026  test -z "$as_dir" && as_dir=.
31027    for ac_exec_ext in '' $ac_executable_extensions; do
31028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31029    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31031    break 2
31032  fi
31033done
31034  done
31035IFS=$as_save_IFS
31036
31037  ;;
31038esac
31039fi
31040POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31041if test -n "$POTENTIAL_CXX"; then
31042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31043$as_echo "$POTENTIAL_CXX" >&6; }
31044else
31045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31046$as_echo "no" >&6; }
31047fi
31048
31049
31050  test -n "$POTENTIAL_CXX" && break
31051done
31052
31053      if test "x$POTENTIAL_CXX" != x; then
31054        CXX=$POTENTIAL_CXX
31055      else
31056        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
31057      fi
31058    else
31059      # Otherwise it might already be a complete path
31060      if test ! -x "$CXX"; then
31061        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
31062      fi
31063    fi
31064  else
31065    # No user supplied value. Locate compiler ourselves
31066    CXX=
31067    # If TOOLS_DIR is set, check for all compiler names in there first
31068    # before checking the rest of the PATH.
31069    if test -n "$TOOLS_DIR"; then
31070      PATH_save="$PATH"
31071      PATH="$TOOLS_DIR"
31072      for ac_prog in $SEARCH_LIST
31073do
31074  # Extract the first word of "$ac_prog", so it can be a program name with args.
31075set dummy $ac_prog; ac_word=$2
31076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31077$as_echo_n "checking for $ac_word... " >&6; }
31078if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
31079  $as_echo_n "(cached) " >&6
31080else
31081  case $TOOLS_DIR_CXX in
31082  [\\/]* | ?:[\\/]*)
31083  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
31084  ;;
31085  *)
31086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31087for as_dir in $PATH
31088do
31089  IFS=$as_save_IFS
31090  test -z "$as_dir" && as_dir=.
31091    for ac_exec_ext in '' $ac_executable_extensions; do
31092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31093    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
31094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31095    break 2
31096  fi
31097done
31098  done
31099IFS=$as_save_IFS
31100
31101  ;;
31102esac
31103fi
31104TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
31105if test -n "$TOOLS_DIR_CXX"; then
31106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
31107$as_echo "$TOOLS_DIR_CXX" >&6; }
31108else
31109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31110$as_echo "no" >&6; }
31111fi
31112
31113
31114  test -n "$TOOLS_DIR_CXX" && break
31115done
31116
31117      CXX=$TOOLS_DIR_CXX
31118      PATH="$PATH_save"
31119    fi
31120
31121    # AC_PATH_PROGS can't be run multiple times with the same variable,
31122    # so create a new name for this run.
31123    if test "x$CXX" = x; then
31124      for ac_prog in $SEARCH_LIST
31125do
31126  # Extract the first word of "$ac_prog", so it can be a program name with args.
31127set dummy $ac_prog; ac_word=$2
31128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31129$as_echo_n "checking for $ac_word... " >&6; }
31130if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31131  $as_echo_n "(cached) " >&6
31132else
31133  case $POTENTIAL_CXX in
31134  [\\/]* | ?:[\\/]*)
31135  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31136  ;;
31137  *)
31138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31139for as_dir in $PATH
31140do
31141  IFS=$as_save_IFS
31142  test -z "$as_dir" && as_dir=.
31143    for ac_exec_ext in '' $ac_executable_extensions; do
31144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31145    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31147    break 2
31148  fi
31149done
31150  done
31151IFS=$as_save_IFS
31152
31153  ;;
31154esac
31155fi
31156POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31157if test -n "$POTENTIAL_CXX"; then
31158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31159$as_echo "$POTENTIAL_CXX" >&6; }
31160else
31161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31162$as_echo "no" >&6; }
31163fi
31164
31165
31166  test -n "$POTENTIAL_CXX" && break
31167done
31168
31169      CXX=$POTENTIAL_CXX
31170    fi
31171
31172    if test "x$CXX" = x; then
31173
31174  # Print a helpful message on how to acquire the necessary build dependency.
31175  # devkit is the help tag: freetype, cups, pulse, alsa etc
31176  MISSING_DEPENDENCY=devkit
31177
31178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31179    cygwin_help $MISSING_DEPENDENCY
31180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31181    msys_help $MISSING_DEPENDENCY
31182  else
31183    PKGHANDLER_COMMAND=
31184
31185    case $PKGHANDLER in
31186      apt-get)
31187        apt_help     $MISSING_DEPENDENCY ;;
31188      yum)
31189        yum_help     $MISSING_DEPENDENCY ;;
31190      port)
31191        port_help    $MISSING_DEPENDENCY ;;
31192      pkgutil)
31193        pkgutil_help $MISSING_DEPENDENCY ;;
31194      pkgadd)
31195        pkgadd_help  $MISSING_DEPENDENCY ;;
31196    esac
31197
31198    if test "x$PKGHANDLER_COMMAND" != x; then
31199      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31200    fi
31201  fi
31202
31203      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31204    fi
31205  fi
31206
31207  # Now we have a compiler binary in CXX. Make sure it's okay.
31208
31209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31210
31211  # First separate the path from the arguments. This will split at the first
31212  # space.
31213  complete="$CXX"
31214  path="${complete%% *}"
31215  tmp="$complete EOL"
31216  arguments="${tmp#* }"
31217
31218  # Input might be given as Windows format, start by converting to
31219  # unix format.
31220  new_path=`$CYGPATH -u "$path"`
31221
31222  # Now try to locate executable using which
31223  new_path=`$WHICH "$new_path" 2> /dev/null`
31224  # bat and cmd files are not always considered executable in cygwin causing which
31225  # to not find them
31226  if test "x$new_path" = x \
31227      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31228      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31229    new_path=`$CYGPATH -u "$path"`
31230  fi
31231  if test "x$new_path" = x; then
31232    # Oops. Which didn't find the executable.
31233    # The splitting of arguments from the executable at a space might have been incorrect,
31234    # since paths with space are more likely in Windows. Give it another try with the whole
31235    # argument.
31236    path="$complete"
31237    arguments="EOL"
31238    new_path=`$CYGPATH -u "$path"`
31239    new_path=`$WHICH "$new_path" 2> /dev/null`
31240    # bat and cmd files are not always considered executable in cygwin causing which
31241    # to not find them
31242    if test "x$new_path" = x \
31243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31245      new_path=`$CYGPATH -u "$path"`
31246    fi
31247    if test "x$new_path" = x; then
31248      # It's still not found. Now this is an unrecoverable error.
31249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31250$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31251      has_space=`$ECHO "$complete" | $GREP " "`
31252      if test "x$has_space" != x; then
31253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31255      fi
31256      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31257    fi
31258  fi
31259
31260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31263  # "foo.exe" is OK but "foo" is an error.
31264  #
31265  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31266  # It is also a way to make sure we got the proper file name for the real test later on.
31267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31268  if test "x$test_shortpath" = x; then
31269    # Short path failed, file does not exist as specified.
31270    # Try adding .exe or .cmd
31271    if test -f "${new_path}.exe"; then
31272      input_to_shortpath="${new_path}.exe"
31273    elif test -f "${new_path}.cmd"; then
31274      input_to_shortpath="${new_path}.cmd"
31275    else
31276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31277$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31280      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31281    fi
31282  else
31283    input_to_shortpath="$new_path"
31284  fi
31285
31286  # Call helper function which possibly converts this using DOS-style short mode.
31287  # If so, the updated path is stored in $new_path.
31288  new_path="$input_to_shortpath"
31289
31290  input_path="$input_to_shortpath"
31291  # Check if we need to convert this using DOS-style short mode. If the path
31292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31293  # take no chances and rewrite it.
31294  # Note: m4 eats our [], so we need to use [ and ] instead.
31295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31296  if test "x$has_forbidden_chars" != x; then
31297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31301      # Going to short mode and back again did indeed matter. Since short mode is
31302      # case insensitive, let's make it lowercase to improve readability.
31303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31304      # Now convert it back to Unix-stile (cygpath)
31305      input_path=`$CYGPATH -u "$shortmode_path"`
31306      new_path="$input_path"
31307    fi
31308  fi
31309
31310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31311  if test "x$test_cygdrive_prefix" = x; then
31312    # As a simple fix, exclude /usr/bin since it's not a real path.
31313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31315      # a path prefixed by /cygdrive for fixpath to work.
31316      new_path="$CYGWIN_ROOT_PATH$input_path"
31317    fi
31318  fi
31319
31320  # remove trailing .exe if any
31321  new_path="${new_path/%.exe/}"
31322
31323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31324
31325  # First separate the path from the arguments. This will split at the first
31326  # space.
31327  complete="$CXX"
31328  path="${complete%% *}"
31329  tmp="$complete EOL"
31330  arguments="${tmp#* }"
31331
31332  # Input might be given as Windows format, start by converting to
31333  # unix format.
31334  new_path="$path"
31335
31336  windows_path="$new_path"
31337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31338    unix_path=`$CYGPATH -u "$windows_path"`
31339    new_path="$unix_path"
31340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31342    new_path="$unix_path"
31343  fi
31344
31345
31346  # Now try to locate executable using which
31347  new_path=`$WHICH "$new_path" 2> /dev/null`
31348
31349  if test "x$new_path" = x; then
31350    # Oops. Which didn't find the executable.
31351    # The splitting of arguments from the executable at a space might have been incorrect,
31352    # since paths with space are more likely in Windows. Give it another try with the whole
31353    # argument.
31354    path="$complete"
31355    arguments="EOL"
31356    new_path="$path"
31357
31358  windows_path="$new_path"
31359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31360    unix_path=`$CYGPATH -u "$windows_path"`
31361    new_path="$unix_path"
31362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31364    new_path="$unix_path"
31365  fi
31366
31367
31368    new_path=`$WHICH "$new_path" 2> /dev/null`
31369
31370    if test "x$new_path" = x; then
31371      # It's still not found. Now this is an unrecoverable error.
31372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31373$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31374      has_space=`$ECHO "$complete" | $GREP " "`
31375      if test "x$has_space" != x; then
31376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31378      fi
31379      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31380    fi
31381  fi
31382
31383  # Now new_path has a complete unix path to the binary
31384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31385    # Keep paths in /bin as-is, but remove trailing .exe if any
31386    new_path="${new_path/%.exe/}"
31387    # Do not save /bin paths to all_fixpath_prefixes!
31388  else
31389    # Not in mixed or Windows style, start by that.
31390    new_path=`cmd //c echo $new_path`
31391
31392  input_path="$new_path"
31393  # Check if we need to convert this using DOS-style short mode. If the path
31394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31395  # take no chances and rewrite it.
31396  # Note: m4 eats our [], so we need to use [ and ] instead.
31397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31398  if test "x$has_forbidden_chars" != x; then
31399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31401  fi
31402
31403    # Output is in $new_path
31404
31405  windows_path="$new_path"
31406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31407    unix_path=`$CYGPATH -u "$windows_path"`
31408    new_path="$unix_path"
31409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31411    new_path="$unix_path"
31412  fi
31413
31414    # remove trailing .exe if any
31415    new_path="${new_path/%.exe/}"
31416
31417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31419  fi
31420
31421  else
31422    # We're on a posix platform. Hooray! :)
31423    # First separate the path from the arguments. This will split at the first
31424    # space.
31425    complete="$CXX"
31426    path="${complete%% *}"
31427    tmp="$complete EOL"
31428    arguments="${tmp#* }"
31429
31430    # Cannot rely on the command "which" here since it doesn't always work.
31431    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31432    if test -z "$is_absolute_path"; then
31433      # Path to executable is not absolute. Find it.
31434      IFS_save="$IFS"
31435      IFS=:
31436      for p in $PATH; do
31437        if test -f "$p/$path" && test -x "$p/$path"; then
31438          new_path="$p/$path"
31439          break
31440        fi
31441      done
31442      IFS="$IFS_save"
31443    else
31444      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
31445$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
31446      new_path="$path"
31447    fi
31448
31449    if test "x$new_path" = x; then
31450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31451$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31452      has_space=`$ECHO "$complete" | $GREP " "`
31453      if test "x$has_space" != x; then
31454        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31456      fi
31457      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31458    fi
31459  fi
31460
31461  # Now join together the path and the arguments once again
31462  if test "x$arguments" != xEOL; then
31463    new_complete="$new_path ${arguments% *}"
31464  else
31465    new_complete="$new_path"
31466  fi
31467
31468  if test "x$complete" != "x$new_complete"; then
31469    CXX="$new_complete"
31470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31471$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31472  fi
31473
31474  TEST_COMPILER="$CXX"
31475  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31476  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31477  if test "x$OPENJDK_BUILD_OS" != xaix; then
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31479$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31480
31481  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31482    # Follow a chain of symbolic links. Use readlink
31483    # where it exists, else fall back to horribly
31484    # complicated shell code.
31485    if test "x$READLINK_TESTED" != yes; then
31486      # On MacOSX there is a readlink tool with a different
31487      # purpose than the GNU readlink tool. Check the found readlink.
31488      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31489      if test "x$ISGNU" = x; then
31490        # A readlink that we do not know how to use.
31491        # Are there other non-GNU readlinks out there?
31492        READLINK_TESTED=yes
31493        READLINK=
31494      fi
31495    fi
31496
31497    if test "x$READLINK" != x; then
31498      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31499    else
31500      # Save the current directory for restoring afterwards
31501      STARTDIR=$PWD
31502      COUNTER=0
31503      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31504      sym_link_file=`$BASENAME $TEST_COMPILER`
31505      cd $sym_link_dir
31506      # Use -P flag to resolve symlinks in directories.
31507      cd `$THEPWDCMD -P`
31508      sym_link_dir=`$THEPWDCMD -P`
31509      # Resolve file symlinks
31510      while test $COUNTER -lt 20; do
31511        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31512        if test "x$ISLINK" == x; then
31513          # This is not a symbolic link! We are done!
31514          break
31515        fi
31516        # Again resolve directory symlinks since the target of the just found
31517        # link could be in a different directory
31518        cd `$DIRNAME $ISLINK`
31519        sym_link_dir=`$THEPWDCMD -P`
31520        sym_link_file=`$BASENAME $ISLINK`
31521        let COUNTER=COUNTER+1
31522      done
31523      cd $STARTDIR
31524      TEST_COMPILER=$sym_link_dir/$sym_link_file
31525    fi
31526  fi
31527
31528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31529$as_echo "$TEST_COMPILER" >&6; }
31530  fi
31531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31532$as_echo_n "checking if CXX is disguised ccache... " >&6; }
31533
31534  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31535  if test "x$COMPILER_BASENAME" = "xccache"; then
31536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31537$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31538    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31539    # We want to control ccache invocation ourselves, so ignore this cc and try
31540    # searching again.
31541
31542    # Remove the path to the fake ccache cc from the PATH
31543    RETRY_COMPILER_SAVED_PATH="$PATH"
31544    COMPILER_DIRNAME=`$DIRNAME $CXX`
31545    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31546
31547    # Try again looking for our compiler
31548    if test -n "$ac_tool_prefix"; then
31549  for ac_prog in $COMPILER_CHECK_LIST
31550  do
31551    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31552set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31554$as_echo_n "checking for $ac_word... " >&6; }
31555if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31556  $as_echo_n "(cached) " >&6
31557else
31558  if test -n "$PROPER_COMPILER_CXX"; then
31559  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31560else
31561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31562for as_dir in $PATH
31563do
31564  IFS=$as_save_IFS
31565  test -z "$as_dir" && as_dir=.
31566    for ac_exec_ext in '' $ac_executable_extensions; do
31567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31568    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31570    break 2
31571  fi
31572done
31573  done
31574IFS=$as_save_IFS
31575
31576fi
31577fi
31578PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31579if test -n "$PROPER_COMPILER_CXX"; then
31580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31581$as_echo "$PROPER_COMPILER_CXX" >&6; }
31582else
31583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584$as_echo "no" >&6; }
31585fi
31586
31587
31588    test -n "$PROPER_COMPILER_CXX" && break
31589  done
31590fi
31591if test -z "$PROPER_COMPILER_CXX"; then
31592  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31593  for ac_prog in $COMPILER_CHECK_LIST
31594do
31595  # Extract the first word of "$ac_prog", so it can be a program name with args.
31596set dummy $ac_prog; ac_word=$2
31597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31598$as_echo_n "checking for $ac_word... " >&6; }
31599if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31600  $as_echo_n "(cached) " >&6
31601else
31602  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31603  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31604else
31605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31606for as_dir in $PATH
31607do
31608  IFS=$as_save_IFS
31609  test -z "$as_dir" && as_dir=.
31610    for ac_exec_ext in '' $ac_executable_extensions; do
31611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31612    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31614    break 2
31615  fi
31616done
31617  done
31618IFS=$as_save_IFS
31619
31620fi
31621fi
31622ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31623if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31625$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31626else
31627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31628$as_echo "no" >&6; }
31629fi
31630
31631
31632  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31633done
31634
31635  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31636    PROPER_COMPILER_CXX=""
31637  else
31638    case $cross_compiling:$ac_tool_warned in
31639yes:)
31640{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31641$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31642ac_tool_warned=yes ;;
31643esac
31644    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31645  fi
31646fi
31647
31648
31649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31650
31651  # First separate the path from the arguments. This will split at the first
31652  # space.
31653  complete="$PROPER_COMPILER_CXX"
31654  path="${complete%% *}"
31655  tmp="$complete EOL"
31656  arguments="${tmp#* }"
31657
31658  # Input might be given as Windows format, start by converting to
31659  # unix format.
31660  new_path=`$CYGPATH -u "$path"`
31661
31662  # Now try to locate executable using which
31663  new_path=`$WHICH "$new_path" 2> /dev/null`
31664  # bat and cmd files are not always considered executable in cygwin causing which
31665  # to not find them
31666  if test "x$new_path" = x \
31667      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31668      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31669    new_path=`$CYGPATH -u "$path"`
31670  fi
31671  if test "x$new_path" = x; then
31672    # Oops. Which didn't find the executable.
31673    # The splitting of arguments from the executable at a space might have been incorrect,
31674    # since paths with space are more likely in Windows. Give it another try with the whole
31675    # argument.
31676    path="$complete"
31677    arguments="EOL"
31678    new_path=`$CYGPATH -u "$path"`
31679    new_path=`$WHICH "$new_path" 2> /dev/null`
31680    # bat and cmd files are not always considered executable in cygwin causing which
31681    # to not find them
31682    if test "x$new_path" = x \
31683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31685      new_path=`$CYGPATH -u "$path"`
31686    fi
31687    if test "x$new_path" = x; then
31688      # It's still not found. Now this is an unrecoverable error.
31689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31690$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31691      has_space=`$ECHO "$complete" | $GREP " "`
31692      if test "x$has_space" != x; then
31693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31695      fi
31696      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31697    fi
31698  fi
31699
31700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31703  # "foo.exe" is OK but "foo" is an error.
31704  #
31705  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31706  # It is also a way to make sure we got the proper file name for the real test later on.
31707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31708  if test "x$test_shortpath" = x; then
31709    # Short path failed, file does not exist as specified.
31710    # Try adding .exe or .cmd
31711    if test -f "${new_path}.exe"; then
31712      input_to_shortpath="${new_path}.exe"
31713    elif test -f "${new_path}.cmd"; then
31714      input_to_shortpath="${new_path}.cmd"
31715    else
31716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31717$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31718      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31719$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31720      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31721    fi
31722  else
31723    input_to_shortpath="$new_path"
31724  fi
31725
31726  # Call helper function which possibly converts this using DOS-style short mode.
31727  # If so, the updated path is stored in $new_path.
31728  new_path="$input_to_shortpath"
31729
31730  input_path="$input_to_shortpath"
31731  # Check if we need to convert this using DOS-style short mode. If the path
31732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31733  # take no chances and rewrite it.
31734  # Note: m4 eats our [], so we need to use [ and ] instead.
31735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31736  if test "x$has_forbidden_chars" != x; then
31737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31741      # Going to short mode and back again did indeed matter. Since short mode is
31742      # case insensitive, let's make it lowercase to improve readability.
31743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31744      # Now convert it back to Unix-stile (cygpath)
31745      input_path=`$CYGPATH -u "$shortmode_path"`
31746      new_path="$input_path"
31747    fi
31748  fi
31749
31750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31751  if test "x$test_cygdrive_prefix" = x; then
31752    # As a simple fix, exclude /usr/bin since it's not a real path.
31753    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31755      # a path prefixed by /cygdrive for fixpath to work.
31756      new_path="$CYGWIN_ROOT_PATH$input_path"
31757    fi
31758  fi
31759
31760  # remove trailing .exe if any
31761  new_path="${new_path/%.exe/}"
31762
31763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31764
31765  # First separate the path from the arguments. This will split at the first
31766  # space.
31767  complete="$PROPER_COMPILER_CXX"
31768  path="${complete%% *}"
31769  tmp="$complete EOL"
31770  arguments="${tmp#* }"
31771
31772  # Input might be given as Windows format, start by converting to
31773  # unix format.
31774  new_path="$path"
31775
31776  windows_path="$new_path"
31777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31778    unix_path=`$CYGPATH -u "$windows_path"`
31779    new_path="$unix_path"
31780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31782    new_path="$unix_path"
31783  fi
31784
31785
31786  # Now try to locate executable using which
31787  new_path=`$WHICH "$new_path" 2> /dev/null`
31788
31789  if test "x$new_path" = x; then
31790    # Oops. Which didn't find the executable.
31791    # The splitting of arguments from the executable at a space might have been incorrect,
31792    # since paths with space are more likely in Windows. Give it another try with the whole
31793    # argument.
31794    path="$complete"
31795    arguments="EOL"
31796    new_path="$path"
31797
31798  windows_path="$new_path"
31799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31800    unix_path=`$CYGPATH -u "$windows_path"`
31801    new_path="$unix_path"
31802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31804    new_path="$unix_path"
31805  fi
31806
31807
31808    new_path=`$WHICH "$new_path" 2> /dev/null`
31809
31810    if test "x$new_path" = x; then
31811      # It's still not found. Now this is an unrecoverable error.
31812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31813$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31814      has_space=`$ECHO "$complete" | $GREP " "`
31815      if test "x$has_space" != x; then
31816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31818      fi
31819      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31820    fi
31821  fi
31822
31823  # Now new_path has a complete unix path to the binary
31824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31825    # Keep paths in /bin as-is, but remove trailing .exe if any
31826    new_path="${new_path/%.exe/}"
31827    # Do not save /bin paths to all_fixpath_prefixes!
31828  else
31829    # Not in mixed or Windows style, start by that.
31830    new_path=`cmd //c echo $new_path`
31831
31832  input_path="$new_path"
31833  # Check if we need to convert this using DOS-style short mode. If the path
31834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31835  # take no chances and rewrite it.
31836  # Note: m4 eats our [], so we need to use [ and ] instead.
31837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31838  if test "x$has_forbidden_chars" != x; then
31839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31841  fi
31842
31843    # Output is in $new_path
31844
31845  windows_path="$new_path"
31846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31847    unix_path=`$CYGPATH -u "$windows_path"`
31848    new_path="$unix_path"
31849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31851    new_path="$unix_path"
31852  fi
31853
31854    # remove trailing .exe if any
31855    new_path="${new_path/%.exe/}"
31856
31857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31859  fi
31860
31861  else
31862    # We're on a posix platform. Hooray! :)
31863    # First separate the path from the arguments. This will split at the first
31864    # space.
31865    complete="$PROPER_COMPILER_CXX"
31866    path="${complete%% *}"
31867    tmp="$complete EOL"
31868    arguments="${tmp#* }"
31869
31870    # Cannot rely on the command "which" here since it doesn't always work.
31871    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31872    if test -z "$is_absolute_path"; then
31873      # Path to executable is not absolute. Find it.
31874      IFS_save="$IFS"
31875      IFS=:
31876      for p in $PATH; do
31877        if test -f "$p/$path" && test -x "$p/$path"; then
31878          new_path="$p/$path"
31879          break
31880        fi
31881      done
31882      IFS="$IFS_save"
31883    else
31884      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
31885$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
31886      new_path="$path"
31887    fi
31888
31889    if test "x$new_path" = x; then
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31891$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31892      has_space=`$ECHO "$complete" | $GREP " "`
31893      if test "x$has_space" != x; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31896      fi
31897      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31898    fi
31899  fi
31900
31901  # Now join together the path and the arguments once again
31902  if test "x$arguments" != xEOL; then
31903    new_complete="$new_path ${arguments% *}"
31904  else
31905    new_complete="$new_path"
31906  fi
31907
31908  if test "x$complete" != "x$new_complete"; then
31909    PROPER_COMPILER_CXX="$new_complete"
31910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31911$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31912  fi
31913
31914    PATH="$RETRY_COMPILER_SAVED_PATH"
31915
31916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31917$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31918
31919  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31920    # Follow a chain of symbolic links. Use readlink
31921    # where it exists, else fall back to horribly
31922    # complicated shell code.
31923    if test "x$READLINK_TESTED" != yes; then
31924      # On MacOSX there is a readlink tool with a different
31925      # purpose than the GNU readlink tool. Check the found readlink.
31926      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31927      if test "x$ISGNU" = x; then
31928        # A readlink that we do not know how to use.
31929        # Are there other non-GNU readlinks out there?
31930        READLINK_TESTED=yes
31931        READLINK=
31932      fi
31933    fi
31934
31935    if test "x$READLINK" != x; then
31936      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31937    else
31938      # Save the current directory for restoring afterwards
31939      STARTDIR=$PWD
31940      COUNTER=0
31941      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31942      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31943      cd $sym_link_dir
31944      # Use -P flag to resolve symlinks in directories.
31945      cd `$THEPWDCMD -P`
31946      sym_link_dir=`$THEPWDCMD -P`
31947      # Resolve file symlinks
31948      while test $COUNTER -lt 20; do
31949        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31950        if test "x$ISLINK" == x; then
31951          # This is not a symbolic link! We are done!
31952          break
31953        fi
31954        # Again resolve directory symlinks since the target of the just found
31955        # link could be in a different directory
31956        cd `$DIRNAME $ISLINK`
31957        sym_link_dir=`$THEPWDCMD -P`
31958        sym_link_file=`$BASENAME $ISLINK`
31959        let COUNTER=COUNTER+1
31960      done
31961      cd $STARTDIR
31962      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31963    fi
31964  fi
31965
31966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31967$as_echo "$PROPER_COMPILER_CXX" >&6; }
31968    CXX="$PROPER_COMPILER_CXX"
31969  else
31970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31971$as_echo "no, keeping CXX" >&6; }
31972  fi
31973
31974
31975  COMPILER=$CXX
31976  COMPILER_NAME=$COMPILER_NAME
31977
31978  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31979    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
31980    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
31981    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31982    if test $? -ne 0; then
31983      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
31984
31985      { $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
31986$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
31987      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
31988$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
31989      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31990    else
31991      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
31992      COMPILER_VENDOR="Sun Studio"
31993    fi
31994  elif test  "x$OPENJDK_TARGET_OS" = xaix; then
31995      COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
31996      $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
31997      if test $? -ne 0; then
31998        as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
31999      else
32000        COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
32001        COMPILER_VENDOR='IBM'
32002      fi
32003  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
32004    # First line typically looks something like:
32005    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32006    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32007    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
32008    COMPILER_VENDOR="Microsoft CL.EXE"
32009    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
32010    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
32011      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
32012        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
32013      fi
32014    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
32015      if test "x$COMPILER_CPU_TEST" != "xx64"; then
32016        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
32017      fi
32018    fi
32019  else
32020    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
32021    # Check that this is likely to be GCC.
32022    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
32023    if test $? -ne 0; then
32024      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
32025$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
32026      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
32027$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
32028      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32029    fi
32030
32031    # First line typically looks something like:
32032    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
32033    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
32034    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
32035  fi
32036  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
32037  CXX_VERSION="$COMPILER_VERSION"
32038  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
32039  CXX_VENDOR="$COMPILER_VENDOR"
32040
32041  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
32042$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
32043
32044
32045  # Now that we have resolved CXX ourself, let autoconf have its go at it
32046  ac_ext=cpp
32047ac_cpp='$CXXCPP $CPPFLAGS'
32048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32051if test -z "$CXX"; then
32052  if test -n "$CCC"; then
32053    CXX=$CCC
32054  else
32055    if test -n "$ac_tool_prefix"; then
32056  for ac_prog in $CXX
32057  do
32058    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32061$as_echo_n "checking for $ac_word... " >&6; }
32062if ${ac_cv_prog_CXX+:} false; then :
32063  $as_echo_n "(cached) " >&6
32064else
32065  if test -n "$CXX"; then
32066  ac_cv_prog_CXX="$CXX" # Let the user override the test.
32067else
32068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32069for as_dir in $PATH
32070do
32071  IFS=$as_save_IFS
32072  test -z "$as_dir" && as_dir=.
32073    for ac_exec_ext in '' $ac_executable_extensions; do
32074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32075    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32077    break 2
32078  fi
32079done
32080  done
32081IFS=$as_save_IFS
32082
32083fi
32084fi
32085CXX=$ac_cv_prog_CXX
32086if test -n "$CXX"; then
32087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32088$as_echo "$CXX" >&6; }
32089else
32090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32091$as_echo "no" >&6; }
32092fi
32093
32094
32095    test -n "$CXX" && break
32096  done
32097fi
32098if test -z "$CXX"; then
32099  ac_ct_CXX=$CXX
32100  for ac_prog in $CXX
32101do
32102  # Extract the first word of "$ac_prog", so it can be a program name with args.
32103set dummy $ac_prog; ac_word=$2
32104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32105$as_echo_n "checking for $ac_word... " >&6; }
32106if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32107  $as_echo_n "(cached) " >&6
32108else
32109  if test -n "$ac_ct_CXX"; then
32110  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32111else
32112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32113for as_dir in $PATH
32114do
32115  IFS=$as_save_IFS
32116  test -z "$as_dir" && as_dir=.
32117    for ac_exec_ext in '' $ac_executable_extensions; do
32118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32119    ac_cv_prog_ac_ct_CXX="$ac_prog"
32120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32121    break 2
32122  fi
32123done
32124  done
32125IFS=$as_save_IFS
32126
32127fi
32128fi
32129ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32130if test -n "$ac_ct_CXX"; then
32131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32132$as_echo "$ac_ct_CXX" >&6; }
32133else
32134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32135$as_echo "no" >&6; }
32136fi
32137
32138
32139  test -n "$ac_ct_CXX" && break
32140done
32141
32142  if test "x$ac_ct_CXX" = x; then
32143    CXX="g++"
32144  else
32145    case $cross_compiling:$ac_tool_warned in
32146yes:)
32147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32149ac_tool_warned=yes ;;
32150esac
32151    CXX=$ac_ct_CXX
32152  fi
32153fi
32154
32155  fi
32156fi
32157# Provide some information about the compiler.
32158$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32159set X $ac_compile
32160ac_compiler=$2
32161for ac_option in --version -v -V -qversion; do
32162  { { ac_try="$ac_compiler $ac_option >&5"
32163case "(($ac_try" in
32164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32165  *) ac_try_echo=$ac_try;;
32166esac
32167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32168$as_echo "$ac_try_echo"; } >&5
32169  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32170  ac_status=$?
32171  if test -s conftest.err; then
32172    sed '10a\
32173... rest of stderr output deleted ...
32174         10q' conftest.err >conftest.er1
32175    cat conftest.er1 >&5
32176  fi
32177  rm -f conftest.er1 conftest.err
32178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32179  test $ac_status = 0; }
32180done
32181
32182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32183$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32184if ${ac_cv_cxx_compiler_gnu+:} false; then :
32185  $as_echo_n "(cached) " >&6
32186else
32187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32188/* end confdefs.h.  */
32189
32190int
32191main ()
32192{
32193#ifndef __GNUC__
32194       choke me
32195#endif
32196
32197  ;
32198  return 0;
32199}
32200_ACEOF
32201if ac_fn_cxx_try_compile "$LINENO"; then :
32202  ac_compiler_gnu=yes
32203else
32204  ac_compiler_gnu=no
32205fi
32206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32207ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32208
32209fi
32210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32211$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32212if test $ac_compiler_gnu = yes; then
32213  GXX=yes
32214else
32215  GXX=
32216fi
32217ac_test_CXXFLAGS=${CXXFLAGS+set}
32218ac_save_CXXFLAGS=$CXXFLAGS
32219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32220$as_echo_n "checking whether $CXX accepts -g... " >&6; }
32221if ${ac_cv_prog_cxx_g+:} false; then :
32222  $as_echo_n "(cached) " >&6
32223else
32224  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32225   ac_cxx_werror_flag=yes
32226   ac_cv_prog_cxx_g=no
32227   CXXFLAGS="-g"
32228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32229/* end confdefs.h.  */
32230
32231int
32232main ()
32233{
32234
32235  ;
32236  return 0;
32237}
32238_ACEOF
32239if ac_fn_cxx_try_compile "$LINENO"; then :
32240  ac_cv_prog_cxx_g=yes
32241else
32242  CXXFLAGS=""
32243      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32244/* end confdefs.h.  */
32245
32246int
32247main ()
32248{
32249
32250  ;
32251  return 0;
32252}
32253_ACEOF
32254if ac_fn_cxx_try_compile "$LINENO"; then :
32255
32256else
32257  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32258	 CXXFLAGS="-g"
32259	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32260/* end confdefs.h.  */
32261
32262int
32263main ()
32264{
32265
32266  ;
32267  return 0;
32268}
32269_ACEOF
32270if ac_fn_cxx_try_compile "$LINENO"; then :
32271  ac_cv_prog_cxx_g=yes
32272fi
32273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32274fi
32275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32276fi
32277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32278   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32279fi
32280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32281$as_echo "$ac_cv_prog_cxx_g" >&6; }
32282if test "$ac_test_CXXFLAGS" = set; then
32283  CXXFLAGS=$ac_save_CXXFLAGS
32284elif test $ac_cv_prog_cxx_g = yes; then
32285  if test "$GXX" = yes; then
32286    CXXFLAGS="-g -O2"
32287  else
32288    CXXFLAGS="-g"
32289  fi
32290else
32291  if test "$GXX" = yes; then
32292    CXXFLAGS="-O2"
32293  else
32294    CXXFLAGS=
32295  fi
32296fi
32297ac_ext=cpp
32298ac_cpp='$CXXCPP $CPPFLAGS'
32299ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32300ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32301ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32302
32303
32304  ### Locate other tools
32305
32306  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32307    ac_ext=m
32308ac_cpp='$OBJCPP $CPPFLAGS'
32309ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32310ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32311ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32312if test -n "$ac_tool_prefix"; then
32313  for ac_prog in gcc objcc objc cc CC
32314  do
32315    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32316set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32318$as_echo_n "checking for $ac_word... " >&6; }
32319if ${ac_cv_prog_OBJC+:} false; then :
32320  $as_echo_n "(cached) " >&6
32321else
32322  if test -n "$OBJC"; then
32323  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32324else
32325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32326for as_dir in $PATH
32327do
32328  IFS=$as_save_IFS
32329  test -z "$as_dir" && as_dir=.
32330    for ac_exec_ext in '' $ac_executable_extensions; do
32331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32332    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32334    break 2
32335  fi
32336done
32337  done
32338IFS=$as_save_IFS
32339
32340fi
32341fi
32342OBJC=$ac_cv_prog_OBJC
32343if test -n "$OBJC"; then
32344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32345$as_echo "$OBJC" >&6; }
32346else
32347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32348$as_echo "no" >&6; }
32349fi
32350
32351
32352    test -n "$OBJC" && break
32353  done
32354fi
32355if test -z "$OBJC"; then
32356  ac_ct_OBJC=$OBJC
32357  for ac_prog in gcc objcc objc cc CC
32358do
32359  # Extract the first word of "$ac_prog", so it can be a program name with args.
32360set dummy $ac_prog; ac_word=$2
32361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32362$as_echo_n "checking for $ac_word... " >&6; }
32363if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32364  $as_echo_n "(cached) " >&6
32365else
32366  if test -n "$ac_ct_OBJC"; then
32367  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32368else
32369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32370for as_dir in $PATH
32371do
32372  IFS=$as_save_IFS
32373  test -z "$as_dir" && as_dir=.
32374    for ac_exec_ext in '' $ac_executable_extensions; do
32375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32376    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32378    break 2
32379  fi
32380done
32381  done
32382IFS=$as_save_IFS
32383
32384fi
32385fi
32386ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32387if test -n "$ac_ct_OBJC"; then
32388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32389$as_echo "$ac_ct_OBJC" >&6; }
32390else
32391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32392$as_echo "no" >&6; }
32393fi
32394
32395
32396  test -n "$ac_ct_OBJC" && break
32397done
32398
32399  if test "x$ac_ct_OBJC" = x; then
32400    OBJC="gcc"
32401  else
32402    case $cross_compiling:$ac_tool_warned in
32403yes:)
32404{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32405$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32406ac_tool_warned=yes ;;
32407esac
32408    OBJC=$ac_ct_OBJC
32409  fi
32410fi
32411
32412# Provide some information about the compiler.
32413$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32414set X $ac_compile
32415ac_compiler=$2
32416for ac_option in --version -v -V -qversion; do
32417  { { ac_try="$ac_compiler $ac_option >&5"
32418case "(($ac_try" in
32419  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32420  *) ac_try_echo=$ac_try;;
32421esac
32422eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32423$as_echo "$ac_try_echo"; } >&5
32424  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32425  ac_status=$?
32426  if test -s conftest.err; then
32427    sed '10a\
32428... rest of stderr output deleted ...
32429         10q' conftest.err >conftest.er1
32430    cat conftest.er1 >&5
32431  fi
32432  rm -f conftest.er1 conftest.err
32433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32434  test $ac_status = 0; }
32435done
32436
32437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32438$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32439if ${ac_cv_objc_compiler_gnu+:} false; then :
32440  $as_echo_n "(cached) " >&6
32441else
32442  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32443/* end confdefs.h.  */
32444
32445int
32446main ()
32447{
32448#ifndef __GNUC__
32449       choke me
32450#endif
32451
32452  ;
32453  return 0;
32454}
32455_ACEOF
32456if ac_fn_objc_try_compile "$LINENO"; then :
32457  ac_compiler_gnu=yes
32458else
32459  ac_compiler_gnu=no
32460fi
32461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32462ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32463
32464fi
32465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32466$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32467if test $ac_compiler_gnu = yes; then
32468  GOBJC=yes
32469else
32470  GOBJC=
32471fi
32472ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32473ac_save_OBJCFLAGS=$OBJCFLAGS
32474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32475$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32476if ${ac_cv_prog_objc_g+:} false; then :
32477  $as_echo_n "(cached) " >&6
32478else
32479  ac_save_objc_werror_flag=$ac_objc_werror_flag
32480   ac_objc_werror_flag=yes
32481   ac_cv_prog_objc_g=no
32482   OBJCFLAGS="-g"
32483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32484/* end confdefs.h.  */
32485
32486int
32487main ()
32488{
32489
32490  ;
32491  return 0;
32492}
32493_ACEOF
32494if ac_fn_objc_try_compile "$LINENO"; then :
32495  ac_cv_prog_objc_g=yes
32496else
32497  OBJCFLAGS=""
32498      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32499/* end confdefs.h.  */
32500
32501int
32502main ()
32503{
32504
32505  ;
32506  return 0;
32507}
32508_ACEOF
32509if ac_fn_objc_try_compile "$LINENO"; then :
32510
32511else
32512  ac_objc_werror_flag=$ac_save_objc_werror_flag
32513	 OBJCFLAGS="-g"
32514	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32515/* end confdefs.h.  */
32516
32517int
32518main ()
32519{
32520
32521  ;
32522  return 0;
32523}
32524_ACEOF
32525if ac_fn_objc_try_compile "$LINENO"; then :
32526  ac_cv_prog_objc_g=yes
32527fi
32528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32529fi
32530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32531fi
32532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32533   ac_objc_werror_flag=$ac_save_objc_werror_flag
32534fi
32535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32536$as_echo "$ac_cv_prog_objc_g" >&6; }
32537if test "$ac_test_OBJCFLAGS" = set; then
32538  OBJCFLAGS=$ac_save_OBJCFLAGS
32539elif test $ac_cv_prog_objc_g = yes; then
32540  if test "$GOBJC" = yes; then
32541    OBJCFLAGS="-g -O2"
32542  else
32543    OBJCFLAGS="-g"
32544  fi
32545else
32546  if test "$GOBJC" = yes; then
32547    OBJCFLAGS="-O2"
32548  else
32549    OBJCFLAGS=
32550  fi
32551fi
32552ac_ext=cpp
32553ac_cpp='$CXXCPP $CPPFLAGS'
32554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32557
32558
32559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32560
32561  # First separate the path from the arguments. This will split at the first
32562  # space.
32563  complete="$OBJC"
32564  path="${complete%% *}"
32565  tmp="$complete EOL"
32566  arguments="${tmp#* }"
32567
32568  # Input might be given as Windows format, start by converting to
32569  # unix format.
32570  new_path=`$CYGPATH -u "$path"`
32571
32572  # Now try to locate executable using which
32573  new_path=`$WHICH "$new_path" 2> /dev/null`
32574  # bat and cmd files are not always considered executable in cygwin causing which
32575  # to not find them
32576  if test "x$new_path" = x \
32577      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32578      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32579    new_path=`$CYGPATH -u "$path"`
32580  fi
32581  if test "x$new_path" = x; then
32582    # Oops. Which didn't find the executable.
32583    # The splitting of arguments from the executable at a space might have been incorrect,
32584    # since paths with space are more likely in Windows. Give it another try with the whole
32585    # argument.
32586    path="$complete"
32587    arguments="EOL"
32588    new_path=`$CYGPATH -u "$path"`
32589    new_path=`$WHICH "$new_path" 2> /dev/null`
32590    # bat and cmd files are not always considered executable in cygwin causing which
32591    # to not find them
32592    if test "x$new_path" = x \
32593        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32594        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32595      new_path=`$CYGPATH -u "$path"`
32596    fi
32597    if test "x$new_path" = x; then
32598      # It's still not found. Now this is an unrecoverable error.
32599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32600$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32601      has_space=`$ECHO "$complete" | $GREP " "`
32602      if test "x$has_space" != x; then
32603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32605      fi
32606      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32607    fi
32608  fi
32609
32610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32613  # "foo.exe" is OK but "foo" is an error.
32614  #
32615  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32616  # It is also a way to make sure we got the proper file name for the real test later on.
32617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32618  if test "x$test_shortpath" = x; then
32619    # Short path failed, file does not exist as specified.
32620    # Try adding .exe or .cmd
32621    if test -f "${new_path}.exe"; then
32622      input_to_shortpath="${new_path}.exe"
32623    elif test -f "${new_path}.cmd"; then
32624      input_to_shortpath="${new_path}.cmd"
32625    else
32626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32627$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32628      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32629$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32630      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32631    fi
32632  else
32633    input_to_shortpath="$new_path"
32634  fi
32635
32636  # Call helper function which possibly converts this using DOS-style short mode.
32637  # If so, the updated path is stored in $new_path.
32638  new_path="$input_to_shortpath"
32639
32640  input_path="$input_to_shortpath"
32641  # Check if we need to convert this using DOS-style short mode. If the path
32642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32643  # take no chances and rewrite it.
32644  # Note: m4 eats our [], so we need to use [ and ] instead.
32645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32646  if test "x$has_forbidden_chars" != x; then
32647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32651      # Going to short mode and back again did indeed matter. Since short mode is
32652      # case insensitive, let's make it lowercase to improve readability.
32653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32654      # Now convert it back to Unix-stile (cygpath)
32655      input_path=`$CYGPATH -u "$shortmode_path"`
32656      new_path="$input_path"
32657    fi
32658  fi
32659
32660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32661  if test "x$test_cygdrive_prefix" = x; then
32662    # As a simple fix, exclude /usr/bin since it's not a real path.
32663    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32665      # a path prefixed by /cygdrive for fixpath to work.
32666      new_path="$CYGWIN_ROOT_PATH$input_path"
32667    fi
32668  fi
32669
32670  # remove trailing .exe if any
32671  new_path="${new_path/%.exe/}"
32672
32673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32674
32675  # First separate the path from the arguments. This will split at the first
32676  # space.
32677  complete="$OBJC"
32678  path="${complete%% *}"
32679  tmp="$complete EOL"
32680  arguments="${tmp#* }"
32681
32682  # Input might be given as Windows format, start by converting to
32683  # unix format.
32684  new_path="$path"
32685
32686  windows_path="$new_path"
32687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32688    unix_path=`$CYGPATH -u "$windows_path"`
32689    new_path="$unix_path"
32690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32692    new_path="$unix_path"
32693  fi
32694
32695
32696  # Now try to locate executable using which
32697  new_path=`$WHICH "$new_path" 2> /dev/null`
32698
32699  if test "x$new_path" = x; then
32700    # Oops. Which didn't find the executable.
32701    # The splitting of arguments from the executable at a space might have been incorrect,
32702    # since paths with space are more likely in Windows. Give it another try with the whole
32703    # argument.
32704    path="$complete"
32705    arguments="EOL"
32706    new_path="$path"
32707
32708  windows_path="$new_path"
32709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32710    unix_path=`$CYGPATH -u "$windows_path"`
32711    new_path="$unix_path"
32712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32714    new_path="$unix_path"
32715  fi
32716
32717
32718    new_path=`$WHICH "$new_path" 2> /dev/null`
32719
32720    if test "x$new_path" = x; then
32721      # It's still not found. Now this is an unrecoverable error.
32722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32723$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32724      has_space=`$ECHO "$complete" | $GREP " "`
32725      if test "x$has_space" != x; then
32726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32728      fi
32729      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32730    fi
32731  fi
32732
32733  # Now new_path has a complete unix path to the binary
32734  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32735    # Keep paths in /bin as-is, but remove trailing .exe if any
32736    new_path="${new_path/%.exe/}"
32737    # Do not save /bin paths to all_fixpath_prefixes!
32738  else
32739    # Not in mixed or Windows style, start by that.
32740    new_path=`cmd //c echo $new_path`
32741
32742  input_path="$new_path"
32743  # Check if we need to convert this using DOS-style short mode. If the path
32744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32745  # take no chances and rewrite it.
32746  # Note: m4 eats our [], so we need to use [ and ] instead.
32747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32748  if test "x$has_forbidden_chars" != x; then
32749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32751  fi
32752
32753    # Output is in $new_path
32754
32755  windows_path="$new_path"
32756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32757    unix_path=`$CYGPATH -u "$windows_path"`
32758    new_path="$unix_path"
32759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32761    new_path="$unix_path"
32762  fi
32763
32764    # remove trailing .exe if any
32765    new_path="${new_path/%.exe/}"
32766
32767    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32768    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32769  fi
32770
32771  else
32772    # We're on a posix platform. Hooray! :)
32773    # First separate the path from the arguments. This will split at the first
32774    # space.
32775    complete="$OBJC"
32776    path="${complete%% *}"
32777    tmp="$complete EOL"
32778    arguments="${tmp#* }"
32779
32780    # Cannot rely on the command "which" here since it doesn't always work.
32781    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32782    if test -z "$is_absolute_path"; then
32783      # Path to executable is not absolute. Find it.
32784      IFS_save="$IFS"
32785      IFS=:
32786      for p in $PATH; do
32787        if test -f "$p/$path" && test -x "$p/$path"; then
32788          new_path="$p/$path"
32789          break
32790        fi
32791      done
32792      IFS="$IFS_save"
32793    else
32794      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
32795$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
32796      new_path="$path"
32797    fi
32798
32799    if test "x$new_path" = x; then
32800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32801$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32802      has_space=`$ECHO "$complete" | $GREP " "`
32803      if test "x$has_space" != x; then
32804        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32805$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32806      fi
32807      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32808    fi
32809  fi
32810
32811  # Now join together the path and the arguments once again
32812  if test "x$arguments" != xEOL; then
32813    new_complete="$new_path ${arguments% *}"
32814  else
32815    new_complete="$new_path"
32816  fi
32817
32818  if test "x$complete" != "x$new_complete"; then
32819    OBJC="$new_complete"
32820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32821$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32822  fi
32823
32824  else
32825    OBJC=
32826  fi
32827
32828  # Restore the flags to the user specified values.
32829  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
32830  CFLAGS="$ORG_CFLAGS"
32831  CXXFLAGS="$ORG_CXXFLAGS"
32832  OBJCFLAGS="$ORG_OBJCFLAGS"
32833
32834  LD="$CC"
32835  LDEXE="$CC"
32836  LDCXX="$CXX"
32837  LDEXECXX="$CXX"
32838
32839  # LDEXE is the linker to use, when creating executables.
32840
32841  # Linking C++ libraries.
32842
32843  # Linking C++ executables.
32844
32845
32846  if test "x$OPENJDK_TARGET_OS" != xwindows; then
32847
32848
32849  # Publish this variable in the help.
32850
32851
32852  if test "x$AR" = x; then
32853    # The variable is not set by user, try to locate tool using the code snippet
32854    if test -n "$ac_tool_prefix"; then
32855  for ac_prog in ar
32856  do
32857    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32858set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32860$as_echo_n "checking for $ac_word... " >&6; }
32861if ${ac_cv_prog_AR+:} false; then :
32862  $as_echo_n "(cached) " >&6
32863else
32864  if test -n "$AR"; then
32865  ac_cv_prog_AR="$AR" # Let the user override the test.
32866else
32867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32868for as_dir in $PATH
32869do
32870  IFS=$as_save_IFS
32871  test -z "$as_dir" && as_dir=.
32872    for ac_exec_ext in '' $ac_executable_extensions; do
32873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32874    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32876    break 2
32877  fi
32878done
32879  done
32880IFS=$as_save_IFS
32881
32882fi
32883fi
32884AR=$ac_cv_prog_AR
32885if test -n "$AR"; then
32886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32887$as_echo "$AR" >&6; }
32888else
32889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32890$as_echo "no" >&6; }
32891fi
32892
32893
32894    test -n "$AR" && break
32895  done
32896fi
32897if test -z "$AR"; then
32898  ac_ct_AR=$AR
32899  for ac_prog in ar
32900do
32901  # Extract the first word of "$ac_prog", so it can be a program name with args.
32902set dummy $ac_prog; ac_word=$2
32903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32904$as_echo_n "checking for $ac_word... " >&6; }
32905if ${ac_cv_prog_ac_ct_AR+:} false; then :
32906  $as_echo_n "(cached) " >&6
32907else
32908  if test -n "$ac_ct_AR"; then
32909  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32910else
32911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32912for as_dir in $PATH
32913do
32914  IFS=$as_save_IFS
32915  test -z "$as_dir" && as_dir=.
32916    for ac_exec_ext in '' $ac_executable_extensions; do
32917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32918    ac_cv_prog_ac_ct_AR="$ac_prog"
32919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32920    break 2
32921  fi
32922done
32923  done
32924IFS=$as_save_IFS
32925
32926fi
32927fi
32928ac_ct_AR=$ac_cv_prog_ac_ct_AR
32929if test -n "$ac_ct_AR"; then
32930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32931$as_echo "$ac_ct_AR" >&6; }
32932else
32933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32934$as_echo "no" >&6; }
32935fi
32936
32937
32938  test -n "$ac_ct_AR" && break
32939done
32940
32941  if test "x$ac_ct_AR" = x; then
32942    AR=""
32943  else
32944    case $cross_compiling:$ac_tool_warned in
32945yes:)
32946{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32947$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32948ac_tool_warned=yes ;;
32949esac
32950    AR=$ac_ct_AR
32951  fi
32952fi
32953
32954  else
32955    # The variable is set, but is it from the command line or the environment?
32956
32957    # Try to remove the string !AR! from our list.
32958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32960      # If it failed, the variable was not from the command line. Ignore it,
32961      # but warn the user (except for BASH, which is always set by the calling BASH).
32962      if test "xAR" != xBASH; then
32963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32964$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32965      fi
32966      # Try to locate tool using the code snippet
32967      if test -n "$ac_tool_prefix"; then
32968  for ac_prog in ar
32969  do
32970    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32971set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32973$as_echo_n "checking for $ac_word... " >&6; }
32974if ${ac_cv_prog_AR+:} false; then :
32975  $as_echo_n "(cached) " >&6
32976else
32977  if test -n "$AR"; then
32978  ac_cv_prog_AR="$AR" # Let the user override the test.
32979else
32980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32981for as_dir in $PATH
32982do
32983  IFS=$as_save_IFS
32984  test -z "$as_dir" && as_dir=.
32985    for ac_exec_ext in '' $ac_executable_extensions; do
32986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32987    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32989    break 2
32990  fi
32991done
32992  done
32993IFS=$as_save_IFS
32994
32995fi
32996fi
32997AR=$ac_cv_prog_AR
32998if test -n "$AR"; then
32999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33000$as_echo "$AR" >&6; }
33001else
33002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33003$as_echo "no" >&6; }
33004fi
33005
33006
33007    test -n "$AR" && break
33008  done
33009fi
33010if test -z "$AR"; then
33011  ac_ct_AR=$AR
33012  for ac_prog in ar
33013do
33014  # Extract the first word of "$ac_prog", so it can be a program name with args.
33015set dummy $ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_prog_ac_ct_AR+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  if test -n "$ac_ct_AR"; then
33022  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33023else
33024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33025for as_dir in $PATH
33026do
33027  IFS=$as_save_IFS
33028  test -z "$as_dir" && as_dir=.
33029    for ac_exec_ext in '' $ac_executable_extensions; do
33030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33031    ac_cv_prog_ac_ct_AR="$ac_prog"
33032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33033    break 2
33034  fi
33035done
33036  done
33037IFS=$as_save_IFS
33038
33039fi
33040fi
33041ac_ct_AR=$ac_cv_prog_ac_ct_AR
33042if test -n "$ac_ct_AR"; then
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33044$as_echo "$ac_ct_AR" >&6; }
33045else
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33047$as_echo "no" >&6; }
33048fi
33049
33050
33051  test -n "$ac_ct_AR" && break
33052done
33053
33054  if test "x$ac_ct_AR" = x; then
33055    AR=""
33056  else
33057    case $cross_compiling:$ac_tool_warned in
33058yes:)
33059{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33060$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33061ac_tool_warned=yes ;;
33062esac
33063    AR=$ac_ct_AR
33064  fi
33065fi
33066
33067    else
33068      # If it succeeded, then it was overridden by the user. We will use it
33069      # for the tool.
33070
33071      # First remove it from the list of overridden variables, so we can test
33072      # for unknown variables in the end.
33073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33074
33075      # Check if the provided tool contains a complete path.
33076      tool_specified="$AR"
33077      tool_basename="${tool_specified##*/}"
33078      if test "x$tool_basename" = "x$tool_specified"; then
33079        # A command without a complete path is provided, search $PATH.
33080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33081$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33082        # Extract the first word of "$tool_basename", so it can be a program name with args.
33083set dummy $tool_basename; ac_word=$2
33084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33085$as_echo_n "checking for $ac_word... " >&6; }
33086if ${ac_cv_path_AR+:} false; then :
33087  $as_echo_n "(cached) " >&6
33088else
33089  case $AR in
33090  [\\/]* | ?:[\\/]*)
33091  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33092  ;;
33093  *)
33094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33095for as_dir in $PATH
33096do
33097  IFS=$as_save_IFS
33098  test -z "$as_dir" && as_dir=.
33099    for ac_exec_ext in '' $ac_executable_extensions; do
33100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33101    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33103    break 2
33104  fi
33105done
33106  done
33107IFS=$as_save_IFS
33108
33109  ;;
33110esac
33111fi
33112AR=$ac_cv_path_AR
33113if test -n "$AR"; then
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33115$as_echo "$AR" >&6; }
33116else
33117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33118$as_echo "no" >&6; }
33119fi
33120
33121
33122        if test "x$AR" = x; then
33123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33124        fi
33125      else
33126        # Otherwise we believe it is a complete path. Use it as it is.
33127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33128$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33130$as_echo_n "checking for AR... " >&6; }
33131        if test ! -x "$tool_specified"; then
33132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33133$as_echo "not found" >&6; }
33134          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33135        fi
33136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33137$as_echo "$tool_specified" >&6; }
33138      fi
33139    fi
33140  fi
33141
33142
33143
33144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33145
33146  # First separate the path from the arguments. This will split at the first
33147  # space.
33148  complete="$AR"
33149  path="${complete%% *}"
33150  tmp="$complete EOL"
33151  arguments="${tmp#* }"
33152
33153  # Input might be given as Windows format, start by converting to
33154  # unix format.
33155  new_path=`$CYGPATH -u "$path"`
33156
33157  # Now try to locate executable using which
33158  new_path=`$WHICH "$new_path" 2> /dev/null`
33159  # bat and cmd files are not always considered executable in cygwin causing which
33160  # to not find them
33161  if test "x$new_path" = x \
33162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33164    new_path=`$CYGPATH -u "$path"`
33165  fi
33166  if test "x$new_path" = x; then
33167    # Oops. Which didn't find the executable.
33168    # The splitting of arguments from the executable at a space might have been incorrect,
33169    # since paths with space are more likely in Windows. Give it another try with the whole
33170    # argument.
33171    path="$complete"
33172    arguments="EOL"
33173    new_path=`$CYGPATH -u "$path"`
33174    new_path=`$WHICH "$new_path" 2> /dev/null`
33175    # bat and cmd files are not always considered executable in cygwin causing which
33176    # to not find them
33177    if test "x$new_path" = x \
33178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33180      new_path=`$CYGPATH -u "$path"`
33181    fi
33182    if test "x$new_path" = x; then
33183      # It's still not found. Now this is an unrecoverable error.
33184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33185$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33186      has_space=`$ECHO "$complete" | $GREP " "`
33187      if test "x$has_space" != x; then
33188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33190      fi
33191      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33192    fi
33193  fi
33194
33195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33198  # "foo.exe" is OK but "foo" is an error.
33199  #
33200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33201  # It is also a way to make sure we got the proper file name for the real test later on.
33202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33203  if test "x$test_shortpath" = x; then
33204    # Short path failed, file does not exist as specified.
33205    # Try adding .exe or .cmd
33206    if test -f "${new_path}.exe"; then
33207      input_to_shortpath="${new_path}.exe"
33208    elif test -f "${new_path}.cmd"; then
33209      input_to_shortpath="${new_path}.cmd"
33210    else
33211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33212$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33215      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33216    fi
33217  else
33218    input_to_shortpath="$new_path"
33219  fi
33220
33221  # Call helper function which possibly converts this using DOS-style short mode.
33222  # If so, the updated path is stored in $new_path.
33223  new_path="$input_to_shortpath"
33224
33225  input_path="$input_to_shortpath"
33226  # Check if we need to convert this using DOS-style short mode. If the path
33227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33228  # take no chances and rewrite it.
33229  # Note: m4 eats our [], so we need to use [ and ] instead.
33230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33231  if test "x$has_forbidden_chars" != x; then
33232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33236      # Going to short mode and back again did indeed matter. Since short mode is
33237      # case insensitive, let's make it lowercase to improve readability.
33238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33239      # Now convert it back to Unix-stile (cygpath)
33240      input_path=`$CYGPATH -u "$shortmode_path"`
33241      new_path="$input_path"
33242    fi
33243  fi
33244
33245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33246  if test "x$test_cygdrive_prefix" = x; then
33247    # As a simple fix, exclude /usr/bin since it's not a real path.
33248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33250      # a path prefixed by /cygdrive for fixpath to work.
33251      new_path="$CYGWIN_ROOT_PATH$input_path"
33252    fi
33253  fi
33254
33255  # remove trailing .exe if any
33256  new_path="${new_path/%.exe/}"
33257
33258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33259
33260  # First separate the path from the arguments. This will split at the first
33261  # space.
33262  complete="$AR"
33263  path="${complete%% *}"
33264  tmp="$complete EOL"
33265  arguments="${tmp#* }"
33266
33267  # Input might be given as Windows format, start by converting to
33268  # unix format.
33269  new_path="$path"
33270
33271  windows_path="$new_path"
33272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33273    unix_path=`$CYGPATH -u "$windows_path"`
33274    new_path="$unix_path"
33275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33277    new_path="$unix_path"
33278  fi
33279
33280
33281  # Now try to locate executable using which
33282  new_path=`$WHICH "$new_path" 2> /dev/null`
33283
33284  if test "x$new_path" = x; then
33285    # Oops. Which didn't find the executable.
33286    # The splitting of arguments from the executable at a space might have been incorrect,
33287    # since paths with space are more likely in Windows. Give it another try with the whole
33288    # argument.
33289    path="$complete"
33290    arguments="EOL"
33291    new_path="$path"
33292
33293  windows_path="$new_path"
33294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33295    unix_path=`$CYGPATH -u "$windows_path"`
33296    new_path="$unix_path"
33297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33299    new_path="$unix_path"
33300  fi
33301
33302
33303    new_path=`$WHICH "$new_path" 2> /dev/null`
33304
33305    if test "x$new_path" = x; then
33306      # It's still not found. Now this is an unrecoverable error.
33307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33308$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33309      has_space=`$ECHO "$complete" | $GREP " "`
33310      if test "x$has_space" != x; then
33311        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33312$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33313      fi
33314      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33315    fi
33316  fi
33317
33318  # Now new_path has a complete unix path to the binary
33319  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33320    # Keep paths in /bin as-is, but remove trailing .exe if any
33321    new_path="${new_path/%.exe/}"
33322    # Do not save /bin paths to all_fixpath_prefixes!
33323  else
33324    # Not in mixed or Windows style, start by that.
33325    new_path=`cmd //c echo $new_path`
33326
33327  input_path="$new_path"
33328  # Check if we need to convert this using DOS-style short mode. If the path
33329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33330  # take no chances and rewrite it.
33331  # Note: m4 eats our [], so we need to use [ and ] instead.
33332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33333  if test "x$has_forbidden_chars" != x; then
33334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33335    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33336  fi
33337
33338    # Output is in $new_path
33339
33340  windows_path="$new_path"
33341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33342    unix_path=`$CYGPATH -u "$windows_path"`
33343    new_path="$unix_path"
33344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33346    new_path="$unix_path"
33347  fi
33348
33349    # remove trailing .exe if any
33350    new_path="${new_path/%.exe/}"
33351
33352    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33353    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33354  fi
33355
33356  else
33357    # We're on a posix platform. Hooray! :)
33358    # First separate the path from the arguments. This will split at the first
33359    # space.
33360    complete="$AR"
33361    path="${complete%% *}"
33362    tmp="$complete EOL"
33363    arguments="${tmp#* }"
33364
33365    # Cannot rely on the command "which" here since it doesn't always work.
33366    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33367    if test -z "$is_absolute_path"; then
33368      # Path to executable is not absolute. Find it.
33369      IFS_save="$IFS"
33370      IFS=:
33371      for p in $PATH; do
33372        if test -f "$p/$path" && test -x "$p/$path"; then
33373          new_path="$p/$path"
33374          break
33375        fi
33376      done
33377      IFS="$IFS_save"
33378    else
33379      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
33380$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
33381      new_path="$path"
33382    fi
33383
33384    if test "x$new_path" = x; then
33385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33386$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33387      has_space=`$ECHO "$complete" | $GREP " "`
33388      if test "x$has_space" != x; then
33389        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33390$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33391      fi
33392      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33393    fi
33394  fi
33395
33396  # Now join together the path and the arguments once again
33397  if test "x$arguments" != xEOL; then
33398    new_complete="$new_path ${arguments% *}"
33399  else
33400    new_complete="$new_path"
33401  fi
33402
33403  if test "x$complete" != "x$new_complete"; then
33404    AR="$new_complete"
33405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33406$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33407  fi
33408
33409  fi
33410  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
33411    ARFLAGS="-r"
33412  elif test "x$OPENJDK_TARGET_OS" = xaix; then
33413    ARFLAGS="-X64"
33414  else
33415    ARFLAGS=""
33416  fi
33417
33418
33419  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
33420  HOTSPOT_CXX="$CXX"
33421  HOTSPOT_LD="$LD"
33422
33423
33424
33425  COMPILER_NAME=gcc
33426  COMPILER_TYPE=CC
33427  if test "x$OPENJDK_TARGET_OS" = xwindows; then :
33428
33429    # For now, assume that we are always compiling using cl.exe.
33430    CC_OUT_OPTION=-Fo
33431    EXE_OUT_OPTION=-out:
33432    LD_OUT_OPTION=-out:
33433    AR_OUT_OPTION=-out:
33434    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
33435    # program for something completely different.
33436    # Extract the first word of "link", so it can be a program name with args.
33437set dummy link; ac_word=$2
33438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33439$as_echo_n "checking for $ac_word... " >&6; }
33440if ${ac_cv_prog_WINLD+:} false; then :
33441  $as_echo_n "(cached) " >&6
33442else
33443  if test -n "$WINLD"; then
33444  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
33445else
33446  ac_prog_rejected=no
33447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33448for as_dir in $PATH
33449do
33450  IFS=$as_save_IFS
33451  test -z "$as_dir" && as_dir=.
33452    for ac_exec_ext in '' $ac_executable_extensions; do
33453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33454    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33455       ac_prog_rejected=yes
33456       continue
33457     fi
33458    ac_cv_prog_WINLD="link"
33459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33460    break 2
33461  fi
33462done
33463  done
33464IFS=$as_save_IFS
33465
33466if test $ac_prog_rejected = yes; then
33467  # We found a bogon in the path, so make sure we never use it.
33468  set dummy $ac_cv_prog_WINLD
33469  shift
33470  if test $# != 0; then
33471    # We chose a different compiler from the bogus one.
33472    # However, it has the same basename, so the bogon will be chosen
33473    # first if we set WINLD to just the basename; use the full file name.
33474    shift
33475    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
33476  fi
33477fi
33478fi
33479fi
33480WINLD=$ac_cv_prog_WINLD
33481if test -n "$WINLD"; then
33482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
33483$as_echo "$WINLD" >&6; }
33484else
33485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33486$as_echo "no" >&6; }
33487fi
33488
33489
33490    # Since we must ignore the first found link, WINLD will contain
33491    # the full path to the link.exe program.
33492
33493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33494
33495  # First separate the path from the arguments. This will split at the first
33496  # space.
33497  complete="$WINLD"
33498  path="${complete%% *}"
33499  tmp="$complete EOL"
33500  arguments="${tmp#* }"
33501
33502  # Input might be given as Windows format, start by converting to
33503  # unix format.
33504  new_path=`$CYGPATH -u "$path"`
33505
33506  # Now try to locate executable using which
33507  new_path=`$WHICH "$new_path" 2> /dev/null`
33508  # bat and cmd files are not always considered executable in cygwin causing which
33509  # to not find them
33510  if test "x$new_path" = x \
33511      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33512      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33513    new_path=`$CYGPATH -u "$path"`
33514  fi
33515  if test "x$new_path" = x; then
33516    # Oops. Which didn't find the executable.
33517    # The splitting of arguments from the executable at a space might have been incorrect,
33518    # since paths with space are more likely in Windows. Give it another try with the whole
33519    # argument.
33520    path="$complete"
33521    arguments="EOL"
33522    new_path=`$CYGPATH -u "$path"`
33523    new_path=`$WHICH "$new_path" 2> /dev/null`
33524    # bat and cmd files are not always considered executable in cygwin causing which
33525    # to not find them
33526    if test "x$new_path" = x \
33527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33529      new_path=`$CYGPATH -u "$path"`
33530    fi
33531    if test "x$new_path" = x; then
33532      # It's still not found. Now this is an unrecoverable error.
33533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33534$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33535      has_space=`$ECHO "$complete" | $GREP " "`
33536      if test "x$has_space" != x; then
33537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33539      fi
33540      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33541    fi
33542  fi
33543
33544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33547  # "foo.exe" is OK but "foo" is an error.
33548  #
33549  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33550  # It is also a way to make sure we got the proper file name for the real test later on.
33551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33552  if test "x$test_shortpath" = x; then
33553    # Short path failed, file does not exist as specified.
33554    # Try adding .exe or .cmd
33555    if test -f "${new_path}.exe"; then
33556      input_to_shortpath="${new_path}.exe"
33557    elif test -f "${new_path}.cmd"; then
33558      input_to_shortpath="${new_path}.cmd"
33559    else
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
33561$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
33562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33564      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33565    fi
33566  else
33567    input_to_shortpath="$new_path"
33568  fi
33569
33570  # Call helper function which possibly converts this using DOS-style short mode.
33571  # If so, the updated path is stored in $new_path.
33572  new_path="$input_to_shortpath"
33573
33574  input_path="$input_to_shortpath"
33575  # Check if we need to convert this using DOS-style short mode. If the path
33576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33577  # take no chances and rewrite it.
33578  # Note: m4 eats our [], so we need to use [ and ] instead.
33579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33580  if test "x$has_forbidden_chars" != x; then
33581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33585      # Going to short mode and back again did indeed matter. Since short mode is
33586      # case insensitive, let's make it lowercase to improve readability.
33587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33588      # Now convert it back to Unix-stile (cygpath)
33589      input_path=`$CYGPATH -u "$shortmode_path"`
33590      new_path="$input_path"
33591    fi
33592  fi
33593
33594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33595  if test "x$test_cygdrive_prefix" = x; then
33596    # As a simple fix, exclude /usr/bin since it's not a real path.
33597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33599      # a path prefixed by /cygdrive for fixpath to work.
33600      new_path="$CYGWIN_ROOT_PATH$input_path"
33601    fi
33602  fi
33603
33604  # remove trailing .exe if any
33605  new_path="${new_path/%.exe/}"
33606
33607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33608
33609  # First separate the path from the arguments. This will split at the first
33610  # space.
33611  complete="$WINLD"
33612  path="${complete%% *}"
33613  tmp="$complete EOL"
33614  arguments="${tmp#* }"
33615
33616  # Input might be given as Windows format, start by converting to
33617  # unix format.
33618  new_path="$path"
33619
33620  windows_path="$new_path"
33621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33622    unix_path=`$CYGPATH -u "$windows_path"`
33623    new_path="$unix_path"
33624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33626    new_path="$unix_path"
33627  fi
33628
33629
33630  # Now try to locate executable using which
33631  new_path=`$WHICH "$new_path" 2> /dev/null`
33632
33633  if test "x$new_path" = x; then
33634    # Oops. Which didn't find the executable.
33635    # The splitting of arguments from the executable at a space might have been incorrect,
33636    # since paths with space are more likely in Windows. Give it another try with the whole
33637    # argument.
33638    path="$complete"
33639    arguments="EOL"
33640    new_path="$path"
33641
33642  windows_path="$new_path"
33643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33644    unix_path=`$CYGPATH -u "$windows_path"`
33645    new_path="$unix_path"
33646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33648    new_path="$unix_path"
33649  fi
33650
33651
33652    new_path=`$WHICH "$new_path" 2> /dev/null`
33653
33654    if test "x$new_path" = x; then
33655      # It's still not found. Now this is an unrecoverable error.
33656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33657$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33658      has_space=`$ECHO "$complete" | $GREP " "`
33659      if test "x$has_space" != x; then
33660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33662      fi
33663      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33664    fi
33665  fi
33666
33667  # Now new_path has a complete unix path to the binary
33668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33669    # Keep paths in /bin as-is, but remove trailing .exe if any
33670    new_path="${new_path/%.exe/}"
33671    # Do not save /bin paths to all_fixpath_prefixes!
33672  else
33673    # Not in mixed or Windows style, start by that.
33674    new_path=`cmd //c echo $new_path`
33675
33676  input_path="$new_path"
33677  # Check if we need to convert this using DOS-style short mode. If the path
33678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33679  # take no chances and rewrite it.
33680  # Note: m4 eats our [], so we need to use [ and ] instead.
33681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33682  if test "x$has_forbidden_chars" != x; then
33683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33685  fi
33686
33687    # Output is in $new_path
33688
33689  windows_path="$new_path"
33690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33691    unix_path=`$CYGPATH -u "$windows_path"`
33692    new_path="$unix_path"
33693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33695    new_path="$unix_path"
33696  fi
33697
33698    # remove trailing .exe if any
33699    new_path="${new_path/%.exe/}"
33700
33701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33703  fi
33704
33705  else
33706    # We're on a posix platform. Hooray! :)
33707    # First separate the path from the arguments. This will split at the first
33708    # space.
33709    complete="$WINLD"
33710    path="${complete%% *}"
33711    tmp="$complete EOL"
33712    arguments="${tmp#* }"
33713
33714    # Cannot rely on the command "which" here since it doesn't always work.
33715    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33716    if test -z "$is_absolute_path"; then
33717      # Path to executable is not absolute. Find it.
33718      IFS_save="$IFS"
33719      IFS=:
33720      for p in $PATH; do
33721        if test -f "$p/$path" && test -x "$p/$path"; then
33722          new_path="$p/$path"
33723          break
33724        fi
33725      done
33726      IFS="$IFS_save"
33727    else
33728      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
33729$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
33730      new_path="$path"
33731    fi
33732
33733    if test "x$new_path" = x; then
33734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33735$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33736      has_space=`$ECHO "$complete" | $GREP " "`
33737      if test "x$has_space" != x; then
33738        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33740      fi
33741      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33742    fi
33743  fi
33744
33745  # Now join together the path and the arguments once again
33746  if test "x$arguments" != xEOL; then
33747    new_complete="$new_path ${arguments% *}"
33748  else
33749    new_complete="$new_path"
33750  fi
33751
33752  if test "x$complete" != "x$new_complete"; then
33753    WINLD="$new_complete"
33754    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
33755$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
33756  fi
33757
33758    printf "Windows linker was found at $WINLD\n"
33759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33760$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33761    "$WINLD" --version > /dev/null
33762    if test $? -eq 0 ; then
33763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33764$as_echo "no" >&6; }
33765      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33766    else
33767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33768$as_echo "yes" >&6; }
33769    fi
33770    LD="$WINLD"
33771    LDEXE="$WINLD"
33772    LDCXX="$WINLD"
33773    LDEXECXX="$WINLD"
33774
33775    # Extract the first word of "mt", so it can be a program name with args.
33776set dummy mt; ac_word=$2
33777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33778$as_echo_n "checking for $ac_word... " >&6; }
33779if ${ac_cv_prog_MT+:} false; then :
33780  $as_echo_n "(cached) " >&6
33781else
33782  if test -n "$MT"; then
33783  ac_cv_prog_MT="$MT" # Let the user override the test.
33784else
33785  ac_prog_rejected=no
33786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33787for as_dir in $PATH
33788do
33789  IFS=$as_save_IFS
33790  test -z "$as_dir" && as_dir=.
33791    for ac_exec_ext in '' $ac_executable_extensions; do
33792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33793    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33794       ac_prog_rejected=yes
33795       continue
33796     fi
33797    ac_cv_prog_MT="mt"
33798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33799    break 2
33800  fi
33801done
33802  done
33803IFS=$as_save_IFS
33804
33805if test $ac_prog_rejected = yes; then
33806  # We found a bogon in the path, so make sure we never use it.
33807  set dummy $ac_cv_prog_MT
33808  shift
33809  if test $# != 0; then
33810    # We chose a different compiler from the bogus one.
33811    # However, it has the same basename, so the bogon will be chosen
33812    # first if we set MT to just the basename; use the full file name.
33813    shift
33814    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33815  fi
33816fi
33817fi
33818fi
33819MT=$ac_cv_prog_MT
33820if test -n "$MT"; then
33821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33822$as_echo "$MT" >&6; }
33823else
33824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33825$as_echo "no" >&6; }
33826fi
33827
33828
33829
33830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33831
33832  # First separate the path from the arguments. This will split at the first
33833  # space.
33834  complete="$MT"
33835  path="${complete%% *}"
33836  tmp="$complete EOL"
33837  arguments="${tmp#* }"
33838
33839  # Input might be given as Windows format, start by converting to
33840  # unix format.
33841  new_path=`$CYGPATH -u "$path"`
33842
33843  # Now try to locate executable using which
33844  new_path=`$WHICH "$new_path" 2> /dev/null`
33845  # bat and cmd files are not always considered executable in cygwin causing which
33846  # to not find them
33847  if test "x$new_path" = x \
33848      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33849      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33850    new_path=`$CYGPATH -u "$path"`
33851  fi
33852  if test "x$new_path" = x; then
33853    # Oops. Which didn't find the executable.
33854    # The splitting of arguments from the executable at a space might have been incorrect,
33855    # since paths with space are more likely in Windows. Give it another try with the whole
33856    # argument.
33857    path="$complete"
33858    arguments="EOL"
33859    new_path=`$CYGPATH -u "$path"`
33860    new_path=`$WHICH "$new_path" 2> /dev/null`
33861    # bat and cmd files are not always considered executable in cygwin causing which
33862    # to not find them
33863    if test "x$new_path" = x \
33864        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33865        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33866      new_path=`$CYGPATH -u "$path"`
33867    fi
33868    if test "x$new_path" = x; then
33869      # It's still not found. Now this is an unrecoverable error.
33870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33871$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33872      has_space=`$ECHO "$complete" | $GREP " "`
33873      if test "x$has_space" != x; then
33874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33876      fi
33877      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33878    fi
33879  fi
33880
33881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33884  # "foo.exe" is OK but "foo" is an error.
33885  #
33886  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33887  # It is also a way to make sure we got the proper file name for the real test later on.
33888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33889  if test "x$test_shortpath" = x; then
33890    # Short path failed, file does not exist as specified.
33891    # Try adding .exe or .cmd
33892    if test -f "${new_path}.exe"; then
33893      input_to_shortpath="${new_path}.exe"
33894    elif test -f "${new_path}.cmd"; then
33895      input_to_shortpath="${new_path}.cmd"
33896    else
33897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33898$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33899      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33900$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33901      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33902    fi
33903  else
33904    input_to_shortpath="$new_path"
33905  fi
33906
33907  # Call helper function which possibly converts this using DOS-style short mode.
33908  # If so, the updated path is stored in $new_path.
33909  new_path="$input_to_shortpath"
33910
33911  input_path="$input_to_shortpath"
33912  # Check if we need to convert this using DOS-style short mode. If the path
33913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33914  # take no chances and rewrite it.
33915  # Note: m4 eats our [], so we need to use [ and ] instead.
33916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33917  if test "x$has_forbidden_chars" != x; then
33918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33922      # Going to short mode and back again did indeed matter. Since short mode is
33923      # case insensitive, let's make it lowercase to improve readability.
33924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33925      # Now convert it back to Unix-stile (cygpath)
33926      input_path=`$CYGPATH -u "$shortmode_path"`
33927      new_path="$input_path"
33928    fi
33929  fi
33930
33931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33932  if test "x$test_cygdrive_prefix" = x; then
33933    # As a simple fix, exclude /usr/bin since it's not a real path.
33934    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33936      # a path prefixed by /cygdrive for fixpath to work.
33937      new_path="$CYGWIN_ROOT_PATH$input_path"
33938    fi
33939  fi
33940
33941  # remove trailing .exe if any
33942  new_path="${new_path/%.exe/}"
33943
33944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33945
33946  # First separate the path from the arguments. This will split at the first
33947  # space.
33948  complete="$MT"
33949  path="${complete%% *}"
33950  tmp="$complete EOL"
33951  arguments="${tmp#* }"
33952
33953  # Input might be given as Windows format, start by converting to
33954  # unix format.
33955  new_path="$path"
33956
33957  windows_path="$new_path"
33958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33959    unix_path=`$CYGPATH -u "$windows_path"`
33960    new_path="$unix_path"
33961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33963    new_path="$unix_path"
33964  fi
33965
33966
33967  # Now try to locate executable using which
33968  new_path=`$WHICH "$new_path" 2> /dev/null`
33969
33970  if test "x$new_path" = x; then
33971    # Oops. Which didn't find the executable.
33972    # The splitting of arguments from the executable at a space might have been incorrect,
33973    # since paths with space are more likely in Windows. Give it another try with the whole
33974    # argument.
33975    path="$complete"
33976    arguments="EOL"
33977    new_path="$path"
33978
33979  windows_path="$new_path"
33980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33981    unix_path=`$CYGPATH -u "$windows_path"`
33982    new_path="$unix_path"
33983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33985    new_path="$unix_path"
33986  fi
33987
33988
33989    new_path=`$WHICH "$new_path" 2> /dev/null`
33990
33991    if test "x$new_path" = x; then
33992      # It's still not found. Now this is an unrecoverable error.
33993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33994$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33995      has_space=`$ECHO "$complete" | $GREP " "`
33996      if test "x$has_space" != x; then
33997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33999      fi
34000      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34001    fi
34002  fi
34003
34004  # Now new_path has a complete unix path to the binary
34005  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34006    # Keep paths in /bin as-is, but remove trailing .exe if any
34007    new_path="${new_path/%.exe/}"
34008    # Do not save /bin paths to all_fixpath_prefixes!
34009  else
34010    # Not in mixed or Windows style, start by that.
34011    new_path=`cmd //c echo $new_path`
34012
34013  input_path="$new_path"
34014  # Check if we need to convert this using DOS-style short mode. If the path
34015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34016  # take no chances and rewrite it.
34017  # Note: m4 eats our [], so we need to use [ and ] instead.
34018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34019  if test "x$has_forbidden_chars" != x; then
34020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34022  fi
34023
34024    # Output is in $new_path
34025
34026  windows_path="$new_path"
34027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34028    unix_path=`$CYGPATH -u "$windows_path"`
34029    new_path="$unix_path"
34030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34032    new_path="$unix_path"
34033  fi
34034
34035    # remove trailing .exe if any
34036    new_path="${new_path/%.exe/}"
34037
34038    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34039    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34040  fi
34041
34042  else
34043    # We're on a posix platform. Hooray! :)
34044    # First separate the path from the arguments. This will split at the first
34045    # space.
34046    complete="$MT"
34047    path="${complete%% *}"
34048    tmp="$complete EOL"
34049    arguments="${tmp#* }"
34050
34051    # Cannot rely on the command "which" here since it doesn't always work.
34052    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34053    if test -z "$is_absolute_path"; then
34054      # Path to executable is not absolute. Find it.
34055      IFS_save="$IFS"
34056      IFS=:
34057      for p in $PATH; do
34058        if test -f "$p/$path" && test -x "$p/$path"; then
34059          new_path="$p/$path"
34060          break
34061        fi
34062      done
34063      IFS="$IFS_save"
34064    else
34065      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
34066$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
34067      new_path="$path"
34068    fi
34069
34070    if test "x$new_path" = x; then
34071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34072$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34073      has_space=`$ECHO "$complete" | $GREP " "`
34074      if test "x$has_space" != x; then
34075        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34077      fi
34078      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34079    fi
34080  fi
34081
34082  # Now join together the path and the arguments once again
34083  if test "x$arguments" != xEOL; then
34084    new_complete="$new_path ${arguments% *}"
34085  else
34086    new_complete="$new_path"
34087  fi
34088
34089  if test "x$complete" != "x$new_complete"; then
34090    MT="$new_complete"
34091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34092$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34093  fi
34094
34095    # The resource compiler
34096    # Extract the first word of "rc", so it can be a program name with args.
34097set dummy rc; ac_word=$2
34098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34099$as_echo_n "checking for $ac_word... " >&6; }
34100if ${ac_cv_prog_RC+:} false; then :
34101  $as_echo_n "(cached) " >&6
34102else
34103  if test -n "$RC"; then
34104  ac_cv_prog_RC="$RC" # Let the user override the test.
34105else
34106  ac_prog_rejected=no
34107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34108for as_dir in $PATH
34109do
34110  IFS=$as_save_IFS
34111  test -z "$as_dir" && as_dir=.
34112    for ac_exec_ext in '' $ac_executable_extensions; do
34113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34114    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34115       ac_prog_rejected=yes
34116       continue
34117     fi
34118    ac_cv_prog_RC="rc"
34119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34120    break 2
34121  fi
34122done
34123  done
34124IFS=$as_save_IFS
34125
34126if test $ac_prog_rejected = yes; then
34127  # We found a bogon in the path, so make sure we never use it.
34128  set dummy $ac_cv_prog_RC
34129  shift
34130  if test $# != 0; then
34131    # We chose a different compiler from the bogus one.
34132    # However, it has the same basename, so the bogon will be chosen
34133    # first if we set RC to just the basename; use the full file name.
34134    shift
34135    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34136  fi
34137fi
34138fi
34139fi
34140RC=$ac_cv_prog_RC
34141if test -n "$RC"; then
34142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34143$as_echo "$RC" >&6; }
34144else
34145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34146$as_echo "no" >&6; }
34147fi
34148
34149
34150
34151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34152
34153  # First separate the path from the arguments. This will split at the first
34154  # space.
34155  complete="$RC"
34156  path="${complete%% *}"
34157  tmp="$complete EOL"
34158  arguments="${tmp#* }"
34159
34160  # Input might be given as Windows format, start by converting to
34161  # unix format.
34162  new_path=`$CYGPATH -u "$path"`
34163
34164  # Now try to locate executable using which
34165  new_path=`$WHICH "$new_path" 2> /dev/null`
34166  # bat and cmd files are not always considered executable in cygwin causing which
34167  # to not find them
34168  if test "x$new_path" = x \
34169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34171    new_path=`$CYGPATH -u "$path"`
34172  fi
34173  if test "x$new_path" = x; then
34174    # Oops. Which didn't find the executable.
34175    # The splitting of arguments from the executable at a space might have been incorrect,
34176    # since paths with space are more likely in Windows. Give it another try with the whole
34177    # argument.
34178    path="$complete"
34179    arguments="EOL"
34180    new_path=`$CYGPATH -u "$path"`
34181    new_path=`$WHICH "$new_path" 2> /dev/null`
34182    # bat and cmd files are not always considered executable in cygwin causing which
34183    # to not find them
34184    if test "x$new_path" = x \
34185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34187      new_path=`$CYGPATH -u "$path"`
34188    fi
34189    if test "x$new_path" = x; then
34190      # It's still not found. Now this is an unrecoverable error.
34191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34192$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34193      has_space=`$ECHO "$complete" | $GREP " "`
34194      if test "x$has_space" != x; then
34195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34197      fi
34198      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34199    fi
34200  fi
34201
34202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34205  # "foo.exe" is OK but "foo" is an error.
34206  #
34207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34208  # It is also a way to make sure we got the proper file name for the real test later on.
34209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34210  if test "x$test_shortpath" = x; then
34211    # Short path failed, file does not exist as specified.
34212    # Try adding .exe or .cmd
34213    if test -f "${new_path}.exe"; then
34214      input_to_shortpath="${new_path}.exe"
34215    elif test -f "${new_path}.cmd"; then
34216      input_to_shortpath="${new_path}.cmd"
34217    else
34218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34219$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34222      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34223    fi
34224  else
34225    input_to_shortpath="$new_path"
34226  fi
34227
34228  # Call helper function which possibly converts this using DOS-style short mode.
34229  # If so, the updated path is stored in $new_path.
34230  new_path="$input_to_shortpath"
34231
34232  input_path="$input_to_shortpath"
34233  # Check if we need to convert this using DOS-style short mode. If the path
34234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34235  # take no chances and rewrite it.
34236  # Note: m4 eats our [], so we need to use [ and ] instead.
34237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34238  if test "x$has_forbidden_chars" != x; then
34239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34243      # Going to short mode and back again did indeed matter. Since short mode is
34244      # case insensitive, let's make it lowercase to improve readability.
34245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34246      # Now convert it back to Unix-stile (cygpath)
34247      input_path=`$CYGPATH -u "$shortmode_path"`
34248      new_path="$input_path"
34249    fi
34250  fi
34251
34252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34253  if test "x$test_cygdrive_prefix" = x; then
34254    # As a simple fix, exclude /usr/bin since it's not a real path.
34255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34257      # a path prefixed by /cygdrive for fixpath to work.
34258      new_path="$CYGWIN_ROOT_PATH$input_path"
34259    fi
34260  fi
34261
34262  # remove trailing .exe if any
34263  new_path="${new_path/%.exe/}"
34264
34265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34266
34267  # First separate the path from the arguments. This will split at the first
34268  # space.
34269  complete="$RC"
34270  path="${complete%% *}"
34271  tmp="$complete EOL"
34272  arguments="${tmp#* }"
34273
34274  # Input might be given as Windows format, start by converting to
34275  # unix format.
34276  new_path="$path"
34277
34278  windows_path="$new_path"
34279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34280    unix_path=`$CYGPATH -u "$windows_path"`
34281    new_path="$unix_path"
34282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34284    new_path="$unix_path"
34285  fi
34286
34287
34288  # Now try to locate executable using which
34289  new_path=`$WHICH "$new_path" 2> /dev/null`
34290
34291  if test "x$new_path" = x; then
34292    # Oops. Which didn't find the executable.
34293    # The splitting of arguments from the executable at a space might have been incorrect,
34294    # since paths with space are more likely in Windows. Give it another try with the whole
34295    # argument.
34296    path="$complete"
34297    arguments="EOL"
34298    new_path="$path"
34299
34300  windows_path="$new_path"
34301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34302    unix_path=`$CYGPATH -u "$windows_path"`
34303    new_path="$unix_path"
34304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34306    new_path="$unix_path"
34307  fi
34308
34309
34310    new_path=`$WHICH "$new_path" 2> /dev/null`
34311
34312    if test "x$new_path" = x; then
34313      # It's still not found. Now this is an unrecoverable error.
34314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34315$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34316      has_space=`$ECHO "$complete" | $GREP " "`
34317      if test "x$has_space" != x; then
34318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34320      fi
34321      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34322    fi
34323  fi
34324
34325  # Now new_path has a complete unix path to the binary
34326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34327    # Keep paths in /bin as-is, but remove trailing .exe if any
34328    new_path="${new_path/%.exe/}"
34329    # Do not save /bin paths to all_fixpath_prefixes!
34330  else
34331    # Not in mixed or Windows style, start by that.
34332    new_path=`cmd //c echo $new_path`
34333
34334  input_path="$new_path"
34335  # Check if we need to convert this using DOS-style short mode. If the path
34336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34337  # take no chances and rewrite it.
34338  # Note: m4 eats our [], so we need to use [ and ] instead.
34339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34340  if test "x$has_forbidden_chars" != x; then
34341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34343  fi
34344
34345    # Output is in $new_path
34346
34347  windows_path="$new_path"
34348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34349    unix_path=`$CYGPATH -u "$windows_path"`
34350    new_path="$unix_path"
34351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34353    new_path="$unix_path"
34354  fi
34355
34356    # remove trailing .exe if any
34357    new_path="${new_path/%.exe/}"
34358
34359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34361  fi
34362
34363  else
34364    # We're on a posix platform. Hooray! :)
34365    # First separate the path from the arguments. This will split at the first
34366    # space.
34367    complete="$RC"
34368    path="${complete%% *}"
34369    tmp="$complete EOL"
34370    arguments="${tmp#* }"
34371
34372    # Cannot rely on the command "which" here since it doesn't always work.
34373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34374    if test -z "$is_absolute_path"; then
34375      # Path to executable is not absolute. Find it.
34376      IFS_save="$IFS"
34377      IFS=:
34378      for p in $PATH; do
34379        if test -f "$p/$path" && test -x "$p/$path"; then
34380          new_path="$p/$path"
34381          break
34382        fi
34383      done
34384      IFS="$IFS_save"
34385    else
34386      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
34387$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
34388      new_path="$path"
34389    fi
34390
34391    if test "x$new_path" = x; then
34392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34393$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34394      has_space=`$ECHO "$complete" | $GREP " "`
34395      if test "x$has_space" != x; then
34396        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34398      fi
34399      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34400    fi
34401  fi
34402
34403  # Now join together the path and the arguments once again
34404  if test "x$arguments" != xEOL; then
34405    new_complete="$new_path ${arguments% *}"
34406  else
34407    new_complete="$new_path"
34408  fi
34409
34410  if test "x$complete" != "x$new_complete"; then
34411    RC="$new_complete"
34412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34413$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34414  fi
34415
34416
34417    # For hotspot, we need these in Windows mixed path,
34418    # so rewrite them all. Need added .exe suffix.
34419    HOTSPOT_CXX="$CXX.exe"
34420    HOTSPOT_LD="$LD.exe"
34421    HOTSPOT_MT="$MT.exe"
34422    HOTSPOT_RC="$RC.exe"
34423
34424  unix_path="$HOTSPOT_CXX"
34425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34426    windows_path=`$CYGPATH -m "$unix_path"`
34427    HOTSPOT_CXX="$windows_path"
34428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34429    windows_path=`cmd //c echo $unix_path`
34430    HOTSPOT_CXX="$windows_path"
34431  fi
34432
34433
34434  unix_path="$HOTSPOT_LD"
34435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34436    windows_path=`$CYGPATH -m "$unix_path"`
34437    HOTSPOT_LD="$windows_path"
34438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34439    windows_path=`cmd //c echo $unix_path`
34440    HOTSPOT_LD="$windows_path"
34441  fi
34442
34443
34444  unix_path="$HOTSPOT_MT"
34445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34446    windows_path=`$CYGPATH -m "$unix_path"`
34447    HOTSPOT_MT="$windows_path"
34448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34449    windows_path=`cmd //c echo $unix_path`
34450    HOTSPOT_MT="$windows_path"
34451  fi
34452
34453
34454  unix_path="$HOTSPOT_RC"
34455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34456    windows_path=`$CYGPATH -m "$unix_path"`
34457    HOTSPOT_RC="$windows_path"
34458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34459    windows_path=`cmd //c echo $unix_path`
34460    HOTSPOT_RC="$windows_path"
34461  fi
34462
34463
34464
34465
34466    RC_FLAGS="-nologo -l 0x409 -r"
34467    if test "x$VARIANT" = xOPT; then :
34468
34469    RC_FLAGS="$RC_FLAGS -d NDEBUG"
34470
34471fi
34472
34473  # The version variables used to create RC_FLAGS may be overridden
34474  # in a custom configure script, or possibly the command line.
34475  # Let those variables be expanded at make time in spec.gmk.
34476  # The \$ are escaped to the shell, and the $(...) variables
34477  # are evaluated by make.
34478  RC_FLAGS="$RC_FLAGS \
34479      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
34480      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
34481      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
34482      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
34483      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
34484      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
34485      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
34486
34487  # lib.exe is used to create static libraries.
34488  # Extract the first word of "lib", so it can be a program name with args.
34489set dummy lib; ac_word=$2
34490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34491$as_echo_n "checking for $ac_word... " >&6; }
34492if ${ac_cv_prog_WINAR+:} false; then :
34493  $as_echo_n "(cached) " >&6
34494else
34495  if test -n "$WINAR"; then
34496  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
34497else
34498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34499for as_dir in $PATH
34500do
34501  IFS=$as_save_IFS
34502  test -z "$as_dir" && as_dir=.
34503    for ac_exec_ext in '' $ac_executable_extensions; do
34504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34505    ac_cv_prog_WINAR="lib"
34506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34507    break 2
34508  fi
34509done
34510  done
34511IFS=$as_save_IFS
34512
34513fi
34514fi
34515WINAR=$ac_cv_prog_WINAR
34516if test -n "$WINAR"; then
34517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
34518$as_echo "$WINAR" >&6; }
34519else
34520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34521$as_echo "no" >&6; }
34522fi
34523
34524
34525
34526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34527
34528  # First separate the path from the arguments. This will split at the first
34529  # space.
34530  complete="$WINAR"
34531  path="${complete%% *}"
34532  tmp="$complete EOL"
34533  arguments="${tmp#* }"
34534
34535  # Input might be given as Windows format, start by converting to
34536  # unix format.
34537  new_path=`$CYGPATH -u "$path"`
34538
34539  # Now try to locate executable using which
34540  new_path=`$WHICH "$new_path" 2> /dev/null`
34541  # bat and cmd files are not always considered executable in cygwin causing which
34542  # to not find them
34543  if test "x$new_path" = x \
34544      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34545      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34546    new_path=`$CYGPATH -u "$path"`
34547  fi
34548  if test "x$new_path" = x; then
34549    # Oops. Which didn't find the executable.
34550    # The splitting of arguments from the executable at a space might have been incorrect,
34551    # since paths with space are more likely in Windows. Give it another try with the whole
34552    # argument.
34553    path="$complete"
34554    arguments="EOL"
34555    new_path=`$CYGPATH -u "$path"`
34556    new_path=`$WHICH "$new_path" 2> /dev/null`
34557    # bat and cmd files are not always considered executable in cygwin causing which
34558    # to not find them
34559    if test "x$new_path" = x \
34560        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34561        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34562      new_path=`$CYGPATH -u "$path"`
34563    fi
34564    if test "x$new_path" = x; then
34565      # It's still not found. Now this is an unrecoverable error.
34566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34567$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34568      has_space=`$ECHO "$complete" | $GREP " "`
34569      if test "x$has_space" != x; then
34570        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34571$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34572      fi
34573      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34574    fi
34575  fi
34576
34577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34580  # "foo.exe" is OK but "foo" is an error.
34581  #
34582  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34583  # It is also a way to make sure we got the proper file name for the real test later on.
34584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34585  if test "x$test_shortpath" = x; then
34586    # Short path failed, file does not exist as specified.
34587    # Try adding .exe or .cmd
34588    if test -f "${new_path}.exe"; then
34589      input_to_shortpath="${new_path}.exe"
34590    elif test -f "${new_path}.cmd"; then
34591      input_to_shortpath="${new_path}.cmd"
34592    else
34593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
34594$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
34595      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34596$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34597      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34598    fi
34599  else
34600    input_to_shortpath="$new_path"
34601  fi
34602
34603  # Call helper function which possibly converts this using DOS-style short mode.
34604  # If so, the updated path is stored in $new_path.
34605  new_path="$input_to_shortpath"
34606
34607  input_path="$input_to_shortpath"
34608  # Check if we need to convert this using DOS-style short mode. If the path
34609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34610  # take no chances and rewrite it.
34611  # Note: m4 eats our [], so we need to use [ and ] instead.
34612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34613  if test "x$has_forbidden_chars" != x; then
34614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34618      # Going to short mode and back again did indeed matter. Since short mode is
34619      # case insensitive, let's make it lowercase to improve readability.
34620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34621      # Now convert it back to Unix-stile (cygpath)
34622      input_path=`$CYGPATH -u "$shortmode_path"`
34623      new_path="$input_path"
34624    fi
34625  fi
34626
34627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34628  if test "x$test_cygdrive_prefix" = x; then
34629    # As a simple fix, exclude /usr/bin since it's not a real path.
34630    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34632      # a path prefixed by /cygdrive for fixpath to work.
34633      new_path="$CYGWIN_ROOT_PATH$input_path"
34634    fi
34635  fi
34636
34637  # remove trailing .exe if any
34638  new_path="${new_path/%.exe/}"
34639
34640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34641
34642  # First separate the path from the arguments. This will split at the first
34643  # space.
34644  complete="$WINAR"
34645  path="${complete%% *}"
34646  tmp="$complete EOL"
34647  arguments="${tmp#* }"
34648
34649  # Input might be given as Windows format, start by converting to
34650  # unix format.
34651  new_path="$path"
34652
34653  windows_path="$new_path"
34654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34655    unix_path=`$CYGPATH -u "$windows_path"`
34656    new_path="$unix_path"
34657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34659    new_path="$unix_path"
34660  fi
34661
34662
34663  # Now try to locate executable using which
34664  new_path=`$WHICH "$new_path" 2> /dev/null`
34665
34666  if test "x$new_path" = x; then
34667    # Oops. Which didn't find the executable.
34668    # The splitting of arguments from the executable at a space might have been incorrect,
34669    # since paths with space are more likely in Windows. Give it another try with the whole
34670    # argument.
34671    path="$complete"
34672    arguments="EOL"
34673    new_path="$path"
34674
34675  windows_path="$new_path"
34676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34677    unix_path=`$CYGPATH -u "$windows_path"`
34678    new_path="$unix_path"
34679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34681    new_path="$unix_path"
34682  fi
34683
34684
34685    new_path=`$WHICH "$new_path" 2> /dev/null`
34686
34687    if test "x$new_path" = x; then
34688      # It's still not found. Now this is an unrecoverable error.
34689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34690$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34691      has_space=`$ECHO "$complete" | $GREP " "`
34692      if test "x$has_space" != x; then
34693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34695      fi
34696      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34697    fi
34698  fi
34699
34700  # Now new_path has a complete unix path to the binary
34701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34702    # Keep paths in /bin as-is, but remove trailing .exe if any
34703    new_path="${new_path/%.exe/}"
34704    # Do not save /bin paths to all_fixpath_prefixes!
34705  else
34706    # Not in mixed or Windows style, start by that.
34707    new_path=`cmd //c echo $new_path`
34708
34709  input_path="$new_path"
34710  # Check if we need to convert this using DOS-style short mode. If the path
34711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34712  # take no chances and rewrite it.
34713  # Note: m4 eats our [], so we need to use [ and ] instead.
34714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34715  if test "x$has_forbidden_chars" != x; then
34716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34718  fi
34719
34720    # Output is in $new_path
34721
34722  windows_path="$new_path"
34723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34724    unix_path=`$CYGPATH -u "$windows_path"`
34725    new_path="$unix_path"
34726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34728    new_path="$unix_path"
34729  fi
34730
34731    # remove trailing .exe if any
34732    new_path="${new_path/%.exe/}"
34733
34734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34736  fi
34737
34738  else
34739    # We're on a posix platform. Hooray! :)
34740    # First separate the path from the arguments. This will split at the first
34741    # space.
34742    complete="$WINAR"
34743    path="${complete%% *}"
34744    tmp="$complete EOL"
34745    arguments="${tmp#* }"
34746
34747    # Cannot rely on the command "which" here since it doesn't always work.
34748    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34749    if test -z "$is_absolute_path"; then
34750      # Path to executable is not absolute. Find it.
34751      IFS_save="$IFS"
34752      IFS=:
34753      for p in $PATH; do
34754        if test -f "$p/$path" && test -x "$p/$path"; then
34755          new_path="$p/$path"
34756          break
34757        fi
34758      done
34759      IFS="$IFS_save"
34760    else
34761      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
34762$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
34763      new_path="$path"
34764    fi
34765
34766    if test "x$new_path" = x; then
34767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34768$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34769      has_space=`$ECHO "$complete" | $GREP " "`
34770      if test "x$has_space" != x; then
34771        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34772$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34773      fi
34774      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34775    fi
34776  fi
34777
34778  # Now join together the path and the arguments once again
34779  if test "x$arguments" != xEOL; then
34780    new_complete="$new_path ${arguments% *}"
34781  else
34782    new_complete="$new_path"
34783  fi
34784
34785  if test "x$complete" != "x$new_complete"; then
34786    WINAR="$new_complete"
34787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
34788$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
34789  fi
34790
34791  AR="$WINAR"
34792  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
34793
34794  # Extract the first word of "dumpbin", so it can be a program name with args.
34795set dummy dumpbin; ac_word=$2
34796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34797$as_echo_n "checking for $ac_word... " >&6; }
34798if ${ac_cv_prog_DUMPBIN+:} false; then :
34799  $as_echo_n "(cached) " >&6
34800else
34801  if test -n "$DUMPBIN"; then
34802  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34803else
34804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34805for as_dir in $PATH
34806do
34807  IFS=$as_save_IFS
34808  test -z "$as_dir" && as_dir=.
34809    for ac_exec_ext in '' $ac_executable_extensions; do
34810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34811    ac_cv_prog_DUMPBIN="dumpbin"
34812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34813    break 2
34814  fi
34815done
34816  done
34817IFS=$as_save_IFS
34818
34819fi
34820fi
34821DUMPBIN=$ac_cv_prog_DUMPBIN
34822if test -n "$DUMPBIN"; then
34823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34824$as_echo "$DUMPBIN" >&6; }
34825else
34826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34827$as_echo "no" >&6; }
34828fi
34829
34830
34831
34832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34833
34834  # First separate the path from the arguments. This will split at the first
34835  # space.
34836  complete="$DUMPBIN"
34837  path="${complete%% *}"
34838  tmp="$complete EOL"
34839  arguments="${tmp#* }"
34840
34841  # Input might be given as Windows format, start by converting to
34842  # unix format.
34843  new_path=`$CYGPATH -u "$path"`
34844
34845  # Now try to locate executable using which
34846  new_path=`$WHICH "$new_path" 2> /dev/null`
34847  # bat and cmd files are not always considered executable in cygwin causing which
34848  # to not find them
34849  if test "x$new_path" = x \
34850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34852    new_path=`$CYGPATH -u "$path"`
34853  fi
34854  if test "x$new_path" = x; then
34855    # Oops. Which didn't find the executable.
34856    # The splitting of arguments from the executable at a space might have been incorrect,
34857    # since paths with space are more likely in Windows. Give it another try with the whole
34858    # argument.
34859    path="$complete"
34860    arguments="EOL"
34861    new_path=`$CYGPATH -u "$path"`
34862    new_path=`$WHICH "$new_path" 2> /dev/null`
34863    # bat and cmd files are not always considered executable in cygwin causing which
34864    # to not find them
34865    if test "x$new_path" = x \
34866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34868      new_path=`$CYGPATH -u "$path"`
34869    fi
34870    if test "x$new_path" = x; then
34871      # It's still not found. Now this is an unrecoverable error.
34872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34873$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34874      has_space=`$ECHO "$complete" | $GREP " "`
34875      if test "x$has_space" != x; then
34876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34878      fi
34879      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34880    fi
34881  fi
34882
34883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34886  # "foo.exe" is OK but "foo" is an error.
34887  #
34888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34889  # It is also a way to make sure we got the proper file name for the real test later on.
34890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34891  if test "x$test_shortpath" = x; then
34892    # Short path failed, file does not exist as specified.
34893    # Try adding .exe or .cmd
34894    if test -f "${new_path}.exe"; then
34895      input_to_shortpath="${new_path}.exe"
34896    elif test -f "${new_path}.cmd"; then
34897      input_to_shortpath="${new_path}.cmd"
34898    else
34899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34900$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34903      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34904    fi
34905  else
34906    input_to_shortpath="$new_path"
34907  fi
34908
34909  # Call helper function which possibly converts this using DOS-style short mode.
34910  # If so, the updated path is stored in $new_path.
34911  new_path="$input_to_shortpath"
34912
34913  input_path="$input_to_shortpath"
34914  # Check if we need to convert this using DOS-style short mode. If the path
34915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34916  # take no chances and rewrite it.
34917  # Note: m4 eats our [], so we need to use [ and ] instead.
34918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34919  if test "x$has_forbidden_chars" != x; then
34920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34924      # Going to short mode and back again did indeed matter. Since short mode is
34925      # case insensitive, let's make it lowercase to improve readability.
34926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34927      # Now convert it back to Unix-stile (cygpath)
34928      input_path=`$CYGPATH -u "$shortmode_path"`
34929      new_path="$input_path"
34930    fi
34931  fi
34932
34933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34934  if test "x$test_cygdrive_prefix" = x; then
34935    # As a simple fix, exclude /usr/bin since it's not a real path.
34936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34938      # a path prefixed by /cygdrive for fixpath to work.
34939      new_path="$CYGWIN_ROOT_PATH$input_path"
34940    fi
34941  fi
34942
34943  # remove trailing .exe if any
34944  new_path="${new_path/%.exe/}"
34945
34946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34947
34948  # First separate the path from the arguments. This will split at the first
34949  # space.
34950  complete="$DUMPBIN"
34951  path="${complete%% *}"
34952  tmp="$complete EOL"
34953  arguments="${tmp#* }"
34954
34955  # Input might be given as Windows format, start by converting to
34956  # unix format.
34957  new_path="$path"
34958
34959  windows_path="$new_path"
34960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34961    unix_path=`$CYGPATH -u "$windows_path"`
34962    new_path="$unix_path"
34963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34965    new_path="$unix_path"
34966  fi
34967
34968
34969  # Now try to locate executable using which
34970  new_path=`$WHICH "$new_path" 2> /dev/null`
34971
34972  if test "x$new_path" = x; then
34973    # Oops. Which didn't find the executable.
34974    # The splitting of arguments from the executable at a space might have been incorrect,
34975    # since paths with space are more likely in Windows. Give it another try with the whole
34976    # argument.
34977    path="$complete"
34978    arguments="EOL"
34979    new_path="$path"
34980
34981  windows_path="$new_path"
34982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34983    unix_path=`$CYGPATH -u "$windows_path"`
34984    new_path="$unix_path"
34985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34987    new_path="$unix_path"
34988  fi
34989
34990
34991    new_path=`$WHICH "$new_path" 2> /dev/null`
34992
34993    if test "x$new_path" = x; then
34994      # It's still not found. Now this is an unrecoverable error.
34995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34996$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34997      has_space=`$ECHO "$complete" | $GREP " "`
34998      if test "x$has_space" != x; then
34999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35001      fi
35002      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35003    fi
35004  fi
35005
35006  # Now new_path has a complete unix path to the binary
35007  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35008    # Keep paths in /bin as-is, but remove trailing .exe if any
35009    new_path="${new_path/%.exe/}"
35010    # Do not save /bin paths to all_fixpath_prefixes!
35011  else
35012    # Not in mixed or Windows style, start by that.
35013    new_path=`cmd //c echo $new_path`
35014
35015  input_path="$new_path"
35016  # Check if we need to convert this using DOS-style short mode. If the path
35017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35018  # take no chances and rewrite it.
35019  # Note: m4 eats our [], so we need to use [ and ] instead.
35020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35021  if test "x$has_forbidden_chars" != x; then
35022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35024  fi
35025
35026    # Output is in $new_path
35027
35028  windows_path="$new_path"
35029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35030    unix_path=`$CYGPATH -u "$windows_path"`
35031    new_path="$unix_path"
35032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35034    new_path="$unix_path"
35035  fi
35036
35037    # remove trailing .exe if any
35038    new_path="${new_path/%.exe/}"
35039
35040    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35041    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35042  fi
35043
35044  else
35045    # We're on a posix platform. Hooray! :)
35046    # First separate the path from the arguments. This will split at the first
35047    # space.
35048    complete="$DUMPBIN"
35049    path="${complete%% *}"
35050    tmp="$complete EOL"
35051    arguments="${tmp#* }"
35052
35053    # Cannot rely on the command "which" here since it doesn't always work.
35054    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35055    if test -z "$is_absolute_path"; then
35056      # Path to executable is not absolute. Find it.
35057      IFS_save="$IFS"
35058      IFS=:
35059      for p in $PATH; do
35060        if test -f "$p/$path" && test -x "$p/$path"; then
35061          new_path="$p/$path"
35062          break
35063        fi
35064      done
35065      IFS="$IFS_save"
35066    else
35067      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
35068$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
35069      new_path="$path"
35070    fi
35071
35072    if test "x$new_path" = x; then
35073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35074$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35075      has_space=`$ECHO "$complete" | $GREP " "`
35076      if test "x$has_space" != x; then
35077        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35079      fi
35080      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35081    fi
35082  fi
35083
35084  # Now join together the path and the arguments once again
35085  if test "x$arguments" != xEOL; then
35086    new_complete="$new_path ${arguments% *}"
35087  else
35088    new_complete="$new_path"
35089  fi
35090
35091  if test "x$complete" != "x$new_complete"; then
35092    DUMPBIN="$new_complete"
35093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35094$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35095  fi
35096
35097
35098      COMPILER_TYPE=CL
35099      CCXXFLAGS="$CCXXFLAGS -nologo"
35100
35101fi
35102
35103
35104
35105  ac_ext=c
35106ac_cpp='$CPP $CPPFLAGS'
35107ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35108ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35109ac_compiler_gnu=$ac_cv_c_compiler_gnu
35110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35111$as_echo_n "checking how to run the C preprocessor... " >&6; }
35112# On Suns, sometimes $CPP names a directory.
35113if test -n "$CPP" && test -d "$CPP"; then
35114  CPP=
35115fi
35116if test -z "$CPP"; then
35117  if ${ac_cv_prog_CPP+:} false; then :
35118  $as_echo_n "(cached) " >&6
35119else
35120      # Double quotes because CPP needs to be expanded
35121    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35122    do
35123      ac_preproc_ok=false
35124for ac_c_preproc_warn_flag in '' yes
35125do
35126  # Use a header file that comes with gcc, so configuring glibc
35127  # with a fresh cross-compiler works.
35128  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35129  # <limits.h> exists even on freestanding compilers.
35130  # On the NeXT, cc -E runs the code through the compiler's parser,
35131  # not just through cpp. "Syntax error" is here to catch this case.
35132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35133/* end confdefs.h.  */
35134#ifdef __STDC__
35135# include <limits.h>
35136#else
35137# include <assert.h>
35138#endif
35139		     Syntax error
35140_ACEOF
35141if ac_fn_c_try_cpp "$LINENO"; then :
35142
35143else
35144  # Broken: fails on valid input.
35145continue
35146fi
35147rm -f conftest.err conftest.i conftest.$ac_ext
35148
35149  # OK, works on sane cases.  Now check whether nonexistent headers
35150  # can be detected and how.
35151  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35152/* end confdefs.h.  */
35153#include <ac_nonexistent.h>
35154_ACEOF
35155if ac_fn_c_try_cpp "$LINENO"; then :
35156  # Broken: success on invalid input.
35157continue
35158else
35159  # Passes both tests.
35160ac_preproc_ok=:
35161break
35162fi
35163rm -f conftest.err conftest.i conftest.$ac_ext
35164
35165done
35166# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35167rm -f conftest.i conftest.err conftest.$ac_ext
35168if $ac_preproc_ok; then :
35169  break
35170fi
35171
35172    done
35173    ac_cv_prog_CPP=$CPP
35174
35175fi
35176  CPP=$ac_cv_prog_CPP
35177else
35178  ac_cv_prog_CPP=$CPP
35179fi
35180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35181$as_echo "$CPP" >&6; }
35182ac_preproc_ok=false
35183for ac_c_preproc_warn_flag in '' yes
35184do
35185  # Use a header file that comes with gcc, so configuring glibc
35186  # with a fresh cross-compiler works.
35187  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35188  # <limits.h> exists even on freestanding compilers.
35189  # On the NeXT, cc -E runs the code through the compiler's parser,
35190  # not just through cpp. "Syntax error" is here to catch this case.
35191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35192/* end confdefs.h.  */
35193#ifdef __STDC__
35194# include <limits.h>
35195#else
35196# include <assert.h>
35197#endif
35198		     Syntax error
35199_ACEOF
35200if ac_fn_c_try_cpp "$LINENO"; then :
35201
35202else
35203  # Broken: fails on valid input.
35204continue
35205fi
35206rm -f conftest.err conftest.i conftest.$ac_ext
35207
35208  # OK, works on sane cases.  Now check whether nonexistent headers
35209  # can be detected and how.
35210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35211/* end confdefs.h.  */
35212#include <ac_nonexistent.h>
35213_ACEOF
35214if ac_fn_c_try_cpp "$LINENO"; then :
35215  # Broken: success on invalid input.
35216continue
35217else
35218  # Passes both tests.
35219ac_preproc_ok=:
35220break
35221fi
35222rm -f conftest.err conftest.i conftest.$ac_ext
35223
35224done
35225# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35226rm -f conftest.i conftest.err conftest.$ac_ext
35227if $ac_preproc_ok; then :
35228
35229else
35230  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35231$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35232as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35233See \`config.log' for more details" "$LINENO" 5; }
35234fi
35235
35236ac_ext=cpp
35237ac_cpp='$CXXCPP $CPPFLAGS'
35238ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35239ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35240ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35241
35242
35243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35244
35245  # First separate the path from the arguments. This will split at the first
35246  # space.
35247  complete="$CPP"
35248  path="${complete%% *}"
35249  tmp="$complete EOL"
35250  arguments="${tmp#* }"
35251
35252  # Input might be given as Windows format, start by converting to
35253  # unix format.
35254  new_path=`$CYGPATH -u "$path"`
35255
35256  # Now try to locate executable using which
35257  new_path=`$WHICH "$new_path" 2> /dev/null`
35258  # bat and cmd files are not always considered executable in cygwin causing which
35259  # to not find them
35260  if test "x$new_path" = x \
35261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35263    new_path=`$CYGPATH -u "$path"`
35264  fi
35265  if test "x$new_path" = x; then
35266    # Oops. Which didn't find the executable.
35267    # The splitting of arguments from the executable at a space might have been incorrect,
35268    # since paths with space are more likely in Windows. Give it another try with the whole
35269    # argument.
35270    path="$complete"
35271    arguments="EOL"
35272    new_path=`$CYGPATH -u "$path"`
35273    new_path=`$WHICH "$new_path" 2> /dev/null`
35274    # bat and cmd files are not always considered executable in cygwin causing which
35275    # to not find them
35276    if test "x$new_path" = x \
35277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35279      new_path=`$CYGPATH -u "$path"`
35280    fi
35281    if test "x$new_path" = x; then
35282      # It's still not found. Now this is an unrecoverable error.
35283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35284$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35285      has_space=`$ECHO "$complete" | $GREP " "`
35286      if test "x$has_space" != x; then
35287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35289      fi
35290      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35291    fi
35292  fi
35293
35294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35297  # "foo.exe" is OK but "foo" is an error.
35298  #
35299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35300  # It is also a way to make sure we got the proper file name for the real test later on.
35301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35302  if test "x$test_shortpath" = x; then
35303    # Short path failed, file does not exist as specified.
35304    # Try adding .exe or .cmd
35305    if test -f "${new_path}.exe"; then
35306      input_to_shortpath="${new_path}.exe"
35307    elif test -f "${new_path}.cmd"; then
35308      input_to_shortpath="${new_path}.cmd"
35309    else
35310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35311$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35314      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35315    fi
35316  else
35317    input_to_shortpath="$new_path"
35318  fi
35319
35320  # Call helper function which possibly converts this using DOS-style short mode.
35321  # If so, the updated path is stored in $new_path.
35322  new_path="$input_to_shortpath"
35323
35324  input_path="$input_to_shortpath"
35325  # Check if we need to convert this using DOS-style short mode. If the path
35326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35327  # take no chances and rewrite it.
35328  # Note: m4 eats our [], so we need to use [ and ] instead.
35329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35330  if test "x$has_forbidden_chars" != x; then
35331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35335      # Going to short mode and back again did indeed matter. Since short mode is
35336      # case insensitive, let's make it lowercase to improve readability.
35337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35338      # Now convert it back to Unix-stile (cygpath)
35339      input_path=`$CYGPATH -u "$shortmode_path"`
35340      new_path="$input_path"
35341    fi
35342  fi
35343
35344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35345  if test "x$test_cygdrive_prefix" = x; then
35346    # As a simple fix, exclude /usr/bin since it's not a real path.
35347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35349      # a path prefixed by /cygdrive for fixpath to work.
35350      new_path="$CYGWIN_ROOT_PATH$input_path"
35351    fi
35352  fi
35353
35354  # remove trailing .exe if any
35355  new_path="${new_path/%.exe/}"
35356
35357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35358
35359  # First separate the path from the arguments. This will split at the first
35360  # space.
35361  complete="$CPP"
35362  path="${complete%% *}"
35363  tmp="$complete EOL"
35364  arguments="${tmp#* }"
35365
35366  # Input might be given as Windows format, start by converting to
35367  # unix format.
35368  new_path="$path"
35369
35370  windows_path="$new_path"
35371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35372    unix_path=`$CYGPATH -u "$windows_path"`
35373    new_path="$unix_path"
35374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35376    new_path="$unix_path"
35377  fi
35378
35379
35380  # Now try to locate executable using which
35381  new_path=`$WHICH "$new_path" 2> /dev/null`
35382
35383  if test "x$new_path" = x; then
35384    # Oops. Which didn't find the executable.
35385    # The splitting of arguments from the executable at a space might have been incorrect,
35386    # since paths with space are more likely in Windows. Give it another try with the whole
35387    # argument.
35388    path="$complete"
35389    arguments="EOL"
35390    new_path="$path"
35391
35392  windows_path="$new_path"
35393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35394    unix_path=`$CYGPATH -u "$windows_path"`
35395    new_path="$unix_path"
35396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35398    new_path="$unix_path"
35399  fi
35400
35401
35402    new_path=`$WHICH "$new_path" 2> /dev/null`
35403
35404    if test "x$new_path" = x; then
35405      # It's still not found. Now this is an unrecoverable error.
35406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35407$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35408      has_space=`$ECHO "$complete" | $GREP " "`
35409      if test "x$has_space" != x; then
35410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35412      fi
35413      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35414    fi
35415  fi
35416
35417  # Now new_path has a complete unix path to the binary
35418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35419    # Keep paths in /bin as-is, but remove trailing .exe if any
35420    new_path="${new_path/%.exe/}"
35421    # Do not save /bin paths to all_fixpath_prefixes!
35422  else
35423    # Not in mixed or Windows style, start by that.
35424    new_path=`cmd //c echo $new_path`
35425
35426  input_path="$new_path"
35427  # Check if we need to convert this using DOS-style short mode. If the path
35428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35429  # take no chances and rewrite it.
35430  # Note: m4 eats our [], so we need to use [ and ] instead.
35431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35432  if test "x$has_forbidden_chars" != x; then
35433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35435  fi
35436
35437    # Output is in $new_path
35438
35439  windows_path="$new_path"
35440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35441    unix_path=`$CYGPATH -u "$windows_path"`
35442    new_path="$unix_path"
35443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35445    new_path="$unix_path"
35446  fi
35447
35448    # remove trailing .exe if any
35449    new_path="${new_path/%.exe/}"
35450
35451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35453  fi
35454
35455  else
35456    # We're on a posix platform. Hooray! :)
35457    # First separate the path from the arguments. This will split at the first
35458    # space.
35459    complete="$CPP"
35460    path="${complete%% *}"
35461    tmp="$complete EOL"
35462    arguments="${tmp#* }"
35463
35464    # Cannot rely on the command "which" here since it doesn't always work.
35465    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35466    if test -z "$is_absolute_path"; then
35467      # Path to executable is not absolute. Find it.
35468      IFS_save="$IFS"
35469      IFS=:
35470      for p in $PATH; do
35471        if test -f "$p/$path" && test -x "$p/$path"; then
35472          new_path="$p/$path"
35473          break
35474        fi
35475      done
35476      IFS="$IFS_save"
35477    else
35478      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
35479$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
35480      new_path="$path"
35481    fi
35482
35483    if test "x$new_path" = x; then
35484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35485$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35486      has_space=`$ECHO "$complete" | $GREP " "`
35487      if test "x$has_space" != x; then
35488        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35490      fi
35491      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35492    fi
35493  fi
35494
35495  # Now join together the path and the arguments once again
35496  if test "x$arguments" != xEOL; then
35497    new_complete="$new_path ${arguments% *}"
35498  else
35499    new_complete="$new_path"
35500  fi
35501
35502  if test "x$complete" != "x$new_complete"; then
35503    CPP="$new_complete"
35504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35505$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35506  fi
35507
35508
35509  ac_ext=cpp
35510ac_cpp='$CXXCPP $CPPFLAGS'
35511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35515$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35516if test -z "$CXXCPP"; then
35517  if ${ac_cv_prog_CXXCPP+:} false; then :
35518  $as_echo_n "(cached) " >&6
35519else
35520      # Double quotes because CXXCPP needs to be expanded
35521    for CXXCPP in "$CXX -E" "/lib/cpp"
35522    do
35523      ac_preproc_ok=false
35524for ac_cxx_preproc_warn_flag in '' yes
35525do
35526  # Use a header file that comes with gcc, so configuring glibc
35527  # with a fresh cross-compiler works.
35528  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35529  # <limits.h> exists even on freestanding compilers.
35530  # On the NeXT, cc -E runs the code through the compiler's parser,
35531  # not just through cpp. "Syntax error" is here to catch this case.
35532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35533/* end confdefs.h.  */
35534#ifdef __STDC__
35535# include <limits.h>
35536#else
35537# include <assert.h>
35538#endif
35539		     Syntax error
35540_ACEOF
35541if ac_fn_cxx_try_cpp "$LINENO"; then :
35542
35543else
35544  # Broken: fails on valid input.
35545continue
35546fi
35547rm -f conftest.err conftest.i conftest.$ac_ext
35548
35549  # OK, works on sane cases.  Now check whether nonexistent headers
35550  # can be detected and how.
35551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35552/* end confdefs.h.  */
35553#include <ac_nonexistent.h>
35554_ACEOF
35555if ac_fn_cxx_try_cpp "$LINENO"; then :
35556  # Broken: success on invalid input.
35557continue
35558else
35559  # Passes both tests.
35560ac_preproc_ok=:
35561break
35562fi
35563rm -f conftest.err conftest.i conftest.$ac_ext
35564
35565done
35566# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35567rm -f conftest.i conftest.err conftest.$ac_ext
35568if $ac_preproc_ok; then :
35569  break
35570fi
35571
35572    done
35573    ac_cv_prog_CXXCPP=$CXXCPP
35574
35575fi
35576  CXXCPP=$ac_cv_prog_CXXCPP
35577else
35578  ac_cv_prog_CXXCPP=$CXXCPP
35579fi
35580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35581$as_echo "$CXXCPP" >&6; }
35582ac_preproc_ok=false
35583for ac_cxx_preproc_warn_flag in '' yes
35584do
35585  # Use a header file that comes with gcc, so configuring glibc
35586  # with a fresh cross-compiler works.
35587  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35588  # <limits.h> exists even on freestanding compilers.
35589  # On the NeXT, cc -E runs the code through the compiler's parser,
35590  # not just through cpp. "Syntax error" is here to catch this case.
35591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35592/* end confdefs.h.  */
35593#ifdef __STDC__
35594# include <limits.h>
35595#else
35596# include <assert.h>
35597#endif
35598		     Syntax error
35599_ACEOF
35600if ac_fn_cxx_try_cpp "$LINENO"; then :
35601
35602else
35603  # Broken: fails on valid input.
35604continue
35605fi
35606rm -f conftest.err conftest.i conftest.$ac_ext
35607
35608  # OK, works on sane cases.  Now check whether nonexistent headers
35609  # can be detected and how.
35610  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35611/* end confdefs.h.  */
35612#include <ac_nonexistent.h>
35613_ACEOF
35614if ac_fn_cxx_try_cpp "$LINENO"; then :
35615  # Broken: success on invalid input.
35616continue
35617else
35618  # Passes both tests.
35619ac_preproc_ok=:
35620break
35621fi
35622rm -f conftest.err conftest.i conftest.$ac_ext
35623
35624done
35625# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35626rm -f conftest.i conftest.err conftest.$ac_ext
35627if $ac_preproc_ok; then :
35628
35629else
35630  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35632as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35633See \`config.log' for more details" "$LINENO" 5; }
35634fi
35635
35636ac_ext=cpp
35637ac_cpp='$CXXCPP $CPPFLAGS'
35638ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35639ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35640ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35641
35642
35643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35644
35645  # First separate the path from the arguments. This will split at the first
35646  # space.
35647  complete="$CXXCPP"
35648  path="${complete%% *}"
35649  tmp="$complete EOL"
35650  arguments="${tmp#* }"
35651
35652  # Input might be given as Windows format, start by converting to
35653  # unix format.
35654  new_path=`$CYGPATH -u "$path"`
35655
35656  # Now try to locate executable using which
35657  new_path=`$WHICH "$new_path" 2> /dev/null`
35658  # bat and cmd files are not always considered executable in cygwin causing which
35659  # to not find them
35660  if test "x$new_path" = x \
35661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35663    new_path=`$CYGPATH -u "$path"`
35664  fi
35665  if test "x$new_path" = x; then
35666    # Oops. Which didn't find the executable.
35667    # The splitting of arguments from the executable at a space might have been incorrect,
35668    # since paths with space are more likely in Windows. Give it another try with the whole
35669    # argument.
35670    path="$complete"
35671    arguments="EOL"
35672    new_path=`$CYGPATH -u "$path"`
35673    new_path=`$WHICH "$new_path" 2> /dev/null`
35674    # bat and cmd files are not always considered executable in cygwin causing which
35675    # to not find them
35676    if test "x$new_path" = x \
35677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35679      new_path=`$CYGPATH -u "$path"`
35680    fi
35681    if test "x$new_path" = x; then
35682      # It's still not found. Now this is an unrecoverable error.
35683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35684$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35685      has_space=`$ECHO "$complete" | $GREP " "`
35686      if test "x$has_space" != x; then
35687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35689      fi
35690      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35691    fi
35692  fi
35693
35694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35697  # "foo.exe" is OK but "foo" is an error.
35698  #
35699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35700  # It is also a way to make sure we got the proper file name for the real test later on.
35701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35702  if test "x$test_shortpath" = x; then
35703    # Short path failed, file does not exist as specified.
35704    # Try adding .exe or .cmd
35705    if test -f "${new_path}.exe"; then
35706      input_to_shortpath="${new_path}.exe"
35707    elif test -f "${new_path}.cmd"; then
35708      input_to_shortpath="${new_path}.cmd"
35709    else
35710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35711$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35714      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35715    fi
35716  else
35717    input_to_shortpath="$new_path"
35718  fi
35719
35720  # Call helper function which possibly converts this using DOS-style short mode.
35721  # If so, the updated path is stored in $new_path.
35722  new_path="$input_to_shortpath"
35723
35724  input_path="$input_to_shortpath"
35725  # Check if we need to convert this using DOS-style short mode. If the path
35726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35727  # take no chances and rewrite it.
35728  # Note: m4 eats our [], so we need to use [ and ] instead.
35729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35730  if test "x$has_forbidden_chars" != x; then
35731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35735      # Going to short mode and back again did indeed matter. Since short mode is
35736      # case insensitive, let's make it lowercase to improve readability.
35737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35738      # Now convert it back to Unix-stile (cygpath)
35739      input_path=`$CYGPATH -u "$shortmode_path"`
35740      new_path="$input_path"
35741    fi
35742  fi
35743
35744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35745  if test "x$test_cygdrive_prefix" = x; then
35746    # As a simple fix, exclude /usr/bin since it's not a real path.
35747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35749      # a path prefixed by /cygdrive for fixpath to work.
35750      new_path="$CYGWIN_ROOT_PATH$input_path"
35751    fi
35752  fi
35753
35754  # remove trailing .exe if any
35755  new_path="${new_path/%.exe/}"
35756
35757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35758
35759  # First separate the path from the arguments. This will split at the first
35760  # space.
35761  complete="$CXXCPP"
35762  path="${complete%% *}"
35763  tmp="$complete EOL"
35764  arguments="${tmp#* }"
35765
35766  # Input might be given as Windows format, start by converting to
35767  # unix format.
35768  new_path="$path"
35769
35770  windows_path="$new_path"
35771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35772    unix_path=`$CYGPATH -u "$windows_path"`
35773    new_path="$unix_path"
35774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35776    new_path="$unix_path"
35777  fi
35778
35779
35780  # Now try to locate executable using which
35781  new_path=`$WHICH "$new_path" 2> /dev/null`
35782
35783  if test "x$new_path" = x; then
35784    # Oops. Which didn't find the executable.
35785    # The splitting of arguments from the executable at a space might have been incorrect,
35786    # since paths with space are more likely in Windows. Give it another try with the whole
35787    # argument.
35788    path="$complete"
35789    arguments="EOL"
35790    new_path="$path"
35791
35792  windows_path="$new_path"
35793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35794    unix_path=`$CYGPATH -u "$windows_path"`
35795    new_path="$unix_path"
35796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35798    new_path="$unix_path"
35799  fi
35800
35801
35802    new_path=`$WHICH "$new_path" 2> /dev/null`
35803
35804    if test "x$new_path" = x; then
35805      # It's still not found. Now this is an unrecoverable error.
35806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35807$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35808      has_space=`$ECHO "$complete" | $GREP " "`
35809      if test "x$has_space" != x; then
35810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35812      fi
35813      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35814    fi
35815  fi
35816
35817  # Now new_path has a complete unix path to the binary
35818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35819    # Keep paths in /bin as-is, but remove trailing .exe if any
35820    new_path="${new_path/%.exe/}"
35821    # Do not save /bin paths to all_fixpath_prefixes!
35822  else
35823    # Not in mixed or Windows style, start by that.
35824    new_path=`cmd //c echo $new_path`
35825
35826  input_path="$new_path"
35827  # Check if we need to convert this using DOS-style short mode. If the path
35828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35829  # take no chances and rewrite it.
35830  # Note: m4 eats our [], so we need to use [ and ] instead.
35831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35832  if test "x$has_forbidden_chars" != x; then
35833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35835  fi
35836
35837    # Output is in $new_path
35838
35839  windows_path="$new_path"
35840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35841    unix_path=`$CYGPATH -u "$windows_path"`
35842    new_path="$unix_path"
35843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35845    new_path="$unix_path"
35846  fi
35847
35848    # remove trailing .exe if any
35849    new_path="${new_path/%.exe/}"
35850
35851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35853  fi
35854
35855  else
35856    # We're on a posix platform. Hooray! :)
35857    # First separate the path from the arguments. This will split at the first
35858    # space.
35859    complete="$CXXCPP"
35860    path="${complete%% *}"
35861    tmp="$complete EOL"
35862    arguments="${tmp#* }"
35863
35864    # Cannot rely on the command "which" here since it doesn't always work.
35865    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35866    if test -z "$is_absolute_path"; then
35867      # Path to executable is not absolute. Find it.
35868      IFS_save="$IFS"
35869      IFS=:
35870      for p in $PATH; do
35871        if test -f "$p/$path" && test -x "$p/$path"; then
35872          new_path="$p/$path"
35873          break
35874        fi
35875      done
35876      IFS="$IFS_save"
35877    else
35878      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
35879$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
35880      new_path="$path"
35881    fi
35882
35883    if test "x$new_path" = x; then
35884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35885$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35886      has_space=`$ECHO "$complete" | $GREP " "`
35887      if test "x$has_space" != x; then
35888        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35889$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35890      fi
35891      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35892    fi
35893  fi
35894
35895  # Now join together the path and the arguments once again
35896  if test "x$arguments" != xEOL; then
35897    new_complete="$new_path ${arguments% *}"
35898  else
35899    new_complete="$new_path"
35900  fi
35901
35902  if test "x$complete" != "x$new_complete"; then
35903    CXXCPP="$new_complete"
35904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35905$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35906  fi
35907
35908
35909  if test "x$COMPILE_TYPE" != "xcross"; then
35910    # If we are not cross compiling, use the same compilers for
35911    # building the build platform executables. The cross-compilation
35912    # case needed to be done earlier, but this can only be done after
35913    # the native tools have been localized.
35914    BUILD_CC="$CC"
35915    BUILD_CXX="$CXX"
35916    BUILD_LD="$LD"
35917  fi
35918
35919  # for solaris we really need solaris tools, and not gnu equivalent
35920  #   these seems to normally reside in /usr/ccs/bin so add that to path before
35921  #   starting to probe
35922  #
35923  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
35924  #         so that it can be overriden --with-tools-dir
35925  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
35926    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
35927  fi
35928
35929  # Find the right assembler.
35930  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35931
35932
35933  # Publish this variable in the help.
35934
35935
35936  if test "x$AS" = x; then
35937    # The variable is not set by user, try to locate tool using the code snippet
35938    for ac_prog in as
35939do
35940  # Extract the first word of "$ac_prog", so it can be a program name with args.
35941set dummy $ac_prog; ac_word=$2
35942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35943$as_echo_n "checking for $ac_word... " >&6; }
35944if ${ac_cv_path_AS+:} false; then :
35945  $as_echo_n "(cached) " >&6
35946else
35947  case $AS in
35948  [\\/]* | ?:[\\/]*)
35949  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35950  ;;
35951  *)
35952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35953for as_dir in $PATH
35954do
35955  IFS=$as_save_IFS
35956  test -z "$as_dir" && as_dir=.
35957    for ac_exec_ext in '' $ac_executable_extensions; do
35958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35959    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35961    break 2
35962  fi
35963done
35964  done
35965IFS=$as_save_IFS
35966
35967  ;;
35968esac
35969fi
35970AS=$ac_cv_path_AS
35971if test -n "$AS"; then
35972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35973$as_echo "$AS" >&6; }
35974else
35975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35976$as_echo "no" >&6; }
35977fi
35978
35979
35980  test -n "$AS" && break
35981done
35982
35983  else
35984    # The variable is set, but is it from the command line or the environment?
35985
35986    # Try to remove the string !AS! from our list.
35987    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35988    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35989      # If it failed, the variable was not from the command line. Ignore it,
35990      # but warn the user (except for BASH, which is always set by the calling BASH).
35991      if test "xAS" != xBASH; then
35992        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35993$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35994      fi
35995      # Try to locate tool using the code snippet
35996      for ac_prog in as
35997do
35998  # Extract the first word of "$ac_prog", so it can be a program name with args.
35999set dummy $ac_prog; ac_word=$2
36000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36001$as_echo_n "checking for $ac_word... " >&6; }
36002if ${ac_cv_path_AS+:} false; then :
36003  $as_echo_n "(cached) " >&6
36004else
36005  case $AS in
36006  [\\/]* | ?:[\\/]*)
36007  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36008  ;;
36009  *)
36010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36011for as_dir in $PATH
36012do
36013  IFS=$as_save_IFS
36014  test -z "$as_dir" && as_dir=.
36015    for ac_exec_ext in '' $ac_executable_extensions; do
36016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36017    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36019    break 2
36020  fi
36021done
36022  done
36023IFS=$as_save_IFS
36024
36025  ;;
36026esac
36027fi
36028AS=$ac_cv_path_AS
36029if test -n "$AS"; then
36030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36031$as_echo "$AS" >&6; }
36032else
36033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36034$as_echo "no" >&6; }
36035fi
36036
36037
36038  test -n "$AS" && break
36039done
36040
36041    else
36042      # If it succeeded, then it was overridden by the user. We will use it
36043      # for the tool.
36044
36045      # First remove it from the list of overridden variables, so we can test
36046      # for unknown variables in the end.
36047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36048
36049      # Check if the provided tool contains a complete path.
36050      tool_specified="$AS"
36051      tool_basename="${tool_specified##*/}"
36052      if test "x$tool_basename" = "x$tool_specified"; then
36053        # A command without a complete path is provided, search $PATH.
36054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36055$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36056        # Extract the first word of "$tool_basename", so it can be a program name with args.
36057set dummy $tool_basename; ac_word=$2
36058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36059$as_echo_n "checking for $ac_word... " >&6; }
36060if ${ac_cv_path_AS+:} false; then :
36061  $as_echo_n "(cached) " >&6
36062else
36063  case $AS in
36064  [\\/]* | ?:[\\/]*)
36065  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36066  ;;
36067  *)
36068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36069for as_dir in $PATH
36070do
36071  IFS=$as_save_IFS
36072  test -z "$as_dir" && as_dir=.
36073    for ac_exec_ext in '' $ac_executable_extensions; do
36074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36075    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36077    break 2
36078  fi
36079done
36080  done
36081IFS=$as_save_IFS
36082
36083  ;;
36084esac
36085fi
36086AS=$ac_cv_path_AS
36087if test -n "$AS"; then
36088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36089$as_echo "$AS" >&6; }
36090else
36091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36092$as_echo "no" >&6; }
36093fi
36094
36095
36096        if test "x$AS" = x; then
36097          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36098        fi
36099      else
36100        # Otherwise we believe it is a complete path. Use it as it is.
36101        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36102$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36104$as_echo_n "checking for AS... " >&6; }
36105        if test ! -x "$tool_specified"; then
36106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36107$as_echo "not found" >&6; }
36108          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36109        fi
36110        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36111$as_echo "$tool_specified" >&6; }
36112      fi
36113    fi
36114  fi
36115
36116
36117
36118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36119
36120  # First separate the path from the arguments. This will split at the first
36121  # space.
36122  complete="$AS"
36123  path="${complete%% *}"
36124  tmp="$complete EOL"
36125  arguments="${tmp#* }"
36126
36127  # Input might be given as Windows format, start by converting to
36128  # unix format.
36129  new_path=`$CYGPATH -u "$path"`
36130
36131  # Now try to locate executable using which
36132  new_path=`$WHICH "$new_path" 2> /dev/null`
36133  # bat and cmd files are not always considered executable in cygwin causing which
36134  # to not find them
36135  if test "x$new_path" = x \
36136      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36137      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36138    new_path=`$CYGPATH -u "$path"`
36139  fi
36140  if test "x$new_path" = x; then
36141    # Oops. Which didn't find the executable.
36142    # The splitting of arguments from the executable at a space might have been incorrect,
36143    # since paths with space are more likely in Windows. Give it another try with the whole
36144    # argument.
36145    path="$complete"
36146    arguments="EOL"
36147    new_path=`$CYGPATH -u "$path"`
36148    new_path=`$WHICH "$new_path" 2> /dev/null`
36149    # bat and cmd files are not always considered executable in cygwin causing which
36150    # to not find them
36151    if test "x$new_path" = x \
36152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36154      new_path=`$CYGPATH -u "$path"`
36155    fi
36156    if test "x$new_path" = x; then
36157      # It's still not found. Now this is an unrecoverable error.
36158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36159$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36160      has_space=`$ECHO "$complete" | $GREP " "`
36161      if test "x$has_space" != x; then
36162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36164      fi
36165      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36166    fi
36167  fi
36168
36169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36172  # "foo.exe" is OK but "foo" is an error.
36173  #
36174  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36175  # It is also a way to make sure we got the proper file name for the real test later on.
36176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36177  if test "x$test_shortpath" = x; then
36178    # Short path failed, file does not exist as specified.
36179    # Try adding .exe or .cmd
36180    if test -f "${new_path}.exe"; then
36181      input_to_shortpath="${new_path}.exe"
36182    elif test -f "${new_path}.cmd"; then
36183      input_to_shortpath="${new_path}.cmd"
36184    else
36185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36186$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36189      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36190    fi
36191  else
36192    input_to_shortpath="$new_path"
36193  fi
36194
36195  # Call helper function which possibly converts this using DOS-style short mode.
36196  # If so, the updated path is stored in $new_path.
36197  new_path="$input_to_shortpath"
36198
36199  input_path="$input_to_shortpath"
36200  # Check if we need to convert this using DOS-style short mode. If the path
36201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36202  # take no chances and rewrite it.
36203  # Note: m4 eats our [], so we need to use [ and ] instead.
36204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36205  if test "x$has_forbidden_chars" != x; then
36206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36210      # Going to short mode and back again did indeed matter. Since short mode is
36211      # case insensitive, let's make it lowercase to improve readability.
36212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36213      # Now convert it back to Unix-stile (cygpath)
36214      input_path=`$CYGPATH -u "$shortmode_path"`
36215      new_path="$input_path"
36216    fi
36217  fi
36218
36219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36220  if test "x$test_cygdrive_prefix" = x; then
36221    # As a simple fix, exclude /usr/bin since it's not a real path.
36222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36224      # a path prefixed by /cygdrive for fixpath to work.
36225      new_path="$CYGWIN_ROOT_PATH$input_path"
36226    fi
36227  fi
36228
36229  # remove trailing .exe if any
36230  new_path="${new_path/%.exe/}"
36231
36232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36233
36234  # First separate the path from the arguments. This will split at the first
36235  # space.
36236  complete="$AS"
36237  path="${complete%% *}"
36238  tmp="$complete EOL"
36239  arguments="${tmp#* }"
36240
36241  # Input might be given as Windows format, start by converting to
36242  # unix format.
36243  new_path="$path"
36244
36245  windows_path="$new_path"
36246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36247    unix_path=`$CYGPATH -u "$windows_path"`
36248    new_path="$unix_path"
36249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36251    new_path="$unix_path"
36252  fi
36253
36254
36255  # Now try to locate executable using which
36256  new_path=`$WHICH "$new_path" 2> /dev/null`
36257
36258  if test "x$new_path" = x; then
36259    # Oops. Which didn't find the executable.
36260    # The splitting of arguments from the executable at a space might have been incorrect,
36261    # since paths with space are more likely in Windows. Give it another try with the whole
36262    # argument.
36263    path="$complete"
36264    arguments="EOL"
36265    new_path="$path"
36266
36267  windows_path="$new_path"
36268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36269    unix_path=`$CYGPATH -u "$windows_path"`
36270    new_path="$unix_path"
36271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36273    new_path="$unix_path"
36274  fi
36275
36276
36277    new_path=`$WHICH "$new_path" 2> /dev/null`
36278
36279    if test "x$new_path" = x; then
36280      # It's still not found. Now this is an unrecoverable error.
36281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36282$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36283      has_space=`$ECHO "$complete" | $GREP " "`
36284      if test "x$has_space" != x; then
36285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36287      fi
36288      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36289    fi
36290  fi
36291
36292  # Now new_path has a complete unix path to the binary
36293  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36294    # Keep paths in /bin as-is, but remove trailing .exe if any
36295    new_path="${new_path/%.exe/}"
36296    # Do not save /bin paths to all_fixpath_prefixes!
36297  else
36298    # Not in mixed or Windows style, start by that.
36299    new_path=`cmd //c echo $new_path`
36300
36301  input_path="$new_path"
36302  # Check if we need to convert this using DOS-style short mode. If the path
36303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36304  # take no chances and rewrite it.
36305  # Note: m4 eats our [], so we need to use [ and ] instead.
36306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36307  if test "x$has_forbidden_chars" != x; then
36308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36310  fi
36311
36312    # Output is in $new_path
36313
36314  windows_path="$new_path"
36315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36316    unix_path=`$CYGPATH -u "$windows_path"`
36317    new_path="$unix_path"
36318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36320    new_path="$unix_path"
36321  fi
36322
36323    # remove trailing .exe if any
36324    new_path="${new_path/%.exe/}"
36325
36326    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36327    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36328  fi
36329
36330  else
36331    # We're on a posix platform. Hooray! :)
36332    # First separate the path from the arguments. This will split at the first
36333    # space.
36334    complete="$AS"
36335    path="${complete%% *}"
36336    tmp="$complete EOL"
36337    arguments="${tmp#* }"
36338
36339    # Cannot rely on the command "which" here since it doesn't always work.
36340    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36341    if test -z "$is_absolute_path"; then
36342      # Path to executable is not absolute. Find it.
36343      IFS_save="$IFS"
36344      IFS=:
36345      for p in $PATH; do
36346        if test -f "$p/$path" && test -x "$p/$path"; then
36347          new_path="$p/$path"
36348          break
36349        fi
36350      done
36351      IFS="$IFS_save"
36352    else
36353      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
36354$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
36355      new_path="$path"
36356    fi
36357
36358    if test "x$new_path" = x; then
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36360$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36361      has_space=`$ECHO "$complete" | $GREP " "`
36362      if test "x$has_space" != x; then
36363        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36364$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36365      fi
36366      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36367    fi
36368  fi
36369
36370  # Now join together the path and the arguments once again
36371  if test "x$arguments" != xEOL; then
36372    new_complete="$new_path ${arguments% *}"
36373  else
36374    new_complete="$new_path"
36375  fi
36376
36377  if test "x$complete" != "x$new_complete"; then
36378    AS="$new_complete"
36379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36380$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36381  fi
36382
36383  else
36384    AS="$CC -c"
36385  fi
36386
36387
36388  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36389
36390
36391  # Publish this variable in the help.
36392
36393
36394  if test "x$NM" = x; then
36395    # The variable is not set by user, try to locate tool using the code snippet
36396    for ac_prog in nm
36397do
36398  # Extract the first word of "$ac_prog", so it can be a program name with args.
36399set dummy $ac_prog; ac_word=$2
36400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36401$as_echo_n "checking for $ac_word... " >&6; }
36402if ${ac_cv_path_NM+:} false; then :
36403  $as_echo_n "(cached) " >&6
36404else
36405  case $NM in
36406  [\\/]* | ?:[\\/]*)
36407  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36408  ;;
36409  *)
36410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36411for as_dir in $PATH
36412do
36413  IFS=$as_save_IFS
36414  test -z "$as_dir" && as_dir=.
36415    for ac_exec_ext in '' $ac_executable_extensions; do
36416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36417    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36419    break 2
36420  fi
36421done
36422  done
36423IFS=$as_save_IFS
36424
36425  ;;
36426esac
36427fi
36428NM=$ac_cv_path_NM
36429if test -n "$NM"; then
36430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36431$as_echo "$NM" >&6; }
36432else
36433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36434$as_echo "no" >&6; }
36435fi
36436
36437
36438  test -n "$NM" && break
36439done
36440
36441  else
36442    # The variable is set, but is it from the command line or the environment?
36443
36444    # Try to remove the string !NM! from our list.
36445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36447      # If it failed, the variable was not from the command line. Ignore it,
36448      # but warn the user (except for BASH, which is always set by the calling BASH).
36449      if test "xNM" != xBASH; then
36450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36451$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36452      fi
36453      # Try to locate tool using the code snippet
36454      for ac_prog in nm
36455do
36456  # Extract the first word of "$ac_prog", so it can be a program name with args.
36457set dummy $ac_prog; ac_word=$2
36458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36459$as_echo_n "checking for $ac_word... " >&6; }
36460if ${ac_cv_path_NM+:} false; then :
36461  $as_echo_n "(cached) " >&6
36462else
36463  case $NM in
36464  [\\/]* | ?:[\\/]*)
36465  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36466  ;;
36467  *)
36468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36469for as_dir in $PATH
36470do
36471  IFS=$as_save_IFS
36472  test -z "$as_dir" && as_dir=.
36473    for ac_exec_ext in '' $ac_executable_extensions; do
36474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36475    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36477    break 2
36478  fi
36479done
36480  done
36481IFS=$as_save_IFS
36482
36483  ;;
36484esac
36485fi
36486NM=$ac_cv_path_NM
36487if test -n "$NM"; then
36488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36489$as_echo "$NM" >&6; }
36490else
36491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36492$as_echo "no" >&6; }
36493fi
36494
36495
36496  test -n "$NM" && break
36497done
36498
36499    else
36500      # If it succeeded, then it was overridden by the user. We will use it
36501      # for the tool.
36502
36503      # First remove it from the list of overridden variables, so we can test
36504      # for unknown variables in the end.
36505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36506
36507      # Check if the provided tool contains a complete path.
36508      tool_specified="$NM"
36509      tool_basename="${tool_specified##*/}"
36510      if test "x$tool_basename" = "x$tool_specified"; then
36511        # A command without a complete path is provided, search $PATH.
36512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36513$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36514        # Extract the first word of "$tool_basename", so it can be a program name with args.
36515set dummy $tool_basename; ac_word=$2
36516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36517$as_echo_n "checking for $ac_word... " >&6; }
36518if ${ac_cv_path_NM+:} false; then :
36519  $as_echo_n "(cached) " >&6
36520else
36521  case $NM in
36522  [\\/]* | ?:[\\/]*)
36523  ac_cv_path_NM="$NM" # Let the user override the test with a path.
36524  ;;
36525  *)
36526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36527for as_dir in $PATH
36528do
36529  IFS=$as_save_IFS
36530  test -z "$as_dir" && as_dir=.
36531    for ac_exec_ext in '' $ac_executable_extensions; do
36532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36533    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36535    break 2
36536  fi
36537done
36538  done
36539IFS=$as_save_IFS
36540
36541  ;;
36542esac
36543fi
36544NM=$ac_cv_path_NM
36545if test -n "$NM"; then
36546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36547$as_echo "$NM" >&6; }
36548else
36549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36550$as_echo "no" >&6; }
36551fi
36552
36553
36554        if test "x$NM" = x; then
36555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36556        fi
36557      else
36558        # Otherwise we believe it is a complete path. Use it as it is.
36559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36560$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36562$as_echo_n "checking for NM... " >&6; }
36563        if test ! -x "$tool_specified"; then
36564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36565$as_echo "not found" >&6; }
36566          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36567        fi
36568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36569$as_echo "$tool_specified" >&6; }
36570      fi
36571    fi
36572  fi
36573
36574
36575
36576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36577
36578  # First separate the path from the arguments. This will split at the first
36579  # space.
36580  complete="$NM"
36581  path="${complete%% *}"
36582  tmp="$complete EOL"
36583  arguments="${tmp#* }"
36584
36585  # Input might be given as Windows format, start by converting to
36586  # unix format.
36587  new_path=`$CYGPATH -u "$path"`
36588
36589  # Now try to locate executable using which
36590  new_path=`$WHICH "$new_path" 2> /dev/null`
36591  # bat and cmd files are not always considered executable in cygwin causing which
36592  # to not find them
36593  if test "x$new_path" = x \
36594      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36595      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36596    new_path=`$CYGPATH -u "$path"`
36597  fi
36598  if test "x$new_path" = x; then
36599    # Oops. Which didn't find the executable.
36600    # The splitting of arguments from the executable at a space might have been incorrect,
36601    # since paths with space are more likely in Windows. Give it another try with the whole
36602    # argument.
36603    path="$complete"
36604    arguments="EOL"
36605    new_path=`$CYGPATH -u "$path"`
36606    new_path=`$WHICH "$new_path" 2> /dev/null`
36607    # bat and cmd files are not always considered executable in cygwin causing which
36608    # to not find them
36609    if test "x$new_path" = x \
36610        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36611        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36612      new_path=`$CYGPATH -u "$path"`
36613    fi
36614    if test "x$new_path" = x; then
36615      # It's still not found. Now this is an unrecoverable error.
36616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36617$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36618      has_space=`$ECHO "$complete" | $GREP " "`
36619      if test "x$has_space" != x; then
36620        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36621$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36622      fi
36623      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36624    fi
36625  fi
36626
36627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36630  # "foo.exe" is OK but "foo" is an error.
36631  #
36632  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36633  # It is also a way to make sure we got the proper file name for the real test later on.
36634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36635  if test "x$test_shortpath" = x; then
36636    # Short path failed, file does not exist as specified.
36637    # Try adding .exe or .cmd
36638    if test -f "${new_path}.exe"; then
36639      input_to_shortpath="${new_path}.exe"
36640    elif test -f "${new_path}.cmd"; then
36641      input_to_shortpath="${new_path}.cmd"
36642    else
36643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36644$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36645      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36646$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36647      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36648    fi
36649  else
36650    input_to_shortpath="$new_path"
36651  fi
36652
36653  # Call helper function which possibly converts this using DOS-style short mode.
36654  # If so, the updated path is stored in $new_path.
36655  new_path="$input_to_shortpath"
36656
36657  input_path="$input_to_shortpath"
36658  # Check if we need to convert this using DOS-style short mode. If the path
36659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36660  # take no chances and rewrite it.
36661  # Note: m4 eats our [], so we need to use [ and ] instead.
36662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36663  if test "x$has_forbidden_chars" != x; then
36664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36668      # Going to short mode and back again did indeed matter. Since short mode is
36669      # case insensitive, let's make it lowercase to improve readability.
36670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36671      # Now convert it back to Unix-stile (cygpath)
36672      input_path=`$CYGPATH -u "$shortmode_path"`
36673      new_path="$input_path"
36674    fi
36675  fi
36676
36677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36678  if test "x$test_cygdrive_prefix" = x; then
36679    # As a simple fix, exclude /usr/bin since it's not a real path.
36680    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36682      # a path prefixed by /cygdrive for fixpath to work.
36683      new_path="$CYGWIN_ROOT_PATH$input_path"
36684    fi
36685  fi
36686
36687  # remove trailing .exe if any
36688  new_path="${new_path/%.exe/}"
36689
36690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36691
36692  # First separate the path from the arguments. This will split at the first
36693  # space.
36694  complete="$NM"
36695  path="${complete%% *}"
36696  tmp="$complete EOL"
36697  arguments="${tmp#* }"
36698
36699  # Input might be given as Windows format, start by converting to
36700  # unix format.
36701  new_path="$path"
36702
36703  windows_path="$new_path"
36704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36705    unix_path=`$CYGPATH -u "$windows_path"`
36706    new_path="$unix_path"
36707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36709    new_path="$unix_path"
36710  fi
36711
36712
36713  # Now try to locate executable using which
36714  new_path=`$WHICH "$new_path" 2> /dev/null`
36715
36716  if test "x$new_path" = x; then
36717    # Oops. Which didn't find the executable.
36718    # The splitting of arguments from the executable at a space might have been incorrect,
36719    # since paths with space are more likely in Windows. Give it another try with the whole
36720    # argument.
36721    path="$complete"
36722    arguments="EOL"
36723    new_path="$path"
36724
36725  windows_path="$new_path"
36726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36727    unix_path=`$CYGPATH -u "$windows_path"`
36728    new_path="$unix_path"
36729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36731    new_path="$unix_path"
36732  fi
36733
36734
36735    new_path=`$WHICH "$new_path" 2> /dev/null`
36736
36737    if test "x$new_path" = x; then
36738      # It's still not found. Now this is an unrecoverable error.
36739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36740$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36741      has_space=`$ECHO "$complete" | $GREP " "`
36742      if test "x$has_space" != x; then
36743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36745      fi
36746      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36747    fi
36748  fi
36749
36750  # Now new_path has a complete unix path to the binary
36751  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36752    # Keep paths in /bin as-is, but remove trailing .exe if any
36753    new_path="${new_path/%.exe/}"
36754    # Do not save /bin paths to all_fixpath_prefixes!
36755  else
36756    # Not in mixed or Windows style, start by that.
36757    new_path=`cmd //c echo $new_path`
36758
36759  input_path="$new_path"
36760  # Check if we need to convert this using DOS-style short mode. If the path
36761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36762  # take no chances and rewrite it.
36763  # Note: m4 eats our [], so we need to use [ and ] instead.
36764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36765  if test "x$has_forbidden_chars" != x; then
36766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36768  fi
36769
36770    # Output is in $new_path
36771
36772  windows_path="$new_path"
36773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36774    unix_path=`$CYGPATH -u "$windows_path"`
36775    new_path="$unix_path"
36776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36778    new_path="$unix_path"
36779  fi
36780
36781    # remove trailing .exe if any
36782    new_path="${new_path/%.exe/}"
36783
36784    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36785    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36786  fi
36787
36788  else
36789    # We're on a posix platform. Hooray! :)
36790    # First separate the path from the arguments. This will split at the first
36791    # space.
36792    complete="$NM"
36793    path="${complete%% *}"
36794    tmp="$complete EOL"
36795    arguments="${tmp#* }"
36796
36797    # Cannot rely on the command "which" here since it doesn't always work.
36798    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36799    if test -z "$is_absolute_path"; then
36800      # Path to executable is not absolute. Find it.
36801      IFS_save="$IFS"
36802      IFS=:
36803      for p in $PATH; do
36804        if test -f "$p/$path" && test -x "$p/$path"; then
36805          new_path="$p/$path"
36806          break
36807        fi
36808      done
36809      IFS="$IFS_save"
36810    else
36811      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
36812$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
36813      new_path="$path"
36814    fi
36815
36816    if test "x$new_path" = x; then
36817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36818$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36819      has_space=`$ECHO "$complete" | $GREP " "`
36820      if test "x$has_space" != x; then
36821        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36823      fi
36824      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36825    fi
36826  fi
36827
36828  # Now join together the path and the arguments once again
36829  if test "x$arguments" != xEOL; then
36830    new_complete="$new_path ${arguments% *}"
36831  else
36832    new_complete="$new_path"
36833  fi
36834
36835  if test "x$complete" != "x$new_complete"; then
36836    NM="$new_complete"
36837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36838$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36839  fi
36840
36841
36842
36843  # Publish this variable in the help.
36844
36845
36846  if test "x$GNM" = x; then
36847    # The variable is not set by user, try to locate tool using the code snippet
36848    for ac_prog in gnm
36849do
36850  # Extract the first word of "$ac_prog", so it can be a program name with args.
36851set dummy $ac_prog; ac_word=$2
36852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36853$as_echo_n "checking for $ac_word... " >&6; }
36854if ${ac_cv_path_GNM+:} false; then :
36855  $as_echo_n "(cached) " >&6
36856else
36857  case $GNM in
36858  [\\/]* | ?:[\\/]*)
36859  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36860  ;;
36861  *)
36862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36863for as_dir in $PATH
36864do
36865  IFS=$as_save_IFS
36866  test -z "$as_dir" && as_dir=.
36867    for ac_exec_ext in '' $ac_executable_extensions; do
36868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36869    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36871    break 2
36872  fi
36873done
36874  done
36875IFS=$as_save_IFS
36876
36877  ;;
36878esac
36879fi
36880GNM=$ac_cv_path_GNM
36881if test -n "$GNM"; then
36882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36883$as_echo "$GNM" >&6; }
36884else
36885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36886$as_echo "no" >&6; }
36887fi
36888
36889
36890  test -n "$GNM" && break
36891done
36892
36893  else
36894    # The variable is set, but is it from the command line or the environment?
36895
36896    # Try to remove the string !GNM! from our list.
36897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36899      # If it failed, the variable was not from the command line. Ignore it,
36900      # but warn the user (except for BASH, which is always set by the calling BASH).
36901      if test "xGNM" != xBASH; then
36902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36903$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36904      fi
36905      # Try to locate tool using the code snippet
36906      for ac_prog in gnm
36907do
36908  # Extract the first word of "$ac_prog", so it can be a program name with args.
36909set dummy $ac_prog; ac_word=$2
36910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36911$as_echo_n "checking for $ac_word... " >&6; }
36912if ${ac_cv_path_GNM+:} false; then :
36913  $as_echo_n "(cached) " >&6
36914else
36915  case $GNM in
36916  [\\/]* | ?:[\\/]*)
36917  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36918  ;;
36919  *)
36920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36921for as_dir in $PATH
36922do
36923  IFS=$as_save_IFS
36924  test -z "$as_dir" && as_dir=.
36925    for ac_exec_ext in '' $ac_executable_extensions; do
36926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36927    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36929    break 2
36930  fi
36931done
36932  done
36933IFS=$as_save_IFS
36934
36935  ;;
36936esac
36937fi
36938GNM=$ac_cv_path_GNM
36939if test -n "$GNM"; then
36940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36941$as_echo "$GNM" >&6; }
36942else
36943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36944$as_echo "no" >&6; }
36945fi
36946
36947
36948  test -n "$GNM" && break
36949done
36950
36951    else
36952      # If it succeeded, then it was overridden by the user. We will use it
36953      # for the tool.
36954
36955      # First remove it from the list of overridden variables, so we can test
36956      # for unknown variables in the end.
36957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36958
36959      # Check if the provided tool contains a complete path.
36960      tool_specified="$GNM"
36961      tool_basename="${tool_specified##*/}"
36962      if test "x$tool_basename" = "x$tool_specified"; then
36963        # A command without a complete path is provided, search $PATH.
36964        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36965$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36966        # Extract the first word of "$tool_basename", so it can be a program name with args.
36967set dummy $tool_basename; ac_word=$2
36968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36969$as_echo_n "checking for $ac_word... " >&6; }
36970if ${ac_cv_path_GNM+:} false; then :
36971  $as_echo_n "(cached) " >&6
36972else
36973  case $GNM in
36974  [\\/]* | ?:[\\/]*)
36975  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36976  ;;
36977  *)
36978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36979for as_dir in $PATH
36980do
36981  IFS=$as_save_IFS
36982  test -z "$as_dir" && as_dir=.
36983    for ac_exec_ext in '' $ac_executable_extensions; do
36984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36985    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36987    break 2
36988  fi
36989done
36990  done
36991IFS=$as_save_IFS
36992
36993  ;;
36994esac
36995fi
36996GNM=$ac_cv_path_GNM
36997if test -n "$GNM"; then
36998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36999$as_echo "$GNM" >&6; }
37000else
37001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37002$as_echo "no" >&6; }
37003fi
37004
37005
37006        if test "x$GNM" = x; then
37007          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37008        fi
37009      else
37010        # Otherwise we believe it is a complete path. Use it as it is.
37011        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37012$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37013        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37014$as_echo_n "checking for GNM... " >&6; }
37015        if test ! -x "$tool_specified"; then
37016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37017$as_echo "not found" >&6; }
37018          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37019        fi
37020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37021$as_echo "$tool_specified" >&6; }
37022      fi
37023    fi
37024  fi
37025
37026
37027
37028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37029
37030  # First separate the path from the arguments. This will split at the first
37031  # space.
37032  complete="$GNM"
37033  path="${complete%% *}"
37034  tmp="$complete EOL"
37035  arguments="${tmp#* }"
37036
37037  # Input might be given as Windows format, start by converting to
37038  # unix format.
37039  new_path=`$CYGPATH -u "$path"`
37040
37041  # Now try to locate executable using which
37042  new_path=`$WHICH "$new_path" 2> /dev/null`
37043  # bat and cmd files are not always considered executable in cygwin causing which
37044  # to not find them
37045  if test "x$new_path" = x \
37046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37048    new_path=`$CYGPATH -u "$path"`
37049  fi
37050  if test "x$new_path" = x; then
37051    # Oops. Which didn't find the executable.
37052    # The splitting of arguments from the executable at a space might have been incorrect,
37053    # since paths with space are more likely in Windows. Give it another try with the whole
37054    # argument.
37055    path="$complete"
37056    arguments="EOL"
37057    new_path=`$CYGPATH -u "$path"`
37058    new_path=`$WHICH "$new_path" 2> /dev/null`
37059    # bat and cmd files are not always considered executable in cygwin causing which
37060    # to not find them
37061    if test "x$new_path" = x \
37062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37064      new_path=`$CYGPATH -u "$path"`
37065    fi
37066    if test "x$new_path" = x; then
37067      # It's still not found. Now this is an unrecoverable error.
37068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37069$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37070      has_space=`$ECHO "$complete" | $GREP " "`
37071      if test "x$has_space" != x; then
37072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37074      fi
37075      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37076    fi
37077  fi
37078
37079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37082  # "foo.exe" is OK but "foo" is an error.
37083  #
37084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37085  # It is also a way to make sure we got the proper file name for the real test later on.
37086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37087  if test "x$test_shortpath" = x; then
37088    # Short path failed, file does not exist as specified.
37089    # Try adding .exe or .cmd
37090    if test -f "${new_path}.exe"; then
37091      input_to_shortpath="${new_path}.exe"
37092    elif test -f "${new_path}.cmd"; then
37093      input_to_shortpath="${new_path}.cmd"
37094    else
37095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37096$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37099      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37100    fi
37101  else
37102    input_to_shortpath="$new_path"
37103  fi
37104
37105  # Call helper function which possibly converts this using DOS-style short mode.
37106  # If so, the updated path is stored in $new_path.
37107  new_path="$input_to_shortpath"
37108
37109  input_path="$input_to_shortpath"
37110  # Check if we need to convert this using DOS-style short mode. If the path
37111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37112  # take no chances and rewrite it.
37113  # Note: m4 eats our [], so we need to use [ and ] instead.
37114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37115  if test "x$has_forbidden_chars" != x; then
37116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37120      # Going to short mode and back again did indeed matter. Since short mode is
37121      # case insensitive, let's make it lowercase to improve readability.
37122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37123      # Now convert it back to Unix-stile (cygpath)
37124      input_path=`$CYGPATH -u "$shortmode_path"`
37125      new_path="$input_path"
37126    fi
37127  fi
37128
37129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37130  if test "x$test_cygdrive_prefix" = x; then
37131    # As a simple fix, exclude /usr/bin since it's not a real path.
37132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37134      # a path prefixed by /cygdrive for fixpath to work.
37135      new_path="$CYGWIN_ROOT_PATH$input_path"
37136    fi
37137  fi
37138
37139  # remove trailing .exe if any
37140  new_path="${new_path/%.exe/}"
37141
37142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37143
37144  # First separate the path from the arguments. This will split at the first
37145  # space.
37146  complete="$GNM"
37147  path="${complete%% *}"
37148  tmp="$complete EOL"
37149  arguments="${tmp#* }"
37150
37151  # Input might be given as Windows format, start by converting to
37152  # unix format.
37153  new_path="$path"
37154
37155  windows_path="$new_path"
37156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37157    unix_path=`$CYGPATH -u "$windows_path"`
37158    new_path="$unix_path"
37159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37161    new_path="$unix_path"
37162  fi
37163
37164
37165  # Now try to locate executable using which
37166  new_path=`$WHICH "$new_path" 2> /dev/null`
37167
37168  if test "x$new_path" = x; then
37169    # Oops. Which didn't find the executable.
37170    # The splitting of arguments from the executable at a space might have been incorrect,
37171    # since paths with space are more likely in Windows. Give it another try with the whole
37172    # argument.
37173    path="$complete"
37174    arguments="EOL"
37175    new_path="$path"
37176
37177  windows_path="$new_path"
37178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37179    unix_path=`$CYGPATH -u "$windows_path"`
37180    new_path="$unix_path"
37181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37183    new_path="$unix_path"
37184  fi
37185
37186
37187    new_path=`$WHICH "$new_path" 2> /dev/null`
37188
37189    if test "x$new_path" = x; then
37190      # It's still not found. Now this is an unrecoverable error.
37191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37192$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37193      has_space=`$ECHO "$complete" | $GREP " "`
37194      if test "x$has_space" != x; then
37195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37197      fi
37198      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37199    fi
37200  fi
37201
37202  # Now new_path has a complete unix path to the binary
37203  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37204    # Keep paths in /bin as-is, but remove trailing .exe if any
37205    new_path="${new_path/%.exe/}"
37206    # Do not save /bin paths to all_fixpath_prefixes!
37207  else
37208    # Not in mixed or Windows style, start by that.
37209    new_path=`cmd //c echo $new_path`
37210
37211  input_path="$new_path"
37212  # Check if we need to convert this using DOS-style short mode. If the path
37213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37214  # take no chances and rewrite it.
37215  # Note: m4 eats our [], so we need to use [ and ] instead.
37216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37217  if test "x$has_forbidden_chars" != x; then
37218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37220  fi
37221
37222    # Output is in $new_path
37223
37224  windows_path="$new_path"
37225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37226    unix_path=`$CYGPATH -u "$windows_path"`
37227    new_path="$unix_path"
37228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37230    new_path="$unix_path"
37231  fi
37232
37233    # remove trailing .exe if any
37234    new_path="${new_path/%.exe/}"
37235
37236    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37237    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37238  fi
37239
37240  else
37241    # We're on a posix platform. Hooray! :)
37242    # First separate the path from the arguments. This will split at the first
37243    # space.
37244    complete="$GNM"
37245    path="${complete%% *}"
37246    tmp="$complete EOL"
37247    arguments="${tmp#* }"
37248
37249    # Cannot rely on the command "which" here since it doesn't always work.
37250    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37251    if test -z "$is_absolute_path"; then
37252      # Path to executable is not absolute. Find it.
37253      IFS_save="$IFS"
37254      IFS=:
37255      for p in $PATH; do
37256        if test -f "$p/$path" && test -x "$p/$path"; then
37257          new_path="$p/$path"
37258          break
37259        fi
37260      done
37261      IFS="$IFS_save"
37262    else
37263      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
37264$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
37265      new_path="$path"
37266    fi
37267
37268    if test "x$new_path" = x; then
37269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37270$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37271      has_space=`$ECHO "$complete" | $GREP " "`
37272      if test "x$has_space" != x; then
37273        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37275      fi
37276      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37277    fi
37278  fi
37279
37280  # Now join together the path and the arguments once again
37281  if test "x$arguments" != xEOL; then
37282    new_complete="$new_path ${arguments% *}"
37283  else
37284    new_complete="$new_path"
37285  fi
37286
37287  if test "x$complete" != "x$new_complete"; then
37288    GNM="$new_complete"
37289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37290$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37291  fi
37292
37293
37294
37295  # Publish this variable in the help.
37296
37297
37298  if test "x$STRIP" = x; then
37299    # The variable is not set by user, try to locate tool using the code snippet
37300    for ac_prog in strip
37301do
37302  # Extract the first word of "$ac_prog", so it can be a program name with args.
37303set dummy $ac_prog; ac_word=$2
37304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37305$as_echo_n "checking for $ac_word... " >&6; }
37306if ${ac_cv_path_STRIP+:} false; then :
37307  $as_echo_n "(cached) " >&6
37308else
37309  case $STRIP in
37310  [\\/]* | ?:[\\/]*)
37311  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37312  ;;
37313  *)
37314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37315for as_dir in $PATH
37316do
37317  IFS=$as_save_IFS
37318  test -z "$as_dir" && as_dir=.
37319    for ac_exec_ext in '' $ac_executable_extensions; do
37320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37321    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37323    break 2
37324  fi
37325done
37326  done
37327IFS=$as_save_IFS
37328
37329  ;;
37330esac
37331fi
37332STRIP=$ac_cv_path_STRIP
37333if test -n "$STRIP"; then
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37335$as_echo "$STRIP" >&6; }
37336else
37337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37338$as_echo "no" >&6; }
37339fi
37340
37341
37342  test -n "$STRIP" && break
37343done
37344
37345  else
37346    # The variable is set, but is it from the command line or the environment?
37347
37348    # Try to remove the string !STRIP! from our list.
37349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37351      # If it failed, the variable was not from the command line. Ignore it,
37352      # but warn the user (except for BASH, which is always set by the calling BASH).
37353      if test "xSTRIP" != xBASH; then
37354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37355$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37356      fi
37357      # Try to locate tool using the code snippet
37358      for ac_prog in strip
37359do
37360  # Extract the first word of "$ac_prog", so it can be a program name with args.
37361set dummy $ac_prog; ac_word=$2
37362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37363$as_echo_n "checking for $ac_word... " >&6; }
37364if ${ac_cv_path_STRIP+:} false; then :
37365  $as_echo_n "(cached) " >&6
37366else
37367  case $STRIP in
37368  [\\/]* | ?:[\\/]*)
37369  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37370  ;;
37371  *)
37372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37373for as_dir in $PATH
37374do
37375  IFS=$as_save_IFS
37376  test -z "$as_dir" && as_dir=.
37377    for ac_exec_ext in '' $ac_executable_extensions; do
37378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37379    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37381    break 2
37382  fi
37383done
37384  done
37385IFS=$as_save_IFS
37386
37387  ;;
37388esac
37389fi
37390STRIP=$ac_cv_path_STRIP
37391if test -n "$STRIP"; then
37392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37393$as_echo "$STRIP" >&6; }
37394else
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37396$as_echo "no" >&6; }
37397fi
37398
37399
37400  test -n "$STRIP" && break
37401done
37402
37403    else
37404      # If it succeeded, then it was overridden by the user. We will use it
37405      # for the tool.
37406
37407      # First remove it from the list of overridden variables, so we can test
37408      # for unknown variables in the end.
37409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37410
37411      # Check if the provided tool contains a complete path.
37412      tool_specified="$STRIP"
37413      tool_basename="${tool_specified##*/}"
37414      if test "x$tool_basename" = "x$tool_specified"; then
37415        # A command without a complete path is provided, search $PATH.
37416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37417$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37418        # Extract the first word of "$tool_basename", so it can be a program name with args.
37419set dummy $tool_basename; ac_word=$2
37420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37421$as_echo_n "checking for $ac_word... " >&6; }
37422if ${ac_cv_path_STRIP+:} false; then :
37423  $as_echo_n "(cached) " >&6
37424else
37425  case $STRIP in
37426  [\\/]* | ?:[\\/]*)
37427  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37428  ;;
37429  *)
37430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37431for as_dir in $PATH
37432do
37433  IFS=$as_save_IFS
37434  test -z "$as_dir" && as_dir=.
37435    for ac_exec_ext in '' $ac_executable_extensions; do
37436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37437    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37439    break 2
37440  fi
37441done
37442  done
37443IFS=$as_save_IFS
37444
37445  ;;
37446esac
37447fi
37448STRIP=$ac_cv_path_STRIP
37449if test -n "$STRIP"; then
37450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37451$as_echo "$STRIP" >&6; }
37452else
37453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37454$as_echo "no" >&6; }
37455fi
37456
37457
37458        if test "x$STRIP" = x; then
37459          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37460        fi
37461      else
37462        # Otherwise we believe it is a complete path. Use it as it is.
37463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37464$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37466$as_echo_n "checking for STRIP... " >&6; }
37467        if test ! -x "$tool_specified"; then
37468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37469$as_echo "not found" >&6; }
37470          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37471        fi
37472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37473$as_echo "$tool_specified" >&6; }
37474      fi
37475    fi
37476  fi
37477
37478
37479
37480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37481
37482  # First separate the path from the arguments. This will split at the first
37483  # space.
37484  complete="$STRIP"
37485  path="${complete%% *}"
37486  tmp="$complete EOL"
37487  arguments="${tmp#* }"
37488
37489  # Input might be given as Windows format, start by converting to
37490  # unix format.
37491  new_path=`$CYGPATH -u "$path"`
37492
37493  # Now try to locate executable using which
37494  new_path=`$WHICH "$new_path" 2> /dev/null`
37495  # bat and cmd files are not always considered executable in cygwin causing which
37496  # to not find them
37497  if test "x$new_path" = x \
37498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37500    new_path=`$CYGPATH -u "$path"`
37501  fi
37502  if test "x$new_path" = x; then
37503    # Oops. Which didn't find the executable.
37504    # The splitting of arguments from the executable at a space might have been incorrect,
37505    # since paths with space are more likely in Windows. Give it another try with the whole
37506    # argument.
37507    path="$complete"
37508    arguments="EOL"
37509    new_path=`$CYGPATH -u "$path"`
37510    new_path=`$WHICH "$new_path" 2> /dev/null`
37511    # bat and cmd files are not always considered executable in cygwin causing which
37512    # to not find them
37513    if test "x$new_path" = x \
37514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37516      new_path=`$CYGPATH -u "$path"`
37517    fi
37518    if test "x$new_path" = x; then
37519      # It's still not found. Now this is an unrecoverable error.
37520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37521$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37522      has_space=`$ECHO "$complete" | $GREP " "`
37523      if test "x$has_space" != x; then
37524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37526      fi
37527      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37528    fi
37529  fi
37530
37531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37534  # "foo.exe" is OK but "foo" is an error.
37535  #
37536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37537  # It is also a way to make sure we got the proper file name for the real test later on.
37538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37539  if test "x$test_shortpath" = x; then
37540    # Short path failed, file does not exist as specified.
37541    # Try adding .exe or .cmd
37542    if test -f "${new_path}.exe"; then
37543      input_to_shortpath="${new_path}.exe"
37544    elif test -f "${new_path}.cmd"; then
37545      input_to_shortpath="${new_path}.cmd"
37546    else
37547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37548$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37551      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37552    fi
37553  else
37554    input_to_shortpath="$new_path"
37555  fi
37556
37557  # Call helper function which possibly converts this using DOS-style short mode.
37558  # If so, the updated path is stored in $new_path.
37559  new_path="$input_to_shortpath"
37560
37561  input_path="$input_to_shortpath"
37562  # Check if we need to convert this using DOS-style short mode. If the path
37563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37564  # take no chances and rewrite it.
37565  # Note: m4 eats our [], so we need to use [ and ] instead.
37566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37567  if test "x$has_forbidden_chars" != x; then
37568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37572      # Going to short mode and back again did indeed matter. Since short mode is
37573      # case insensitive, let's make it lowercase to improve readability.
37574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37575      # Now convert it back to Unix-stile (cygpath)
37576      input_path=`$CYGPATH -u "$shortmode_path"`
37577      new_path="$input_path"
37578    fi
37579  fi
37580
37581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37582  if test "x$test_cygdrive_prefix" = x; then
37583    # As a simple fix, exclude /usr/bin since it's not a real path.
37584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37586      # a path prefixed by /cygdrive for fixpath to work.
37587      new_path="$CYGWIN_ROOT_PATH$input_path"
37588    fi
37589  fi
37590
37591  # remove trailing .exe if any
37592  new_path="${new_path/%.exe/}"
37593
37594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37595
37596  # First separate the path from the arguments. This will split at the first
37597  # space.
37598  complete="$STRIP"
37599  path="${complete%% *}"
37600  tmp="$complete EOL"
37601  arguments="${tmp#* }"
37602
37603  # Input might be given as Windows format, start by converting to
37604  # unix format.
37605  new_path="$path"
37606
37607  windows_path="$new_path"
37608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37609    unix_path=`$CYGPATH -u "$windows_path"`
37610    new_path="$unix_path"
37611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37613    new_path="$unix_path"
37614  fi
37615
37616
37617  # Now try to locate executable using which
37618  new_path=`$WHICH "$new_path" 2> /dev/null`
37619
37620  if test "x$new_path" = x; then
37621    # Oops. Which didn't find the executable.
37622    # The splitting of arguments from the executable at a space might have been incorrect,
37623    # since paths with space are more likely in Windows. Give it another try with the whole
37624    # argument.
37625    path="$complete"
37626    arguments="EOL"
37627    new_path="$path"
37628
37629  windows_path="$new_path"
37630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37631    unix_path=`$CYGPATH -u "$windows_path"`
37632    new_path="$unix_path"
37633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37635    new_path="$unix_path"
37636  fi
37637
37638
37639    new_path=`$WHICH "$new_path" 2> /dev/null`
37640
37641    if test "x$new_path" = x; then
37642      # It's still not found. Now this is an unrecoverable error.
37643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37644$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37645      has_space=`$ECHO "$complete" | $GREP " "`
37646      if test "x$has_space" != x; then
37647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37649      fi
37650      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37651    fi
37652  fi
37653
37654  # Now new_path has a complete unix path to the binary
37655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37656    # Keep paths in /bin as-is, but remove trailing .exe if any
37657    new_path="${new_path/%.exe/}"
37658    # Do not save /bin paths to all_fixpath_prefixes!
37659  else
37660    # Not in mixed or Windows style, start by that.
37661    new_path=`cmd //c echo $new_path`
37662
37663  input_path="$new_path"
37664  # Check if we need to convert this using DOS-style short mode. If the path
37665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37666  # take no chances and rewrite it.
37667  # Note: m4 eats our [], so we need to use [ and ] instead.
37668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37669  if test "x$has_forbidden_chars" != x; then
37670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37672  fi
37673
37674    # Output is in $new_path
37675
37676  windows_path="$new_path"
37677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37678    unix_path=`$CYGPATH -u "$windows_path"`
37679    new_path="$unix_path"
37680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37682    new_path="$unix_path"
37683  fi
37684
37685    # remove trailing .exe if any
37686    new_path="${new_path/%.exe/}"
37687
37688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37690  fi
37691
37692  else
37693    # We're on a posix platform. Hooray! :)
37694    # First separate the path from the arguments. This will split at the first
37695    # space.
37696    complete="$STRIP"
37697    path="${complete%% *}"
37698    tmp="$complete EOL"
37699    arguments="${tmp#* }"
37700
37701    # Cannot rely on the command "which" here since it doesn't always work.
37702    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37703    if test -z "$is_absolute_path"; then
37704      # Path to executable is not absolute. Find it.
37705      IFS_save="$IFS"
37706      IFS=:
37707      for p in $PATH; do
37708        if test -f "$p/$path" && test -x "$p/$path"; then
37709          new_path="$p/$path"
37710          break
37711        fi
37712      done
37713      IFS="$IFS_save"
37714    else
37715      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37716$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37717      new_path="$path"
37718    fi
37719
37720    if test "x$new_path" = x; then
37721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37722$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37723      has_space=`$ECHO "$complete" | $GREP " "`
37724      if test "x$has_space" != x; then
37725        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37726$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37727      fi
37728      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37729    fi
37730  fi
37731
37732  # Now join together the path and the arguments once again
37733  if test "x$arguments" != xEOL; then
37734    new_complete="$new_path ${arguments% *}"
37735  else
37736    new_complete="$new_path"
37737  fi
37738
37739  if test "x$complete" != "x$new_complete"; then
37740    STRIP="$new_complete"
37741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37742$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37743  fi
37744
37745
37746
37747  # Publish this variable in the help.
37748
37749
37750  if test "x$MCS" = x; then
37751    # The variable is not set by user, try to locate tool using the code snippet
37752    for ac_prog in mcs
37753do
37754  # Extract the first word of "$ac_prog", so it can be a program name with args.
37755set dummy $ac_prog; ac_word=$2
37756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37757$as_echo_n "checking for $ac_word... " >&6; }
37758if ${ac_cv_path_MCS+:} false; then :
37759  $as_echo_n "(cached) " >&6
37760else
37761  case $MCS in
37762  [\\/]* | ?:[\\/]*)
37763  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37764  ;;
37765  *)
37766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37767for as_dir in $PATH
37768do
37769  IFS=$as_save_IFS
37770  test -z "$as_dir" && as_dir=.
37771    for ac_exec_ext in '' $ac_executable_extensions; do
37772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37773    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37775    break 2
37776  fi
37777done
37778  done
37779IFS=$as_save_IFS
37780
37781  ;;
37782esac
37783fi
37784MCS=$ac_cv_path_MCS
37785if test -n "$MCS"; then
37786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37787$as_echo "$MCS" >&6; }
37788else
37789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37790$as_echo "no" >&6; }
37791fi
37792
37793
37794  test -n "$MCS" && break
37795done
37796
37797  else
37798    # The variable is set, but is it from the command line or the environment?
37799
37800    # Try to remove the string !MCS! from our list.
37801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37803      # If it failed, the variable was not from the command line. Ignore it,
37804      # but warn the user (except for BASH, which is always set by the calling BASH).
37805      if test "xMCS" != xBASH; then
37806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37807$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37808      fi
37809      # Try to locate tool using the code snippet
37810      for ac_prog in mcs
37811do
37812  # Extract the first word of "$ac_prog", so it can be a program name with args.
37813set dummy $ac_prog; ac_word=$2
37814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37815$as_echo_n "checking for $ac_word... " >&6; }
37816if ${ac_cv_path_MCS+:} false; then :
37817  $as_echo_n "(cached) " >&6
37818else
37819  case $MCS in
37820  [\\/]* | ?:[\\/]*)
37821  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37822  ;;
37823  *)
37824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37825for as_dir in $PATH
37826do
37827  IFS=$as_save_IFS
37828  test -z "$as_dir" && as_dir=.
37829    for ac_exec_ext in '' $ac_executable_extensions; do
37830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37831    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37833    break 2
37834  fi
37835done
37836  done
37837IFS=$as_save_IFS
37838
37839  ;;
37840esac
37841fi
37842MCS=$ac_cv_path_MCS
37843if test -n "$MCS"; then
37844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37845$as_echo "$MCS" >&6; }
37846else
37847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37848$as_echo "no" >&6; }
37849fi
37850
37851
37852  test -n "$MCS" && break
37853done
37854
37855    else
37856      # If it succeeded, then it was overridden by the user. We will use it
37857      # for the tool.
37858
37859      # First remove it from the list of overridden variables, so we can test
37860      # for unknown variables in the end.
37861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37862
37863      # Check if the provided tool contains a complete path.
37864      tool_specified="$MCS"
37865      tool_basename="${tool_specified##*/}"
37866      if test "x$tool_basename" = "x$tool_specified"; then
37867        # A command without a complete path is provided, search $PATH.
37868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37869$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37870        # Extract the first word of "$tool_basename", so it can be a program name with args.
37871set dummy $tool_basename; ac_word=$2
37872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37873$as_echo_n "checking for $ac_word... " >&6; }
37874if ${ac_cv_path_MCS+:} false; then :
37875  $as_echo_n "(cached) " >&6
37876else
37877  case $MCS in
37878  [\\/]* | ?:[\\/]*)
37879  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37880  ;;
37881  *)
37882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37883for as_dir in $PATH
37884do
37885  IFS=$as_save_IFS
37886  test -z "$as_dir" && as_dir=.
37887    for ac_exec_ext in '' $ac_executable_extensions; do
37888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37889    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37891    break 2
37892  fi
37893done
37894  done
37895IFS=$as_save_IFS
37896
37897  ;;
37898esac
37899fi
37900MCS=$ac_cv_path_MCS
37901if test -n "$MCS"; then
37902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37903$as_echo "$MCS" >&6; }
37904else
37905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37906$as_echo "no" >&6; }
37907fi
37908
37909
37910        if test "x$MCS" = x; then
37911          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37912        fi
37913      else
37914        # Otherwise we believe it is a complete path. Use it as it is.
37915        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37916$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37918$as_echo_n "checking for MCS... " >&6; }
37919        if test ! -x "$tool_specified"; then
37920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37921$as_echo "not found" >&6; }
37922          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37923        fi
37924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37925$as_echo "$tool_specified" >&6; }
37926      fi
37927    fi
37928  fi
37929
37930
37931
37932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37933
37934  # First separate the path from the arguments. This will split at the first
37935  # space.
37936  complete="$MCS"
37937  path="${complete%% *}"
37938  tmp="$complete EOL"
37939  arguments="${tmp#* }"
37940
37941  # Input might be given as Windows format, start by converting to
37942  # unix format.
37943  new_path=`$CYGPATH -u "$path"`
37944
37945  # Now try to locate executable using which
37946  new_path=`$WHICH "$new_path" 2> /dev/null`
37947  # bat and cmd files are not always considered executable in cygwin causing which
37948  # to not find them
37949  if test "x$new_path" = x \
37950      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37951      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37952    new_path=`$CYGPATH -u "$path"`
37953  fi
37954  if test "x$new_path" = x; then
37955    # Oops. Which didn't find the executable.
37956    # The splitting of arguments from the executable at a space might have been incorrect,
37957    # since paths with space are more likely in Windows. Give it another try with the whole
37958    # argument.
37959    path="$complete"
37960    arguments="EOL"
37961    new_path=`$CYGPATH -u "$path"`
37962    new_path=`$WHICH "$new_path" 2> /dev/null`
37963    # bat and cmd files are not always considered executable in cygwin causing which
37964    # to not find them
37965    if test "x$new_path" = x \
37966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37968      new_path=`$CYGPATH -u "$path"`
37969    fi
37970    if test "x$new_path" = x; then
37971      # It's still not found. Now this is an unrecoverable error.
37972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37973$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37974      has_space=`$ECHO "$complete" | $GREP " "`
37975      if test "x$has_space" != x; then
37976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37978      fi
37979      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
37980    fi
37981  fi
37982
37983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37986  # "foo.exe" is OK but "foo" is an error.
37987  #
37988  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37989  # It is also a way to make sure we got the proper file name for the real test later on.
37990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37991  if test "x$test_shortpath" = x; then
37992    # Short path failed, file does not exist as specified.
37993    # Try adding .exe or .cmd
37994    if test -f "${new_path}.exe"; then
37995      input_to_shortpath="${new_path}.exe"
37996    elif test -f "${new_path}.cmd"; then
37997      input_to_shortpath="${new_path}.cmd"
37998    else
37999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
38000$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
38001      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38002$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38003      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38004    fi
38005  else
38006    input_to_shortpath="$new_path"
38007  fi
38008
38009  # Call helper function which possibly converts this using DOS-style short mode.
38010  # If so, the updated path is stored in $new_path.
38011  new_path="$input_to_shortpath"
38012
38013  input_path="$input_to_shortpath"
38014  # Check if we need to convert this using DOS-style short mode. If the path
38015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38016  # take no chances and rewrite it.
38017  # Note: m4 eats our [], so we need to use [ and ] instead.
38018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38019  if test "x$has_forbidden_chars" != x; then
38020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38021    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38022    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38023    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38024      # Going to short mode and back again did indeed matter. Since short mode is
38025      # case insensitive, let's make it lowercase to improve readability.
38026      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38027      # Now convert it back to Unix-stile (cygpath)
38028      input_path=`$CYGPATH -u "$shortmode_path"`
38029      new_path="$input_path"
38030    fi
38031  fi
38032
38033  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38034  if test "x$test_cygdrive_prefix" = x; then
38035    # As a simple fix, exclude /usr/bin since it's not a real path.
38036    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38037      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38038      # a path prefixed by /cygdrive for fixpath to work.
38039      new_path="$CYGWIN_ROOT_PATH$input_path"
38040    fi
38041  fi
38042
38043  # remove trailing .exe if any
38044  new_path="${new_path/%.exe/}"
38045
38046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38047
38048  # First separate the path from the arguments. This will split at the first
38049  # space.
38050  complete="$MCS"
38051  path="${complete%% *}"
38052  tmp="$complete EOL"
38053  arguments="${tmp#* }"
38054
38055  # Input might be given as Windows format, start by converting to
38056  # unix format.
38057  new_path="$path"
38058
38059  windows_path="$new_path"
38060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38061    unix_path=`$CYGPATH -u "$windows_path"`
38062    new_path="$unix_path"
38063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38065    new_path="$unix_path"
38066  fi
38067
38068
38069  # Now try to locate executable using which
38070  new_path=`$WHICH "$new_path" 2> /dev/null`
38071
38072  if test "x$new_path" = x; then
38073    # Oops. Which didn't find the executable.
38074    # The splitting of arguments from the executable at a space might have been incorrect,
38075    # since paths with space are more likely in Windows. Give it another try with the whole
38076    # argument.
38077    path="$complete"
38078    arguments="EOL"
38079    new_path="$path"
38080
38081  windows_path="$new_path"
38082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38083    unix_path=`$CYGPATH -u "$windows_path"`
38084    new_path="$unix_path"
38085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38087    new_path="$unix_path"
38088  fi
38089
38090
38091    new_path=`$WHICH "$new_path" 2> /dev/null`
38092
38093    if test "x$new_path" = x; then
38094      # It's still not found. Now this is an unrecoverable error.
38095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38096$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38097      has_space=`$ECHO "$complete" | $GREP " "`
38098      if test "x$has_space" != x; then
38099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38101      fi
38102      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38103    fi
38104  fi
38105
38106  # Now new_path has a complete unix path to the binary
38107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38108    # Keep paths in /bin as-is, but remove trailing .exe if any
38109    new_path="${new_path/%.exe/}"
38110    # Do not save /bin paths to all_fixpath_prefixes!
38111  else
38112    # Not in mixed or Windows style, start by that.
38113    new_path=`cmd //c echo $new_path`
38114
38115  input_path="$new_path"
38116  # Check if we need to convert this using DOS-style short mode. If the path
38117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38118  # take no chances and rewrite it.
38119  # Note: m4 eats our [], so we need to use [ and ] instead.
38120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38121  if test "x$has_forbidden_chars" != x; then
38122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38124  fi
38125
38126    # Output is in $new_path
38127
38128  windows_path="$new_path"
38129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38130    unix_path=`$CYGPATH -u "$windows_path"`
38131    new_path="$unix_path"
38132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38134    new_path="$unix_path"
38135  fi
38136
38137    # remove trailing .exe if any
38138    new_path="${new_path/%.exe/}"
38139
38140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38142  fi
38143
38144  else
38145    # We're on a posix platform. Hooray! :)
38146    # First separate the path from the arguments. This will split at the first
38147    # space.
38148    complete="$MCS"
38149    path="${complete%% *}"
38150    tmp="$complete EOL"
38151    arguments="${tmp#* }"
38152
38153    # Cannot rely on the command "which" here since it doesn't always work.
38154    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38155    if test -z "$is_absolute_path"; then
38156      # Path to executable is not absolute. Find it.
38157      IFS_save="$IFS"
38158      IFS=:
38159      for p in $PATH; do
38160        if test -f "$p/$path" && test -x "$p/$path"; then
38161          new_path="$p/$path"
38162          break
38163        fi
38164      done
38165      IFS="$IFS_save"
38166    else
38167      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
38168$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
38169      new_path="$path"
38170    fi
38171
38172    if test "x$new_path" = x; then
38173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38174$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38175      has_space=`$ECHO "$complete" | $GREP " "`
38176      if test "x$has_space" != x; then
38177        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38178$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38179      fi
38180      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38181    fi
38182  fi
38183
38184  # Now join together the path and the arguments once again
38185  if test "x$arguments" != xEOL; then
38186    new_complete="$new_path ${arguments% *}"
38187  else
38188    new_complete="$new_path"
38189  fi
38190
38191  if test "x$complete" != "x$new_complete"; then
38192    MCS="$new_complete"
38193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
38194$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
38195  fi
38196
38197  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
38198
38199
38200  # Publish this variable in the help.
38201
38202
38203  if test "x$NM" = x; then
38204    # The variable is not set by user, try to locate tool using the code snippet
38205    if test -n "$ac_tool_prefix"; then
38206  for ac_prog in nm
38207  do
38208    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38209set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38211$as_echo_n "checking for $ac_word... " >&6; }
38212if ${ac_cv_prog_NM+:} false; then :
38213  $as_echo_n "(cached) " >&6
38214else
38215  if test -n "$NM"; then
38216  ac_cv_prog_NM="$NM" # Let the user override the test.
38217else
38218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38219for as_dir in $PATH
38220do
38221  IFS=$as_save_IFS
38222  test -z "$as_dir" && as_dir=.
38223    for ac_exec_ext in '' $ac_executable_extensions; do
38224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38225    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38227    break 2
38228  fi
38229done
38230  done
38231IFS=$as_save_IFS
38232
38233fi
38234fi
38235NM=$ac_cv_prog_NM
38236if test -n "$NM"; then
38237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38238$as_echo "$NM" >&6; }
38239else
38240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38241$as_echo "no" >&6; }
38242fi
38243
38244
38245    test -n "$NM" && break
38246  done
38247fi
38248if test -z "$NM"; then
38249  ac_ct_NM=$NM
38250  for ac_prog in nm
38251do
38252  # Extract the first word of "$ac_prog", so it can be a program name with args.
38253set dummy $ac_prog; ac_word=$2
38254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38255$as_echo_n "checking for $ac_word... " >&6; }
38256if ${ac_cv_prog_ac_ct_NM+:} false; then :
38257  $as_echo_n "(cached) " >&6
38258else
38259  if test -n "$ac_ct_NM"; then
38260  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38261else
38262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38263for as_dir in $PATH
38264do
38265  IFS=$as_save_IFS
38266  test -z "$as_dir" && as_dir=.
38267    for ac_exec_ext in '' $ac_executable_extensions; do
38268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38269    ac_cv_prog_ac_ct_NM="$ac_prog"
38270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38271    break 2
38272  fi
38273done
38274  done
38275IFS=$as_save_IFS
38276
38277fi
38278fi
38279ac_ct_NM=$ac_cv_prog_ac_ct_NM
38280if test -n "$ac_ct_NM"; then
38281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38282$as_echo "$ac_ct_NM" >&6; }
38283else
38284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38285$as_echo "no" >&6; }
38286fi
38287
38288
38289  test -n "$ac_ct_NM" && break
38290done
38291
38292  if test "x$ac_ct_NM" = x; then
38293    NM=""
38294  else
38295    case $cross_compiling:$ac_tool_warned in
38296yes:)
38297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38299ac_tool_warned=yes ;;
38300esac
38301    NM=$ac_ct_NM
38302  fi
38303fi
38304
38305  else
38306    # The variable is set, but is it from the command line or the environment?
38307
38308    # Try to remove the string !NM! from our list.
38309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38311      # If it failed, the variable was not from the command line. Ignore it,
38312      # but warn the user (except for BASH, which is always set by the calling BASH).
38313      if test "xNM" != xBASH; then
38314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38315$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38316      fi
38317      # Try to locate tool using the code snippet
38318      if test -n "$ac_tool_prefix"; then
38319  for ac_prog in nm
38320  do
38321    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38322set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38324$as_echo_n "checking for $ac_word... " >&6; }
38325if ${ac_cv_prog_NM+:} false; then :
38326  $as_echo_n "(cached) " >&6
38327else
38328  if test -n "$NM"; then
38329  ac_cv_prog_NM="$NM" # Let the user override the test.
38330else
38331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38332for as_dir in $PATH
38333do
38334  IFS=$as_save_IFS
38335  test -z "$as_dir" && as_dir=.
38336    for ac_exec_ext in '' $ac_executable_extensions; do
38337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38338    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38340    break 2
38341  fi
38342done
38343  done
38344IFS=$as_save_IFS
38345
38346fi
38347fi
38348NM=$ac_cv_prog_NM
38349if test -n "$NM"; then
38350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38351$as_echo "$NM" >&6; }
38352else
38353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38354$as_echo "no" >&6; }
38355fi
38356
38357
38358    test -n "$NM" && break
38359  done
38360fi
38361if test -z "$NM"; then
38362  ac_ct_NM=$NM
38363  for ac_prog in nm
38364do
38365  # Extract the first word of "$ac_prog", so it can be a program name with args.
38366set dummy $ac_prog; ac_word=$2
38367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38368$as_echo_n "checking for $ac_word... " >&6; }
38369if ${ac_cv_prog_ac_ct_NM+:} false; then :
38370  $as_echo_n "(cached) " >&6
38371else
38372  if test -n "$ac_ct_NM"; then
38373  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38374else
38375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38376for as_dir in $PATH
38377do
38378  IFS=$as_save_IFS
38379  test -z "$as_dir" && as_dir=.
38380    for ac_exec_ext in '' $ac_executable_extensions; do
38381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38382    ac_cv_prog_ac_ct_NM="$ac_prog"
38383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38384    break 2
38385  fi
38386done
38387  done
38388IFS=$as_save_IFS
38389
38390fi
38391fi
38392ac_ct_NM=$ac_cv_prog_ac_ct_NM
38393if test -n "$ac_ct_NM"; then
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38395$as_echo "$ac_ct_NM" >&6; }
38396else
38397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38398$as_echo "no" >&6; }
38399fi
38400
38401
38402  test -n "$ac_ct_NM" && break
38403done
38404
38405  if test "x$ac_ct_NM" = x; then
38406    NM=""
38407  else
38408    case $cross_compiling:$ac_tool_warned in
38409yes:)
38410{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38411$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38412ac_tool_warned=yes ;;
38413esac
38414    NM=$ac_ct_NM
38415  fi
38416fi
38417
38418    else
38419      # If it succeeded, then it was overridden by the user. We will use it
38420      # for the tool.
38421
38422      # First remove it from the list of overridden variables, so we can test
38423      # for unknown variables in the end.
38424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38425
38426      # Check if the provided tool contains a complete path.
38427      tool_specified="$NM"
38428      tool_basename="${tool_specified##*/}"
38429      if test "x$tool_basename" = "x$tool_specified"; then
38430        # A command without a complete path is provided, search $PATH.
38431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38432$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38433        # Extract the first word of "$tool_basename", so it can be a program name with args.
38434set dummy $tool_basename; ac_word=$2
38435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38436$as_echo_n "checking for $ac_word... " >&6; }
38437if ${ac_cv_path_NM+:} false; then :
38438  $as_echo_n "(cached) " >&6
38439else
38440  case $NM in
38441  [\\/]* | ?:[\\/]*)
38442  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38443  ;;
38444  *)
38445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38446for as_dir in $PATH
38447do
38448  IFS=$as_save_IFS
38449  test -z "$as_dir" && as_dir=.
38450    for ac_exec_ext in '' $ac_executable_extensions; do
38451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38452    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38454    break 2
38455  fi
38456done
38457  done
38458IFS=$as_save_IFS
38459
38460  ;;
38461esac
38462fi
38463NM=$ac_cv_path_NM
38464if test -n "$NM"; then
38465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38466$as_echo "$NM" >&6; }
38467else
38468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38469$as_echo "no" >&6; }
38470fi
38471
38472
38473        if test "x$NM" = x; then
38474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38475        fi
38476      else
38477        # Otherwise we believe it is a complete path. Use it as it is.
38478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38479$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38481$as_echo_n "checking for NM... " >&6; }
38482        if test ! -x "$tool_specified"; then
38483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38484$as_echo "not found" >&6; }
38485          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38486        fi
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38488$as_echo "$tool_specified" >&6; }
38489      fi
38490    fi
38491  fi
38492
38493
38494
38495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38496
38497  # First separate the path from the arguments. This will split at the first
38498  # space.
38499  complete="$NM"
38500  path="${complete%% *}"
38501  tmp="$complete EOL"
38502  arguments="${tmp#* }"
38503
38504  # Input might be given as Windows format, start by converting to
38505  # unix format.
38506  new_path=`$CYGPATH -u "$path"`
38507
38508  # Now try to locate executable using which
38509  new_path=`$WHICH "$new_path" 2> /dev/null`
38510  # bat and cmd files are not always considered executable in cygwin causing which
38511  # to not find them
38512  if test "x$new_path" = x \
38513      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38514      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38515    new_path=`$CYGPATH -u "$path"`
38516  fi
38517  if test "x$new_path" = x; then
38518    # Oops. Which didn't find the executable.
38519    # The splitting of arguments from the executable at a space might have been incorrect,
38520    # since paths with space are more likely in Windows. Give it another try with the whole
38521    # argument.
38522    path="$complete"
38523    arguments="EOL"
38524    new_path=`$CYGPATH -u "$path"`
38525    new_path=`$WHICH "$new_path" 2> /dev/null`
38526    # bat and cmd files are not always considered executable in cygwin causing which
38527    # to not find them
38528    if test "x$new_path" = x \
38529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38531      new_path=`$CYGPATH -u "$path"`
38532    fi
38533    if test "x$new_path" = x; then
38534      # It's still not found. Now this is an unrecoverable error.
38535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38536$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38537      has_space=`$ECHO "$complete" | $GREP " "`
38538      if test "x$has_space" != x; then
38539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38541      fi
38542      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38543    fi
38544  fi
38545
38546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38549  # "foo.exe" is OK but "foo" is an error.
38550  #
38551  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38552  # It is also a way to make sure we got the proper file name for the real test later on.
38553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38554  if test "x$test_shortpath" = x; then
38555    # Short path failed, file does not exist as specified.
38556    # Try adding .exe or .cmd
38557    if test -f "${new_path}.exe"; then
38558      input_to_shortpath="${new_path}.exe"
38559    elif test -f "${new_path}.cmd"; then
38560      input_to_shortpath="${new_path}.cmd"
38561    else
38562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38563$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38564      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38565$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38566      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38567    fi
38568  else
38569    input_to_shortpath="$new_path"
38570  fi
38571
38572  # Call helper function which possibly converts this using DOS-style short mode.
38573  # If so, the updated path is stored in $new_path.
38574  new_path="$input_to_shortpath"
38575
38576  input_path="$input_to_shortpath"
38577  # Check if we need to convert this using DOS-style short mode. If the path
38578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38579  # take no chances and rewrite it.
38580  # Note: m4 eats our [], so we need to use [ and ] instead.
38581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38582  if test "x$has_forbidden_chars" != x; then
38583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38587      # Going to short mode and back again did indeed matter. Since short mode is
38588      # case insensitive, let's make it lowercase to improve readability.
38589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38590      # Now convert it back to Unix-stile (cygpath)
38591      input_path=`$CYGPATH -u "$shortmode_path"`
38592      new_path="$input_path"
38593    fi
38594  fi
38595
38596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38597  if test "x$test_cygdrive_prefix" = x; then
38598    # As a simple fix, exclude /usr/bin since it's not a real path.
38599    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38601      # a path prefixed by /cygdrive for fixpath to work.
38602      new_path="$CYGWIN_ROOT_PATH$input_path"
38603    fi
38604  fi
38605
38606  # remove trailing .exe if any
38607  new_path="${new_path/%.exe/}"
38608
38609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38610
38611  # First separate the path from the arguments. This will split at the first
38612  # space.
38613  complete="$NM"
38614  path="${complete%% *}"
38615  tmp="$complete EOL"
38616  arguments="${tmp#* }"
38617
38618  # Input might be given as Windows format, start by converting to
38619  # unix format.
38620  new_path="$path"
38621
38622  windows_path="$new_path"
38623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38624    unix_path=`$CYGPATH -u "$windows_path"`
38625    new_path="$unix_path"
38626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38628    new_path="$unix_path"
38629  fi
38630
38631
38632  # Now try to locate executable using which
38633  new_path=`$WHICH "$new_path" 2> /dev/null`
38634
38635  if test "x$new_path" = x; then
38636    # Oops. Which didn't find the executable.
38637    # The splitting of arguments from the executable at a space might have been incorrect,
38638    # since paths with space are more likely in Windows. Give it another try with the whole
38639    # argument.
38640    path="$complete"
38641    arguments="EOL"
38642    new_path="$path"
38643
38644  windows_path="$new_path"
38645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38646    unix_path=`$CYGPATH -u "$windows_path"`
38647    new_path="$unix_path"
38648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38650    new_path="$unix_path"
38651  fi
38652
38653
38654    new_path=`$WHICH "$new_path" 2> /dev/null`
38655
38656    if test "x$new_path" = x; then
38657      # It's still not found. Now this is an unrecoverable error.
38658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38659$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38660      has_space=`$ECHO "$complete" | $GREP " "`
38661      if test "x$has_space" != x; then
38662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38664      fi
38665      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38666    fi
38667  fi
38668
38669  # Now new_path has a complete unix path to the binary
38670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38671    # Keep paths in /bin as-is, but remove trailing .exe if any
38672    new_path="${new_path/%.exe/}"
38673    # Do not save /bin paths to all_fixpath_prefixes!
38674  else
38675    # Not in mixed or Windows style, start by that.
38676    new_path=`cmd //c echo $new_path`
38677
38678  input_path="$new_path"
38679  # Check if we need to convert this using DOS-style short mode. If the path
38680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38681  # take no chances and rewrite it.
38682  # Note: m4 eats our [], so we need to use [ and ] instead.
38683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38684  if test "x$has_forbidden_chars" != x; then
38685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38687  fi
38688
38689    # Output is in $new_path
38690
38691  windows_path="$new_path"
38692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38693    unix_path=`$CYGPATH -u "$windows_path"`
38694    new_path="$unix_path"
38695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38697    new_path="$unix_path"
38698  fi
38699
38700    # remove trailing .exe if any
38701    new_path="${new_path/%.exe/}"
38702
38703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38705  fi
38706
38707  else
38708    # We're on a posix platform. Hooray! :)
38709    # First separate the path from the arguments. This will split at the first
38710    # space.
38711    complete="$NM"
38712    path="${complete%% *}"
38713    tmp="$complete EOL"
38714    arguments="${tmp#* }"
38715
38716    # Cannot rely on the command "which" here since it doesn't always work.
38717    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38718    if test -z "$is_absolute_path"; then
38719      # Path to executable is not absolute. Find it.
38720      IFS_save="$IFS"
38721      IFS=:
38722      for p in $PATH; do
38723        if test -f "$p/$path" && test -x "$p/$path"; then
38724          new_path="$p/$path"
38725          break
38726        fi
38727      done
38728      IFS="$IFS_save"
38729    else
38730      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
38731$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
38732      new_path="$path"
38733    fi
38734
38735    if test "x$new_path" = x; then
38736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38737$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38738      has_space=`$ECHO "$complete" | $GREP " "`
38739      if test "x$has_space" != x; then
38740        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38742      fi
38743      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38744    fi
38745  fi
38746
38747  # Now join together the path and the arguments once again
38748  if test "x$arguments" != xEOL; then
38749    new_complete="$new_path ${arguments% *}"
38750  else
38751    new_complete="$new_path"
38752  fi
38753
38754  if test "x$complete" != "x$new_complete"; then
38755    NM="$new_complete"
38756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38757$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38758  fi
38759
38760    GNM="$NM"
38761
38762
38763
38764  # Publish this variable in the help.
38765
38766
38767  if test "x$STRIP" = x; then
38768    # The variable is not set by user, try to locate tool using the code snippet
38769    if test -n "$ac_tool_prefix"; then
38770  for ac_prog in strip
38771  do
38772    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38775$as_echo_n "checking for $ac_word... " >&6; }
38776if ${ac_cv_prog_STRIP+:} false; then :
38777  $as_echo_n "(cached) " >&6
38778else
38779  if test -n "$STRIP"; then
38780  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38781else
38782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38783for as_dir in $PATH
38784do
38785  IFS=$as_save_IFS
38786  test -z "$as_dir" && as_dir=.
38787    for ac_exec_ext in '' $ac_executable_extensions; do
38788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38789    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38791    break 2
38792  fi
38793done
38794  done
38795IFS=$as_save_IFS
38796
38797fi
38798fi
38799STRIP=$ac_cv_prog_STRIP
38800if test -n "$STRIP"; then
38801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38802$as_echo "$STRIP" >&6; }
38803else
38804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38805$as_echo "no" >&6; }
38806fi
38807
38808
38809    test -n "$STRIP" && break
38810  done
38811fi
38812if test -z "$STRIP"; then
38813  ac_ct_STRIP=$STRIP
38814  for ac_prog in strip
38815do
38816  # Extract the first word of "$ac_prog", so it can be a program name with args.
38817set dummy $ac_prog; ac_word=$2
38818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38819$as_echo_n "checking for $ac_word... " >&6; }
38820if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  if test -n "$ac_ct_STRIP"; then
38824  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38825else
38826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38835    break 2
38836  fi
38837done
38838  done
38839IFS=$as_save_IFS
38840
38841fi
38842fi
38843ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38844if test -n "$ac_ct_STRIP"; then
38845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38846$as_echo "$ac_ct_STRIP" >&6; }
38847else
38848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38849$as_echo "no" >&6; }
38850fi
38851
38852
38853  test -n "$ac_ct_STRIP" && break
38854done
38855
38856  if test "x$ac_ct_STRIP" = x; then
38857    STRIP=""
38858  else
38859    case $cross_compiling:$ac_tool_warned in
38860yes:)
38861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38863ac_tool_warned=yes ;;
38864esac
38865    STRIP=$ac_ct_STRIP
38866  fi
38867fi
38868
38869  else
38870    # The variable is set, but is it from the command line or the environment?
38871
38872    # Try to remove the string !STRIP! from our list.
38873    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38874    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38875      # If it failed, the variable was not from the command line. Ignore it,
38876      # but warn the user (except for BASH, which is always set by the calling BASH).
38877      if test "xSTRIP" != xBASH; then
38878        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38879$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38880      fi
38881      # Try to locate tool using the code snippet
38882      if test -n "$ac_tool_prefix"; then
38883  for ac_prog in strip
38884  do
38885    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38886set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38888$as_echo_n "checking for $ac_word... " >&6; }
38889if ${ac_cv_prog_STRIP+:} false; then :
38890  $as_echo_n "(cached) " >&6
38891else
38892  if test -n "$STRIP"; then
38893  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38894else
38895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38896for as_dir in $PATH
38897do
38898  IFS=$as_save_IFS
38899  test -z "$as_dir" && as_dir=.
38900    for ac_exec_ext in '' $ac_executable_extensions; do
38901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38902    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38904    break 2
38905  fi
38906done
38907  done
38908IFS=$as_save_IFS
38909
38910fi
38911fi
38912STRIP=$ac_cv_prog_STRIP
38913if test -n "$STRIP"; then
38914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38915$as_echo "$STRIP" >&6; }
38916else
38917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38918$as_echo "no" >&6; }
38919fi
38920
38921
38922    test -n "$STRIP" && break
38923  done
38924fi
38925if test -z "$STRIP"; then
38926  ac_ct_STRIP=$STRIP
38927  for ac_prog in strip
38928do
38929  # Extract the first word of "$ac_prog", so it can be a program name with args.
38930set dummy $ac_prog; ac_word=$2
38931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38932$as_echo_n "checking for $ac_word... " >&6; }
38933if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38934  $as_echo_n "(cached) " >&6
38935else
38936  if test -n "$ac_ct_STRIP"; then
38937  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38938else
38939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38940for as_dir in $PATH
38941do
38942  IFS=$as_save_IFS
38943  test -z "$as_dir" && as_dir=.
38944    for ac_exec_ext in '' $ac_executable_extensions; do
38945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38946    ac_cv_prog_ac_ct_STRIP="$ac_prog"
38947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38948    break 2
38949  fi
38950done
38951  done
38952IFS=$as_save_IFS
38953
38954fi
38955fi
38956ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38957if test -n "$ac_ct_STRIP"; then
38958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38959$as_echo "$ac_ct_STRIP" >&6; }
38960else
38961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38962$as_echo "no" >&6; }
38963fi
38964
38965
38966  test -n "$ac_ct_STRIP" && break
38967done
38968
38969  if test "x$ac_ct_STRIP" = x; then
38970    STRIP=""
38971  else
38972    case $cross_compiling:$ac_tool_warned in
38973yes:)
38974{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38975$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38976ac_tool_warned=yes ;;
38977esac
38978    STRIP=$ac_ct_STRIP
38979  fi
38980fi
38981
38982    else
38983      # If it succeeded, then it was overridden by the user. We will use it
38984      # for the tool.
38985
38986      # First remove it from the list of overridden variables, so we can test
38987      # for unknown variables in the end.
38988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38989
38990      # Check if the provided tool contains a complete path.
38991      tool_specified="$STRIP"
38992      tool_basename="${tool_specified##*/}"
38993      if test "x$tool_basename" = "x$tool_specified"; then
38994        # A command without a complete path is provided, search $PATH.
38995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38996$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38997        # Extract the first word of "$tool_basename", so it can be a program name with args.
38998set dummy $tool_basename; ac_word=$2
38999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39000$as_echo_n "checking for $ac_word... " >&6; }
39001if ${ac_cv_path_STRIP+:} false; then :
39002  $as_echo_n "(cached) " >&6
39003else
39004  case $STRIP in
39005  [\\/]* | ?:[\\/]*)
39006  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39007  ;;
39008  *)
39009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39010for as_dir in $PATH
39011do
39012  IFS=$as_save_IFS
39013  test -z "$as_dir" && as_dir=.
39014    for ac_exec_ext in '' $ac_executable_extensions; do
39015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39016    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39018    break 2
39019  fi
39020done
39021  done
39022IFS=$as_save_IFS
39023
39024  ;;
39025esac
39026fi
39027STRIP=$ac_cv_path_STRIP
39028if test -n "$STRIP"; then
39029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39030$as_echo "$STRIP" >&6; }
39031else
39032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39033$as_echo "no" >&6; }
39034fi
39035
39036
39037        if test "x$STRIP" = x; then
39038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39039        fi
39040      else
39041        # Otherwise we believe it is a complete path. Use it as it is.
39042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39043$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39045$as_echo_n "checking for STRIP... " >&6; }
39046        if test ! -x "$tool_specified"; then
39047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39048$as_echo "not found" >&6; }
39049          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39050        fi
39051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39052$as_echo "$tool_specified" >&6; }
39053      fi
39054    fi
39055  fi
39056
39057
39058
39059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39060
39061  # First separate the path from the arguments. This will split at the first
39062  # space.
39063  complete="$STRIP"
39064  path="${complete%% *}"
39065  tmp="$complete EOL"
39066  arguments="${tmp#* }"
39067
39068  # Input might be given as Windows format, start by converting to
39069  # unix format.
39070  new_path=`$CYGPATH -u "$path"`
39071
39072  # Now try to locate executable using which
39073  new_path=`$WHICH "$new_path" 2> /dev/null`
39074  # bat and cmd files are not always considered executable in cygwin causing which
39075  # to not find them
39076  if test "x$new_path" = x \
39077      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39078      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39079    new_path=`$CYGPATH -u "$path"`
39080  fi
39081  if test "x$new_path" = x; then
39082    # Oops. Which didn't find the executable.
39083    # The splitting of arguments from the executable at a space might have been incorrect,
39084    # since paths with space are more likely in Windows. Give it another try with the whole
39085    # argument.
39086    path="$complete"
39087    arguments="EOL"
39088    new_path=`$CYGPATH -u "$path"`
39089    new_path=`$WHICH "$new_path" 2> /dev/null`
39090    # bat and cmd files are not always considered executable in cygwin causing which
39091    # to not find them
39092    if test "x$new_path" = x \
39093        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39094        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39095      new_path=`$CYGPATH -u "$path"`
39096    fi
39097    if test "x$new_path" = x; then
39098      # It's still not found. Now this is an unrecoverable error.
39099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39100$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39101      has_space=`$ECHO "$complete" | $GREP " "`
39102      if test "x$has_space" != x; then
39103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39105      fi
39106      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39107    fi
39108  fi
39109
39110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39113  # "foo.exe" is OK but "foo" is an error.
39114  #
39115  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39116  # It is also a way to make sure we got the proper file name for the real test later on.
39117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39118  if test "x$test_shortpath" = x; then
39119    # Short path failed, file does not exist as specified.
39120    # Try adding .exe or .cmd
39121    if test -f "${new_path}.exe"; then
39122      input_to_shortpath="${new_path}.exe"
39123    elif test -f "${new_path}.cmd"; then
39124      input_to_shortpath="${new_path}.cmd"
39125    else
39126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39127$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39130      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39131    fi
39132  else
39133    input_to_shortpath="$new_path"
39134  fi
39135
39136  # Call helper function which possibly converts this using DOS-style short mode.
39137  # If so, the updated path is stored in $new_path.
39138  new_path="$input_to_shortpath"
39139
39140  input_path="$input_to_shortpath"
39141  # Check if we need to convert this using DOS-style short mode. If the path
39142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39143  # take no chances and rewrite it.
39144  # Note: m4 eats our [], so we need to use [ and ] instead.
39145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39146  if test "x$has_forbidden_chars" != x; then
39147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39151      # Going to short mode and back again did indeed matter. Since short mode is
39152      # case insensitive, let's make it lowercase to improve readability.
39153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39154      # Now convert it back to Unix-stile (cygpath)
39155      input_path=`$CYGPATH -u "$shortmode_path"`
39156      new_path="$input_path"
39157    fi
39158  fi
39159
39160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39161  if test "x$test_cygdrive_prefix" = x; then
39162    # As a simple fix, exclude /usr/bin since it's not a real path.
39163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39165      # a path prefixed by /cygdrive for fixpath to work.
39166      new_path="$CYGWIN_ROOT_PATH$input_path"
39167    fi
39168  fi
39169
39170  # remove trailing .exe if any
39171  new_path="${new_path/%.exe/}"
39172
39173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39174
39175  # First separate the path from the arguments. This will split at the first
39176  # space.
39177  complete="$STRIP"
39178  path="${complete%% *}"
39179  tmp="$complete EOL"
39180  arguments="${tmp#* }"
39181
39182  # Input might be given as Windows format, start by converting to
39183  # unix format.
39184  new_path="$path"
39185
39186  windows_path="$new_path"
39187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39188    unix_path=`$CYGPATH -u "$windows_path"`
39189    new_path="$unix_path"
39190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39192    new_path="$unix_path"
39193  fi
39194
39195
39196  # Now try to locate executable using which
39197  new_path=`$WHICH "$new_path" 2> /dev/null`
39198
39199  if test "x$new_path" = x; then
39200    # Oops. Which didn't find the executable.
39201    # The splitting of arguments from the executable at a space might have been incorrect,
39202    # since paths with space are more likely in Windows. Give it another try with the whole
39203    # argument.
39204    path="$complete"
39205    arguments="EOL"
39206    new_path="$path"
39207
39208  windows_path="$new_path"
39209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39210    unix_path=`$CYGPATH -u "$windows_path"`
39211    new_path="$unix_path"
39212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39214    new_path="$unix_path"
39215  fi
39216
39217
39218    new_path=`$WHICH "$new_path" 2> /dev/null`
39219
39220    if test "x$new_path" = x; then
39221      # It's still not found. Now this is an unrecoverable error.
39222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39223$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39224      has_space=`$ECHO "$complete" | $GREP " "`
39225      if test "x$has_space" != x; then
39226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39228      fi
39229      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39230    fi
39231  fi
39232
39233  # Now new_path has a complete unix path to the binary
39234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39235    # Keep paths in /bin as-is, but remove trailing .exe if any
39236    new_path="${new_path/%.exe/}"
39237    # Do not save /bin paths to all_fixpath_prefixes!
39238  else
39239    # Not in mixed or Windows style, start by that.
39240    new_path=`cmd //c echo $new_path`
39241
39242  input_path="$new_path"
39243  # Check if we need to convert this using DOS-style short mode. If the path
39244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39245  # take no chances and rewrite it.
39246  # Note: m4 eats our [], so we need to use [ and ] instead.
39247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39248  if test "x$has_forbidden_chars" != x; then
39249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39251  fi
39252
39253    # Output is in $new_path
39254
39255  windows_path="$new_path"
39256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39257    unix_path=`$CYGPATH -u "$windows_path"`
39258    new_path="$unix_path"
39259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39261    new_path="$unix_path"
39262  fi
39263
39264    # remove trailing .exe if any
39265    new_path="${new_path/%.exe/}"
39266
39267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39269  fi
39270
39271  else
39272    # We're on a posix platform. Hooray! :)
39273    # First separate the path from the arguments. This will split at the first
39274    # space.
39275    complete="$STRIP"
39276    path="${complete%% *}"
39277    tmp="$complete EOL"
39278    arguments="${tmp#* }"
39279
39280    # Cannot rely on the command "which" here since it doesn't always work.
39281    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39282    if test -z "$is_absolute_path"; then
39283      # Path to executable is not absolute. Find it.
39284      IFS_save="$IFS"
39285      IFS=:
39286      for p in $PATH; do
39287        if test -f "$p/$path" && test -x "$p/$path"; then
39288          new_path="$p/$path"
39289          break
39290        fi
39291      done
39292      IFS="$IFS_save"
39293    else
39294      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
39295$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
39296      new_path="$path"
39297    fi
39298
39299    if test "x$new_path" = x; then
39300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39301$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39302      has_space=`$ECHO "$complete" | $GREP " "`
39303      if test "x$has_space" != x; then
39304        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39306      fi
39307      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39308    fi
39309  fi
39310
39311  # Now join together the path and the arguments once again
39312  if test "x$arguments" != xEOL; then
39313    new_complete="$new_path ${arguments% *}"
39314  else
39315    new_complete="$new_path"
39316  fi
39317
39318  if test "x$complete" != "x$new_complete"; then
39319    STRIP="$new_complete"
39320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39321$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39322  fi
39323
39324  fi
39325
39326  # objcopy is used for moving debug symbols to separate files when
39327  # full debug symbols are enabled.
39328  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
39329
39330
39331  # Publish this variable in the help.
39332
39333
39334  if test "x$OBJCOPY" = x; then
39335    # The variable is not set by user, try to locate tool using the code snippet
39336    if test -n "$ac_tool_prefix"; then
39337  for ac_prog in gobjcopy objcopy
39338  do
39339    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39340set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39342$as_echo_n "checking for $ac_word... " >&6; }
39343if ${ac_cv_prog_OBJCOPY+:} false; then :
39344  $as_echo_n "(cached) " >&6
39345else
39346  if test -n "$OBJCOPY"; then
39347  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39348else
39349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39350for as_dir in $PATH
39351do
39352  IFS=$as_save_IFS
39353  test -z "$as_dir" && as_dir=.
39354    for ac_exec_ext in '' $ac_executable_extensions; do
39355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39356    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39358    break 2
39359  fi
39360done
39361  done
39362IFS=$as_save_IFS
39363
39364fi
39365fi
39366OBJCOPY=$ac_cv_prog_OBJCOPY
39367if test -n "$OBJCOPY"; then
39368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39369$as_echo "$OBJCOPY" >&6; }
39370else
39371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39372$as_echo "no" >&6; }
39373fi
39374
39375
39376    test -n "$OBJCOPY" && break
39377  done
39378fi
39379if test -z "$OBJCOPY"; then
39380  ac_ct_OBJCOPY=$OBJCOPY
39381  for ac_prog in gobjcopy objcopy
39382do
39383  # Extract the first word of "$ac_prog", so it can be a program name with args.
39384set dummy $ac_prog; ac_word=$2
39385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39386$as_echo_n "checking for $ac_word... " >&6; }
39387if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39388  $as_echo_n "(cached) " >&6
39389else
39390  if test -n "$ac_ct_OBJCOPY"; then
39391  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39392else
39393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39394for as_dir in $PATH
39395do
39396  IFS=$as_save_IFS
39397  test -z "$as_dir" && as_dir=.
39398    for ac_exec_ext in '' $ac_executable_extensions; do
39399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39400    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39402    break 2
39403  fi
39404done
39405  done
39406IFS=$as_save_IFS
39407
39408fi
39409fi
39410ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39411if test -n "$ac_ct_OBJCOPY"; then
39412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39413$as_echo "$ac_ct_OBJCOPY" >&6; }
39414else
39415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39416$as_echo "no" >&6; }
39417fi
39418
39419
39420  test -n "$ac_ct_OBJCOPY" && break
39421done
39422
39423  if test "x$ac_ct_OBJCOPY" = x; then
39424    OBJCOPY=""
39425  else
39426    case $cross_compiling:$ac_tool_warned in
39427yes:)
39428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39430ac_tool_warned=yes ;;
39431esac
39432    OBJCOPY=$ac_ct_OBJCOPY
39433  fi
39434fi
39435
39436  else
39437    # The variable is set, but is it from the command line or the environment?
39438
39439    # Try to remove the string !OBJCOPY! from our list.
39440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
39441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39442      # If it failed, the variable was not from the command line. Ignore it,
39443      # but warn the user (except for BASH, which is always set by the calling BASH).
39444      if test "xOBJCOPY" != xBASH; then
39445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
39446$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
39447      fi
39448      # Try to locate tool using the code snippet
39449      if test -n "$ac_tool_prefix"; then
39450  for ac_prog in gobjcopy objcopy
39451  do
39452    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39453set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39455$as_echo_n "checking for $ac_word... " >&6; }
39456if ${ac_cv_prog_OBJCOPY+:} false; then :
39457  $as_echo_n "(cached) " >&6
39458else
39459  if test -n "$OBJCOPY"; then
39460  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39461else
39462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39463for as_dir in $PATH
39464do
39465  IFS=$as_save_IFS
39466  test -z "$as_dir" && as_dir=.
39467    for ac_exec_ext in '' $ac_executable_extensions; do
39468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39469    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39471    break 2
39472  fi
39473done
39474  done
39475IFS=$as_save_IFS
39476
39477fi
39478fi
39479OBJCOPY=$ac_cv_prog_OBJCOPY
39480if test -n "$OBJCOPY"; then
39481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39482$as_echo "$OBJCOPY" >&6; }
39483else
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39485$as_echo "no" >&6; }
39486fi
39487
39488
39489    test -n "$OBJCOPY" && break
39490  done
39491fi
39492if test -z "$OBJCOPY"; then
39493  ac_ct_OBJCOPY=$OBJCOPY
39494  for ac_prog in gobjcopy objcopy
39495do
39496  # Extract the first word of "$ac_prog", so it can be a program name with args.
39497set dummy $ac_prog; ac_word=$2
39498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39499$as_echo_n "checking for $ac_word... " >&6; }
39500if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39501  $as_echo_n "(cached) " >&6
39502else
39503  if test -n "$ac_ct_OBJCOPY"; then
39504  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39505else
39506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39507for as_dir in $PATH
39508do
39509  IFS=$as_save_IFS
39510  test -z "$as_dir" && as_dir=.
39511    for ac_exec_ext in '' $ac_executable_extensions; do
39512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39513    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39515    break 2
39516  fi
39517done
39518  done
39519IFS=$as_save_IFS
39520
39521fi
39522fi
39523ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39524if test -n "$ac_ct_OBJCOPY"; then
39525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39526$as_echo "$ac_ct_OBJCOPY" >&6; }
39527else
39528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39529$as_echo "no" >&6; }
39530fi
39531
39532
39533  test -n "$ac_ct_OBJCOPY" && break
39534done
39535
39536  if test "x$ac_ct_OBJCOPY" = x; then
39537    OBJCOPY=""
39538  else
39539    case $cross_compiling:$ac_tool_warned in
39540yes:)
39541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39543ac_tool_warned=yes ;;
39544esac
39545    OBJCOPY=$ac_ct_OBJCOPY
39546  fi
39547fi
39548
39549    else
39550      # If it succeeded, then it was overridden by the user. We will use it
39551      # for the tool.
39552
39553      # First remove it from the list of overridden variables, so we can test
39554      # for unknown variables in the end.
39555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39556
39557      # Check if the provided tool contains a complete path.
39558      tool_specified="$OBJCOPY"
39559      tool_basename="${tool_specified##*/}"
39560      if test "x$tool_basename" = "x$tool_specified"; then
39561        # A command without a complete path is provided, search $PATH.
39562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39563$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39564        # Extract the first word of "$tool_basename", so it can be a program name with args.
39565set dummy $tool_basename; ac_word=$2
39566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39567$as_echo_n "checking for $ac_word... " >&6; }
39568if ${ac_cv_path_OBJCOPY+:} false; then :
39569  $as_echo_n "(cached) " >&6
39570else
39571  case $OBJCOPY in
39572  [\\/]* | ?:[\\/]*)
39573  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39574  ;;
39575  *)
39576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39577for as_dir in $PATH
39578do
39579  IFS=$as_save_IFS
39580  test -z "$as_dir" && as_dir=.
39581    for ac_exec_ext in '' $ac_executable_extensions; do
39582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39583    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39585    break 2
39586  fi
39587done
39588  done
39589IFS=$as_save_IFS
39590
39591  ;;
39592esac
39593fi
39594OBJCOPY=$ac_cv_path_OBJCOPY
39595if test -n "$OBJCOPY"; then
39596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39597$as_echo "$OBJCOPY" >&6; }
39598else
39599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39600$as_echo "no" >&6; }
39601fi
39602
39603
39604        if test "x$OBJCOPY" = x; then
39605          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39606        fi
39607      else
39608        # Otherwise we believe it is a complete path. Use it as it is.
39609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39610$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39612$as_echo_n "checking for OBJCOPY... " >&6; }
39613        if test ! -x "$tool_specified"; then
39614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39615$as_echo "not found" >&6; }
39616          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39617        fi
39618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39619$as_echo "$tool_specified" >&6; }
39620      fi
39621    fi
39622  fi
39623
39624
39625    # Only call fixup if objcopy was found.
39626    if test -n "$OBJCOPY"; then
39627
39628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39629
39630  # First separate the path from the arguments. This will split at the first
39631  # space.
39632  complete="$OBJCOPY"
39633  path="${complete%% *}"
39634  tmp="$complete EOL"
39635  arguments="${tmp#* }"
39636
39637  # Input might be given as Windows format, start by converting to
39638  # unix format.
39639  new_path=`$CYGPATH -u "$path"`
39640
39641  # Now try to locate executable using which
39642  new_path=`$WHICH "$new_path" 2> /dev/null`
39643  # bat and cmd files are not always considered executable in cygwin causing which
39644  # to not find them
39645  if test "x$new_path" = x \
39646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39648    new_path=`$CYGPATH -u "$path"`
39649  fi
39650  if test "x$new_path" = x; then
39651    # Oops. Which didn't find the executable.
39652    # The splitting of arguments from the executable at a space might have been incorrect,
39653    # since paths with space are more likely in Windows. Give it another try with the whole
39654    # argument.
39655    path="$complete"
39656    arguments="EOL"
39657    new_path=`$CYGPATH -u "$path"`
39658    new_path=`$WHICH "$new_path" 2> /dev/null`
39659    # bat and cmd files are not always considered executable in cygwin causing which
39660    # to not find them
39661    if test "x$new_path" = x \
39662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39664      new_path=`$CYGPATH -u "$path"`
39665    fi
39666    if test "x$new_path" = x; then
39667      # It's still not found. Now this is an unrecoverable error.
39668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39669$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39670      has_space=`$ECHO "$complete" | $GREP " "`
39671      if test "x$has_space" != x; then
39672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39674      fi
39675      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39676    fi
39677  fi
39678
39679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39682  # "foo.exe" is OK but "foo" is an error.
39683  #
39684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39685  # It is also a way to make sure we got the proper file name for the real test later on.
39686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39687  if test "x$test_shortpath" = x; then
39688    # Short path failed, file does not exist as specified.
39689    # Try adding .exe or .cmd
39690    if test -f "${new_path}.exe"; then
39691      input_to_shortpath="${new_path}.exe"
39692    elif test -f "${new_path}.cmd"; then
39693      input_to_shortpath="${new_path}.cmd"
39694    else
39695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39696$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39699      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39700    fi
39701  else
39702    input_to_shortpath="$new_path"
39703  fi
39704
39705  # Call helper function which possibly converts this using DOS-style short mode.
39706  # If so, the updated path is stored in $new_path.
39707  new_path="$input_to_shortpath"
39708
39709  input_path="$input_to_shortpath"
39710  # Check if we need to convert this using DOS-style short mode. If the path
39711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39712  # take no chances and rewrite it.
39713  # Note: m4 eats our [], so we need to use [ and ] instead.
39714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39715  if test "x$has_forbidden_chars" != x; then
39716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39720      # Going to short mode and back again did indeed matter. Since short mode is
39721      # case insensitive, let's make it lowercase to improve readability.
39722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39723      # Now convert it back to Unix-stile (cygpath)
39724      input_path=`$CYGPATH -u "$shortmode_path"`
39725      new_path="$input_path"
39726    fi
39727  fi
39728
39729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39730  if test "x$test_cygdrive_prefix" = x; then
39731    # As a simple fix, exclude /usr/bin since it's not a real path.
39732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39734      # a path prefixed by /cygdrive for fixpath to work.
39735      new_path="$CYGWIN_ROOT_PATH$input_path"
39736    fi
39737  fi
39738
39739  # remove trailing .exe if any
39740  new_path="${new_path/%.exe/}"
39741
39742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39743
39744  # First separate the path from the arguments. This will split at the first
39745  # space.
39746  complete="$OBJCOPY"
39747  path="${complete%% *}"
39748  tmp="$complete EOL"
39749  arguments="${tmp#* }"
39750
39751  # Input might be given as Windows format, start by converting to
39752  # unix format.
39753  new_path="$path"
39754
39755  windows_path="$new_path"
39756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39757    unix_path=`$CYGPATH -u "$windows_path"`
39758    new_path="$unix_path"
39759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39761    new_path="$unix_path"
39762  fi
39763
39764
39765  # Now try to locate executable using which
39766  new_path=`$WHICH "$new_path" 2> /dev/null`
39767
39768  if test "x$new_path" = x; then
39769    # Oops. Which didn't find the executable.
39770    # The splitting of arguments from the executable at a space might have been incorrect,
39771    # since paths with space are more likely in Windows. Give it another try with the whole
39772    # argument.
39773    path="$complete"
39774    arguments="EOL"
39775    new_path="$path"
39776
39777  windows_path="$new_path"
39778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39779    unix_path=`$CYGPATH -u "$windows_path"`
39780    new_path="$unix_path"
39781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39783    new_path="$unix_path"
39784  fi
39785
39786
39787    new_path=`$WHICH "$new_path" 2> /dev/null`
39788
39789    if test "x$new_path" = x; then
39790      # It's still not found. Now this is an unrecoverable error.
39791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39792$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39793      has_space=`$ECHO "$complete" | $GREP " "`
39794      if test "x$has_space" != x; then
39795        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39796$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39797      fi
39798      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39799    fi
39800  fi
39801
39802  # Now new_path has a complete unix path to the binary
39803  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39804    # Keep paths in /bin as-is, but remove trailing .exe if any
39805    new_path="${new_path/%.exe/}"
39806    # Do not save /bin paths to all_fixpath_prefixes!
39807  else
39808    # Not in mixed or Windows style, start by that.
39809    new_path=`cmd //c echo $new_path`
39810
39811  input_path="$new_path"
39812  # Check if we need to convert this using DOS-style short mode. If the path
39813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39814  # take no chances and rewrite it.
39815  # Note: m4 eats our [], so we need to use [ and ] instead.
39816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39817  if test "x$has_forbidden_chars" != x; then
39818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39819    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39820  fi
39821
39822    # Output is in $new_path
39823
39824  windows_path="$new_path"
39825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39826    unix_path=`$CYGPATH -u "$windows_path"`
39827    new_path="$unix_path"
39828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39830    new_path="$unix_path"
39831  fi
39832
39833    # remove trailing .exe if any
39834    new_path="${new_path/%.exe/}"
39835
39836    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39837    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39838  fi
39839
39840  else
39841    # We're on a posix platform. Hooray! :)
39842    # First separate the path from the arguments. This will split at the first
39843    # space.
39844    complete="$OBJCOPY"
39845    path="${complete%% *}"
39846    tmp="$complete EOL"
39847    arguments="${tmp#* }"
39848
39849    # Cannot rely on the command "which" here since it doesn't always work.
39850    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39851    if test -z "$is_absolute_path"; then
39852      # Path to executable is not absolute. Find it.
39853      IFS_save="$IFS"
39854      IFS=:
39855      for p in $PATH; do
39856        if test -f "$p/$path" && test -x "$p/$path"; then
39857          new_path="$p/$path"
39858          break
39859        fi
39860      done
39861      IFS="$IFS_save"
39862    else
39863      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
39864$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
39865      new_path="$path"
39866    fi
39867
39868    if test "x$new_path" = x; then
39869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39870$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39871      has_space=`$ECHO "$complete" | $GREP " "`
39872      if test "x$has_space" != x; then
39873        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39875      fi
39876      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39877    fi
39878  fi
39879
39880  # Now join together the path and the arguments once again
39881  if test "x$arguments" != xEOL; then
39882    new_complete="$new_path ${arguments% *}"
39883  else
39884    new_complete="$new_path"
39885  fi
39886
39887  if test "x$complete" != "x$new_complete"; then
39888    OBJCOPY="$new_complete"
39889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39890$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39891  fi
39892
39893    fi
39894  fi
39895
39896
39897
39898  # Publish this variable in the help.
39899
39900
39901  if test "x$OBJDUMP" = x; then
39902    # The variable is not set by user, try to locate tool using the code snippet
39903    if test -n "$ac_tool_prefix"; then
39904  for ac_prog in gobjdump objdump
39905  do
39906    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39907set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39909$as_echo_n "checking for $ac_word... " >&6; }
39910if ${ac_cv_prog_OBJDUMP+:} false; then :
39911  $as_echo_n "(cached) " >&6
39912else
39913  if test -n "$OBJDUMP"; then
39914  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39915else
39916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39917for as_dir in $PATH
39918do
39919  IFS=$as_save_IFS
39920  test -z "$as_dir" && as_dir=.
39921    for ac_exec_ext in '' $ac_executable_extensions; do
39922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39923    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39925    break 2
39926  fi
39927done
39928  done
39929IFS=$as_save_IFS
39930
39931fi
39932fi
39933OBJDUMP=$ac_cv_prog_OBJDUMP
39934if test -n "$OBJDUMP"; then
39935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39936$as_echo "$OBJDUMP" >&6; }
39937else
39938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39939$as_echo "no" >&6; }
39940fi
39941
39942
39943    test -n "$OBJDUMP" && break
39944  done
39945fi
39946if test -z "$OBJDUMP"; then
39947  ac_ct_OBJDUMP=$OBJDUMP
39948  for ac_prog in gobjdump objdump
39949do
39950  # Extract the first word of "$ac_prog", so it can be a program name with args.
39951set dummy $ac_prog; ac_word=$2
39952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39953$as_echo_n "checking for $ac_word... " >&6; }
39954if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39955  $as_echo_n "(cached) " >&6
39956else
39957  if test -n "$ac_ct_OBJDUMP"; then
39958  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39959else
39960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39961for as_dir in $PATH
39962do
39963  IFS=$as_save_IFS
39964  test -z "$as_dir" && as_dir=.
39965    for ac_exec_ext in '' $ac_executable_extensions; do
39966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39967    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39969    break 2
39970  fi
39971done
39972  done
39973IFS=$as_save_IFS
39974
39975fi
39976fi
39977ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39978if test -n "$ac_ct_OBJDUMP"; then
39979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
39980$as_echo "$ac_ct_OBJDUMP" >&6; }
39981else
39982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39983$as_echo "no" >&6; }
39984fi
39985
39986
39987  test -n "$ac_ct_OBJDUMP" && break
39988done
39989
39990  if test "x$ac_ct_OBJDUMP" = x; then
39991    OBJDUMP=""
39992  else
39993    case $cross_compiling:$ac_tool_warned in
39994yes:)
39995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39997ac_tool_warned=yes ;;
39998esac
39999    OBJDUMP=$ac_ct_OBJDUMP
40000  fi
40001fi
40002
40003  else
40004    # The variable is set, but is it from the command line or the environment?
40005
40006    # Try to remove the string !OBJDUMP! from our list.
40007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
40008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40009      # If it failed, the variable was not from the command line. Ignore it,
40010      # but warn the user (except for BASH, which is always set by the calling BASH).
40011      if test "xOBJDUMP" != xBASH; then
40012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
40013$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
40014      fi
40015      # Try to locate tool using the code snippet
40016      if test -n "$ac_tool_prefix"; then
40017  for ac_prog in gobjdump objdump
40018  do
40019    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40022$as_echo_n "checking for $ac_word... " >&6; }
40023if ${ac_cv_prog_OBJDUMP+:} false; then :
40024  $as_echo_n "(cached) " >&6
40025else
40026  if test -n "$OBJDUMP"; then
40027  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
40028else
40029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40030for as_dir in $PATH
40031do
40032  IFS=$as_save_IFS
40033  test -z "$as_dir" && as_dir=.
40034    for ac_exec_ext in '' $ac_executable_extensions; do
40035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40036    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
40037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40038    break 2
40039  fi
40040done
40041  done
40042IFS=$as_save_IFS
40043
40044fi
40045fi
40046OBJDUMP=$ac_cv_prog_OBJDUMP
40047if test -n "$OBJDUMP"; then
40048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40049$as_echo "$OBJDUMP" >&6; }
40050else
40051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40052$as_echo "no" >&6; }
40053fi
40054
40055
40056    test -n "$OBJDUMP" && break
40057  done
40058fi
40059if test -z "$OBJDUMP"; then
40060  ac_ct_OBJDUMP=$OBJDUMP
40061  for ac_prog in gobjdump objdump
40062do
40063  # Extract the first word of "$ac_prog", so it can be a program name with args.
40064set dummy $ac_prog; ac_word=$2
40065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40066$as_echo_n "checking for $ac_word... " >&6; }
40067if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
40068  $as_echo_n "(cached) " >&6
40069else
40070  if test -n "$ac_ct_OBJDUMP"; then
40071  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
40072else
40073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40074for as_dir in $PATH
40075do
40076  IFS=$as_save_IFS
40077  test -z "$as_dir" && as_dir=.
40078    for ac_exec_ext in '' $ac_executable_extensions; do
40079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40080    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
40081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40082    break 2
40083  fi
40084done
40085  done
40086IFS=$as_save_IFS
40087
40088fi
40089fi
40090ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
40091if test -n "$ac_ct_OBJDUMP"; then
40092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
40093$as_echo "$ac_ct_OBJDUMP" >&6; }
40094else
40095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40096$as_echo "no" >&6; }
40097fi
40098
40099
40100  test -n "$ac_ct_OBJDUMP" && break
40101done
40102
40103  if test "x$ac_ct_OBJDUMP" = x; then
40104    OBJDUMP=""
40105  else
40106    case $cross_compiling:$ac_tool_warned in
40107yes:)
40108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40110ac_tool_warned=yes ;;
40111esac
40112    OBJDUMP=$ac_ct_OBJDUMP
40113  fi
40114fi
40115
40116    else
40117      # If it succeeded, then it was overridden by the user. We will use it
40118      # for the tool.
40119
40120      # First remove it from the list of overridden variables, so we can test
40121      # for unknown variables in the end.
40122      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40123
40124      # Check if the provided tool contains a complete path.
40125      tool_specified="$OBJDUMP"
40126      tool_basename="${tool_specified##*/}"
40127      if test "x$tool_basename" = "x$tool_specified"; then
40128        # A command without a complete path is provided, search $PATH.
40129        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
40130$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
40131        # Extract the first word of "$tool_basename", so it can be a program name with args.
40132set dummy $tool_basename; ac_word=$2
40133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40134$as_echo_n "checking for $ac_word... " >&6; }
40135if ${ac_cv_path_OBJDUMP+:} false; then :
40136  $as_echo_n "(cached) " >&6
40137else
40138  case $OBJDUMP in
40139  [\\/]* | ?:[\\/]*)
40140  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
40141  ;;
40142  *)
40143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40144for as_dir in $PATH
40145do
40146  IFS=$as_save_IFS
40147  test -z "$as_dir" && as_dir=.
40148    for ac_exec_ext in '' $ac_executable_extensions; do
40149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40150    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
40151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40152    break 2
40153  fi
40154done
40155  done
40156IFS=$as_save_IFS
40157
40158  ;;
40159esac
40160fi
40161OBJDUMP=$ac_cv_path_OBJDUMP
40162if test -n "$OBJDUMP"; then
40163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40164$as_echo "$OBJDUMP" >&6; }
40165else
40166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40167$as_echo "no" >&6; }
40168fi
40169
40170
40171        if test "x$OBJDUMP" = x; then
40172          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40173        fi
40174      else
40175        # Otherwise we believe it is a complete path. Use it as it is.
40176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
40177$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
40178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
40179$as_echo_n "checking for OBJDUMP... " >&6; }
40180        if test ! -x "$tool_specified"; then
40181          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40182$as_echo "not found" >&6; }
40183          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
40184        fi
40185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40186$as_echo "$tool_specified" >&6; }
40187      fi
40188    fi
40189  fi
40190
40191
40192  if test "x$OBJDUMP" != x; then
40193    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
40194
40195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40196
40197  # First separate the path from the arguments. This will split at the first
40198  # space.
40199  complete="$OBJDUMP"
40200  path="${complete%% *}"
40201  tmp="$complete EOL"
40202  arguments="${tmp#* }"
40203
40204  # Input might be given as Windows format, start by converting to
40205  # unix format.
40206  new_path=`$CYGPATH -u "$path"`
40207
40208  # Now try to locate executable using which
40209  new_path=`$WHICH "$new_path" 2> /dev/null`
40210  # bat and cmd files are not always considered executable in cygwin causing which
40211  # to not find them
40212  if test "x$new_path" = x \
40213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40215    new_path=`$CYGPATH -u "$path"`
40216  fi
40217  if test "x$new_path" = x; then
40218    # Oops. Which didn't find the executable.
40219    # The splitting of arguments from the executable at a space might have been incorrect,
40220    # since paths with space are more likely in Windows. Give it another try with the whole
40221    # argument.
40222    path="$complete"
40223    arguments="EOL"
40224    new_path=`$CYGPATH -u "$path"`
40225    new_path=`$WHICH "$new_path" 2> /dev/null`
40226    # bat and cmd files are not always considered executable in cygwin causing which
40227    # to not find them
40228    if test "x$new_path" = x \
40229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40231      new_path=`$CYGPATH -u "$path"`
40232    fi
40233    if test "x$new_path" = x; then
40234      # It's still not found. Now this is an unrecoverable error.
40235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40236$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40237      has_space=`$ECHO "$complete" | $GREP " "`
40238      if test "x$has_space" != x; then
40239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40241      fi
40242      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40243    fi
40244  fi
40245
40246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40249  # "foo.exe" is OK but "foo" is an error.
40250  #
40251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40252  # It is also a way to make sure we got the proper file name for the real test later on.
40253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40254  if test "x$test_shortpath" = x; then
40255    # Short path failed, file does not exist as specified.
40256    # Try adding .exe or .cmd
40257    if test -f "${new_path}.exe"; then
40258      input_to_shortpath="${new_path}.exe"
40259    elif test -f "${new_path}.cmd"; then
40260      input_to_shortpath="${new_path}.cmd"
40261    else
40262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
40263$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
40264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40266      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40267    fi
40268  else
40269    input_to_shortpath="$new_path"
40270  fi
40271
40272  # Call helper function which possibly converts this using DOS-style short mode.
40273  # If so, the updated path is stored in $new_path.
40274  new_path="$input_to_shortpath"
40275
40276  input_path="$input_to_shortpath"
40277  # Check if we need to convert this using DOS-style short mode. If the path
40278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40279  # take no chances and rewrite it.
40280  # Note: m4 eats our [], so we need to use [ and ] instead.
40281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40282  if test "x$has_forbidden_chars" != x; then
40283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40287      # Going to short mode and back again did indeed matter. Since short mode is
40288      # case insensitive, let's make it lowercase to improve readability.
40289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40290      # Now convert it back to Unix-stile (cygpath)
40291      input_path=`$CYGPATH -u "$shortmode_path"`
40292      new_path="$input_path"
40293    fi
40294  fi
40295
40296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40297  if test "x$test_cygdrive_prefix" = x; then
40298    # As a simple fix, exclude /usr/bin since it's not a real path.
40299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40301      # a path prefixed by /cygdrive for fixpath to work.
40302      new_path="$CYGWIN_ROOT_PATH$input_path"
40303    fi
40304  fi
40305
40306  # remove trailing .exe if any
40307  new_path="${new_path/%.exe/}"
40308
40309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40310
40311  # First separate the path from the arguments. This will split at the first
40312  # space.
40313  complete="$OBJDUMP"
40314  path="${complete%% *}"
40315  tmp="$complete EOL"
40316  arguments="${tmp#* }"
40317
40318  # Input might be given as Windows format, start by converting to
40319  # unix format.
40320  new_path="$path"
40321
40322  windows_path="$new_path"
40323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40324    unix_path=`$CYGPATH -u "$windows_path"`
40325    new_path="$unix_path"
40326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40328    new_path="$unix_path"
40329  fi
40330
40331
40332  # Now try to locate executable using which
40333  new_path=`$WHICH "$new_path" 2> /dev/null`
40334
40335  if test "x$new_path" = x; then
40336    # Oops. Which didn't find the executable.
40337    # The splitting of arguments from the executable at a space might have been incorrect,
40338    # since paths with space are more likely in Windows. Give it another try with the whole
40339    # argument.
40340    path="$complete"
40341    arguments="EOL"
40342    new_path="$path"
40343
40344  windows_path="$new_path"
40345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40346    unix_path=`$CYGPATH -u "$windows_path"`
40347    new_path="$unix_path"
40348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40350    new_path="$unix_path"
40351  fi
40352
40353
40354    new_path=`$WHICH "$new_path" 2> /dev/null`
40355
40356    if test "x$new_path" = x; then
40357      # It's still not found. Now this is an unrecoverable error.
40358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40359$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40360      has_space=`$ECHO "$complete" | $GREP " "`
40361      if test "x$has_space" != x; then
40362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40364      fi
40365      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40366    fi
40367  fi
40368
40369  # Now new_path has a complete unix path to the binary
40370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40371    # Keep paths in /bin as-is, but remove trailing .exe if any
40372    new_path="${new_path/%.exe/}"
40373    # Do not save /bin paths to all_fixpath_prefixes!
40374  else
40375    # Not in mixed or Windows style, start by that.
40376    new_path=`cmd //c echo $new_path`
40377
40378  input_path="$new_path"
40379  # Check if we need to convert this using DOS-style short mode. If the path
40380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40381  # take no chances and rewrite it.
40382  # Note: m4 eats our [], so we need to use [ and ] instead.
40383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40384  if test "x$has_forbidden_chars" != x; then
40385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40387  fi
40388
40389    # Output is in $new_path
40390
40391  windows_path="$new_path"
40392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40393    unix_path=`$CYGPATH -u "$windows_path"`
40394    new_path="$unix_path"
40395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40397    new_path="$unix_path"
40398  fi
40399
40400    # remove trailing .exe if any
40401    new_path="${new_path/%.exe/}"
40402
40403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40405  fi
40406
40407  else
40408    # We're on a posix platform. Hooray! :)
40409    # First separate the path from the arguments. This will split at the first
40410    # space.
40411    complete="$OBJDUMP"
40412    path="${complete%% *}"
40413    tmp="$complete EOL"
40414    arguments="${tmp#* }"
40415
40416    # Cannot rely on the command "which" here since it doesn't always work.
40417    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40418    if test -z "$is_absolute_path"; then
40419      # Path to executable is not absolute. Find it.
40420      IFS_save="$IFS"
40421      IFS=:
40422      for p in $PATH; do
40423        if test -f "$p/$path" && test -x "$p/$path"; then
40424          new_path="$p/$path"
40425          break
40426        fi
40427      done
40428      IFS="$IFS_save"
40429    else
40430      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
40431$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
40432      new_path="$path"
40433    fi
40434
40435    if test "x$new_path" = x; then
40436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40437$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40438      has_space=`$ECHO "$complete" | $GREP " "`
40439      if test "x$has_space" != x; then
40440        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40442      fi
40443      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40444    fi
40445  fi
40446
40447  # Now join together the path and the arguments once again
40448  if test "x$arguments" != xEOL; then
40449    new_complete="$new_path ${arguments% *}"
40450  else
40451    new_complete="$new_path"
40452  fi
40453
40454  if test "x$complete" != "x$new_complete"; then
40455    OBJDUMP="$new_complete"
40456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40457$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40458  fi
40459
40460  fi
40461
40462  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
40463
40464
40465  # Publish this variable in the help.
40466
40467
40468  if test "x$LIPO" = x; then
40469    # The variable is not set by user, try to locate tool using the code snippet
40470    for ac_prog in lipo
40471do
40472  # Extract the first word of "$ac_prog", so it can be a program name with args.
40473set dummy $ac_prog; ac_word=$2
40474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40475$as_echo_n "checking for $ac_word... " >&6; }
40476if ${ac_cv_path_LIPO+:} false; then :
40477  $as_echo_n "(cached) " >&6
40478else
40479  case $LIPO in
40480  [\\/]* | ?:[\\/]*)
40481  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40482  ;;
40483  *)
40484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40485for as_dir in $PATH
40486do
40487  IFS=$as_save_IFS
40488  test -z "$as_dir" && as_dir=.
40489    for ac_exec_ext in '' $ac_executable_extensions; do
40490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40491    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40493    break 2
40494  fi
40495done
40496  done
40497IFS=$as_save_IFS
40498
40499  ;;
40500esac
40501fi
40502LIPO=$ac_cv_path_LIPO
40503if test -n "$LIPO"; then
40504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40505$as_echo "$LIPO" >&6; }
40506else
40507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40508$as_echo "no" >&6; }
40509fi
40510
40511
40512  test -n "$LIPO" && break
40513done
40514
40515  else
40516    # The variable is set, but is it from the command line or the environment?
40517
40518    # Try to remove the string !LIPO! from our list.
40519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
40520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40521      # If it failed, the variable was not from the command line. Ignore it,
40522      # but warn the user (except for BASH, which is always set by the calling BASH).
40523      if test "xLIPO" != xBASH; then
40524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
40525$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
40526      fi
40527      # Try to locate tool using the code snippet
40528      for ac_prog in lipo
40529do
40530  # Extract the first word of "$ac_prog", so it can be a program name with args.
40531set dummy $ac_prog; ac_word=$2
40532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40533$as_echo_n "checking for $ac_word... " >&6; }
40534if ${ac_cv_path_LIPO+:} false; then :
40535  $as_echo_n "(cached) " >&6
40536else
40537  case $LIPO in
40538  [\\/]* | ?:[\\/]*)
40539  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40540  ;;
40541  *)
40542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40543for as_dir in $PATH
40544do
40545  IFS=$as_save_IFS
40546  test -z "$as_dir" && as_dir=.
40547    for ac_exec_ext in '' $ac_executable_extensions; do
40548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40549    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40551    break 2
40552  fi
40553done
40554  done
40555IFS=$as_save_IFS
40556
40557  ;;
40558esac
40559fi
40560LIPO=$ac_cv_path_LIPO
40561if test -n "$LIPO"; then
40562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40563$as_echo "$LIPO" >&6; }
40564else
40565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40566$as_echo "no" >&6; }
40567fi
40568
40569
40570  test -n "$LIPO" && break
40571done
40572
40573    else
40574      # If it succeeded, then it was overridden by the user. We will use it
40575      # for the tool.
40576
40577      # First remove it from the list of overridden variables, so we can test
40578      # for unknown variables in the end.
40579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40580
40581      # Check if the provided tool contains a complete path.
40582      tool_specified="$LIPO"
40583      tool_basename="${tool_specified##*/}"
40584      if test "x$tool_basename" = "x$tool_specified"; then
40585        # A command without a complete path is provided, search $PATH.
40586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
40587$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
40588        # Extract the first word of "$tool_basename", so it can be a program name with args.
40589set dummy $tool_basename; ac_word=$2
40590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40591$as_echo_n "checking for $ac_word... " >&6; }
40592if ${ac_cv_path_LIPO+:} false; then :
40593  $as_echo_n "(cached) " >&6
40594else
40595  case $LIPO in
40596  [\\/]* | ?:[\\/]*)
40597  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40598  ;;
40599  *)
40600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40601for as_dir in $PATH
40602do
40603  IFS=$as_save_IFS
40604  test -z "$as_dir" && as_dir=.
40605    for ac_exec_ext in '' $ac_executable_extensions; do
40606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40607    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40609    break 2
40610  fi
40611done
40612  done
40613IFS=$as_save_IFS
40614
40615  ;;
40616esac
40617fi
40618LIPO=$ac_cv_path_LIPO
40619if test -n "$LIPO"; then
40620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40621$as_echo "$LIPO" >&6; }
40622else
40623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40624$as_echo "no" >&6; }
40625fi
40626
40627
40628        if test "x$LIPO" = x; then
40629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40630        fi
40631      else
40632        # Otherwise we believe it is a complete path. Use it as it is.
40633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
40634$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
40635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
40636$as_echo_n "checking for LIPO... " >&6; }
40637        if test ! -x "$tool_specified"; then
40638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40639$as_echo "not found" >&6; }
40640          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
40641        fi
40642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40643$as_echo "$tool_specified" >&6; }
40644      fi
40645    fi
40646  fi
40647
40648
40649
40650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40651
40652  # First separate the path from the arguments. This will split at the first
40653  # space.
40654  complete="$LIPO"
40655  path="${complete%% *}"
40656  tmp="$complete EOL"
40657  arguments="${tmp#* }"
40658
40659  # Input might be given as Windows format, start by converting to
40660  # unix format.
40661  new_path=`$CYGPATH -u "$path"`
40662
40663  # Now try to locate executable using which
40664  new_path=`$WHICH "$new_path" 2> /dev/null`
40665  # bat and cmd files are not always considered executable in cygwin causing which
40666  # to not find them
40667  if test "x$new_path" = x \
40668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40670    new_path=`$CYGPATH -u "$path"`
40671  fi
40672  if test "x$new_path" = x; then
40673    # Oops. Which didn't find the executable.
40674    # The splitting of arguments from the executable at a space might have been incorrect,
40675    # since paths with space are more likely in Windows. Give it another try with the whole
40676    # argument.
40677    path="$complete"
40678    arguments="EOL"
40679    new_path=`$CYGPATH -u "$path"`
40680    new_path=`$WHICH "$new_path" 2> /dev/null`
40681    # bat and cmd files are not always considered executable in cygwin causing which
40682    # to not find them
40683    if test "x$new_path" = x \
40684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40686      new_path=`$CYGPATH -u "$path"`
40687    fi
40688    if test "x$new_path" = x; then
40689      # It's still not found. Now this is an unrecoverable error.
40690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40691$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40692      has_space=`$ECHO "$complete" | $GREP " "`
40693      if test "x$has_space" != x; then
40694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40696      fi
40697      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40698    fi
40699  fi
40700
40701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40704  # "foo.exe" is OK but "foo" is an error.
40705  #
40706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40707  # It is also a way to make sure we got the proper file name for the real test later on.
40708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40709  if test "x$test_shortpath" = x; then
40710    # Short path failed, file does not exist as specified.
40711    # Try adding .exe or .cmd
40712    if test -f "${new_path}.exe"; then
40713      input_to_shortpath="${new_path}.exe"
40714    elif test -f "${new_path}.cmd"; then
40715      input_to_shortpath="${new_path}.cmd"
40716    else
40717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
40718$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
40719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40721      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40722    fi
40723  else
40724    input_to_shortpath="$new_path"
40725  fi
40726
40727  # Call helper function which possibly converts this using DOS-style short mode.
40728  # If so, the updated path is stored in $new_path.
40729  new_path="$input_to_shortpath"
40730
40731  input_path="$input_to_shortpath"
40732  # Check if we need to convert this using DOS-style short mode. If the path
40733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40734  # take no chances and rewrite it.
40735  # Note: m4 eats our [], so we need to use [ and ] instead.
40736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40737  if test "x$has_forbidden_chars" != x; then
40738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40742      # Going to short mode and back again did indeed matter. Since short mode is
40743      # case insensitive, let's make it lowercase to improve readability.
40744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40745      # Now convert it back to Unix-stile (cygpath)
40746      input_path=`$CYGPATH -u "$shortmode_path"`
40747      new_path="$input_path"
40748    fi
40749  fi
40750
40751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40752  if test "x$test_cygdrive_prefix" = x; then
40753    # As a simple fix, exclude /usr/bin since it's not a real path.
40754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40756      # a path prefixed by /cygdrive for fixpath to work.
40757      new_path="$CYGWIN_ROOT_PATH$input_path"
40758    fi
40759  fi
40760
40761  # remove trailing .exe if any
40762  new_path="${new_path/%.exe/}"
40763
40764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40765
40766  # First separate the path from the arguments. This will split at the first
40767  # space.
40768  complete="$LIPO"
40769  path="${complete%% *}"
40770  tmp="$complete EOL"
40771  arguments="${tmp#* }"
40772
40773  # Input might be given as Windows format, start by converting to
40774  # unix format.
40775  new_path="$path"
40776
40777  windows_path="$new_path"
40778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40779    unix_path=`$CYGPATH -u "$windows_path"`
40780    new_path="$unix_path"
40781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40783    new_path="$unix_path"
40784  fi
40785
40786
40787  # Now try to locate executable using which
40788  new_path=`$WHICH "$new_path" 2> /dev/null`
40789
40790  if test "x$new_path" = x; then
40791    # Oops. Which didn't find the executable.
40792    # The splitting of arguments from the executable at a space might have been incorrect,
40793    # since paths with space are more likely in Windows. Give it another try with the whole
40794    # argument.
40795    path="$complete"
40796    arguments="EOL"
40797    new_path="$path"
40798
40799  windows_path="$new_path"
40800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40801    unix_path=`$CYGPATH -u "$windows_path"`
40802    new_path="$unix_path"
40803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40805    new_path="$unix_path"
40806  fi
40807
40808
40809    new_path=`$WHICH "$new_path" 2> /dev/null`
40810
40811    if test "x$new_path" = x; then
40812      # It's still not found. Now this is an unrecoverable error.
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40814$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40815      has_space=`$ECHO "$complete" | $GREP " "`
40816      if test "x$has_space" != x; then
40817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40819      fi
40820      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40821    fi
40822  fi
40823
40824  # Now new_path has a complete unix path to the binary
40825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40826    # Keep paths in /bin as-is, but remove trailing .exe if any
40827    new_path="${new_path/%.exe/}"
40828    # Do not save /bin paths to all_fixpath_prefixes!
40829  else
40830    # Not in mixed or Windows style, start by that.
40831    new_path=`cmd //c echo $new_path`
40832
40833  input_path="$new_path"
40834  # Check if we need to convert this using DOS-style short mode. If the path
40835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40836  # take no chances and rewrite it.
40837  # Note: m4 eats our [], so we need to use [ and ] instead.
40838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40839  if test "x$has_forbidden_chars" != x; then
40840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40842  fi
40843
40844    # Output is in $new_path
40845
40846  windows_path="$new_path"
40847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40848    unix_path=`$CYGPATH -u "$windows_path"`
40849    new_path="$unix_path"
40850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40852    new_path="$unix_path"
40853  fi
40854
40855    # remove trailing .exe if any
40856    new_path="${new_path/%.exe/}"
40857
40858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40860  fi
40861
40862  else
40863    # We're on a posix platform. Hooray! :)
40864    # First separate the path from the arguments. This will split at the first
40865    # space.
40866    complete="$LIPO"
40867    path="${complete%% *}"
40868    tmp="$complete EOL"
40869    arguments="${tmp#* }"
40870
40871    # Cannot rely on the command "which" here since it doesn't always work.
40872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40873    if test -z "$is_absolute_path"; then
40874      # Path to executable is not absolute. Find it.
40875      IFS_save="$IFS"
40876      IFS=:
40877      for p in $PATH; do
40878        if test -f "$p/$path" && test -x "$p/$path"; then
40879          new_path="$p/$path"
40880          break
40881        fi
40882      done
40883      IFS="$IFS_save"
40884    else
40885      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
40886$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
40887      new_path="$path"
40888    fi
40889
40890    if test "x$new_path" = x; then
40891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40892$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40893      has_space=`$ECHO "$complete" | $GREP " "`
40894      if test "x$has_space" != x; then
40895        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40897      fi
40898      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40899    fi
40900  fi
40901
40902  # Now join together the path and the arguments once again
40903  if test "x$arguments" != xEOL; then
40904    new_complete="$new_path ${arguments% *}"
40905  else
40906    new_complete="$new_path"
40907  fi
40908
40909  if test "x$complete" != "x$new_complete"; then
40910    LIPO="$new_complete"
40911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
40912$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
40913  fi
40914
40915  fi
40916
40917
40918
40919  # Restore old path without tools dir
40920  PATH="$OLD_PATH"
40921
40922
40923# FIXME: Currently we must test this after paths but before flags. Fix!
40924
40925# And we can test some aspects on the target using configure macros.
40926
40927
40928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40929$as_echo_n "checking for ANSI C header files... " >&6; }
40930if ${ac_cv_header_stdc+:} false; then :
40931  $as_echo_n "(cached) " >&6
40932else
40933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40934/* end confdefs.h.  */
40935#include <stdlib.h>
40936#include <stdarg.h>
40937#include <string.h>
40938#include <float.h>
40939
40940int
40941main ()
40942{
40943
40944  ;
40945  return 0;
40946}
40947_ACEOF
40948if ac_fn_cxx_try_compile "$LINENO"; then :
40949  ac_cv_header_stdc=yes
40950else
40951  ac_cv_header_stdc=no
40952fi
40953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40954
40955if test $ac_cv_header_stdc = yes; then
40956  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40958/* end confdefs.h.  */
40959#include <string.h>
40960
40961_ACEOF
40962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40963  $EGREP "memchr" >/dev/null 2>&1; then :
40964
40965else
40966  ac_cv_header_stdc=no
40967fi
40968rm -f conftest*
40969
40970fi
40971
40972if test $ac_cv_header_stdc = yes; then
40973  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40974  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40975/* end confdefs.h.  */
40976#include <stdlib.h>
40977
40978_ACEOF
40979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40980  $EGREP "free" >/dev/null 2>&1; then :
40981
40982else
40983  ac_cv_header_stdc=no
40984fi
40985rm -f conftest*
40986
40987fi
40988
40989if test $ac_cv_header_stdc = yes; then
40990  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40991  if test "$cross_compiling" = yes; then :
40992  :
40993else
40994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40995/* end confdefs.h.  */
40996#include <ctype.h>
40997#include <stdlib.h>
40998#if ((' ' & 0x0FF) == 0x020)
40999# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41000# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41001#else
41002# define ISLOWER(c) \
41003		   (('a' <= (c) && (c) <= 'i') \
41004		     || ('j' <= (c) && (c) <= 'r') \
41005		     || ('s' <= (c) && (c) <= 'z'))
41006# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41007#endif
41008
41009#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41010int
41011main ()
41012{
41013  int i;
41014  for (i = 0; i < 256; i++)
41015    if (XOR (islower (i), ISLOWER (i))
41016	|| toupper (i) != TOUPPER (i))
41017      return 2;
41018  return 0;
41019}
41020_ACEOF
41021if ac_fn_cxx_try_run "$LINENO"; then :
41022
41023else
41024  ac_cv_header_stdc=no
41025fi
41026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41027  conftest.$ac_objext conftest.beam conftest.$ac_ext
41028fi
41029
41030fi
41031fi
41032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41033$as_echo "$ac_cv_header_stdc" >&6; }
41034if test $ac_cv_header_stdc = yes; then
41035
41036$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41037
41038fi
41039
41040# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41041for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41042		  inttypes.h stdint.h unistd.h
41043do :
41044  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41045ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41046"
41047if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41048  cat >>confdefs.h <<_ACEOF
41049#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41050_ACEOF
41051
41052fi
41053
41054done
41055
41056
41057
41058  ###############################################################################
41059  #
41060  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41061  # (The JVM can use 32 or 64 bit Java pointers but that decision
41062  # is made at runtime.)
41063  #
41064
41065  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41066    # Always specify -m flag on Solaris
41067    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41068
41069  # When we add flags to the "official" CFLAGS etc, we need to
41070  # keep track of these additions in ADDED_CFLAGS etc. These
41071  # will later be checked to make sure only controlled additions
41072  # have been made to CFLAGS etc.
41073  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41074  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41075  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41076
41077  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41078  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41079  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41080
41081  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41082  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41083  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41084
41085  elif test "x$COMPILE_TYPE" = xreduced; then
41086    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41087      # Specify -m if running reduced on other Posix platforms
41088
41089  # When we add flags to the "official" CFLAGS etc, we need to
41090  # keep track of these additions in ADDED_CFLAGS etc. These
41091  # will later be checked to make sure only controlled additions
41092  # have been made to CFLAGS etc.
41093  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41094  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41095  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41096
41097  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41098  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41099  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41100
41101  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41102  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41103  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41104
41105    fi
41106  fi
41107
41108  # Make compilation sanity check
41109  for ac_header in stdio.h
41110do :
41111  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41112if test "x$ac_cv_header_stdio_h" = xyes; then :
41113  cat >>confdefs.h <<_ACEOF
41114#define HAVE_STDIO_H 1
41115_ACEOF
41116
41117else
41118
41119    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41120$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41121    if test "x$COMPILE_TYPE" = xreduced; then
41122      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41123$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41124    elif test "x$COMPILE_TYPE" = xcross; then
41125      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41126$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41127    fi
41128    as_fn_error $? "Cannot continue." "$LINENO" 5
41129
41130fi
41131
41132done
41133
41134
41135  # The cast to long int works around a bug in the HP C Compiler
41136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41138# This bug is HP SR number 8606223364.
41139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41140$as_echo_n "checking size of int *... " >&6; }
41141if ${ac_cv_sizeof_int_p+:} false; then :
41142  $as_echo_n "(cached) " >&6
41143else
41144  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41145
41146else
41147  if test "$ac_cv_type_int_p" = yes; then
41148     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41150as_fn_error 77 "cannot compute sizeof (int *)
41151See \`config.log' for more details" "$LINENO" 5; }
41152   else
41153     ac_cv_sizeof_int_p=0
41154   fi
41155fi
41156
41157fi
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41159$as_echo "$ac_cv_sizeof_int_p" >&6; }
41160
41161
41162
41163cat >>confdefs.h <<_ACEOF
41164#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41165_ACEOF
41166
41167
41168
41169  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41170  if test "x$ac_cv_sizeof_int_p" = x; then
41171    # The test failed, lets stick to the assumed value.
41172    { $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
41173$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41174  else
41175    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41176
41177    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41178      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41179      # Let's try to implicitely set the compilers target architecture and retry the test
41180      { $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
41181$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;}
41182      { $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
41183$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;}
41184
41185  # When we add flags to the "official" CFLAGS etc, we need to
41186  # keep track of these additions in ADDED_CFLAGS etc. These
41187  # will later be checked to make sure only controlled additions
41188  # have been made to CFLAGS etc.
41189  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41190  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41191  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41192
41193  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41194  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41195  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41196
41197  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41198  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41199  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41200
41201
41202      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41203      unset ac_cv_sizeof_int_p
41204      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41205      cat >>confdefs.h <<_ACEOF
41206#undef SIZEOF_INT_P
41207_ACEOF
41208
41209      # The cast to long int works around a bug in the HP C Compiler
41210# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41211# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41212# This bug is HP SR number 8606223364.
41213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41214$as_echo_n "checking size of int *... " >&6; }
41215if ${ac_cv_sizeof_int_p+:} false; then :
41216  $as_echo_n "(cached) " >&6
41217else
41218  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41219
41220else
41221  if test "$ac_cv_type_int_p" = yes; then
41222     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41224as_fn_error 77 "cannot compute sizeof (int *)
41225See \`config.log' for more details" "$LINENO" 5; }
41226   else
41227     ac_cv_sizeof_int_p=0
41228   fi
41229fi
41230
41231fi
41232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41233$as_echo "$ac_cv_sizeof_int_p" >&6; }
41234
41235
41236
41237cat >>confdefs.h <<_ACEOF
41238#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41239_ACEOF
41240
41241
41242
41243      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41244
41245      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41246        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
41247      fi
41248    fi
41249  fi
41250
41251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41252$as_echo_n "checking for target address size... " >&6; }
41253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41254$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41255
41256
41257  ###############################################################################
41258  #
41259  # Is the target little of big endian?
41260  #
41261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41262$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41263if ${ac_cv_c_bigendian+:} false; then :
41264  $as_echo_n "(cached) " >&6
41265else
41266  ac_cv_c_bigendian=unknown
41267    # See if we're dealing with a universal compiler.
41268    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41269/* end confdefs.h.  */
41270#ifndef __APPLE_CC__
41271	       not a universal capable compiler
41272	     #endif
41273	     typedef int dummy;
41274
41275_ACEOF
41276if ac_fn_cxx_try_compile "$LINENO"; then :
41277
41278	# Check for potential -arch flags.  It is not universal unless
41279	# there are at least two -arch flags with different values.
41280	ac_arch=
41281	ac_prev=
41282	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41283	 if test -n "$ac_prev"; then
41284	   case $ac_word in
41285	     i?86 | x86_64 | ppc | ppc64)
41286	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41287		 ac_arch=$ac_word
41288	       else
41289		 ac_cv_c_bigendian=universal
41290		 break
41291	       fi
41292	       ;;
41293	   esac
41294	   ac_prev=
41295	 elif test "x$ac_word" = "x-arch"; then
41296	   ac_prev=arch
41297	 fi
41298       done
41299fi
41300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41301    if test $ac_cv_c_bigendian = unknown; then
41302      # See if sys/param.h defines the BYTE_ORDER macro.
41303      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41304/* end confdefs.h.  */
41305#include <sys/types.h>
41306	     #include <sys/param.h>
41307
41308int
41309main ()
41310{
41311#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41312		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41313		     && LITTLE_ENDIAN)
41314	      bogus endian macros
41315	     #endif
41316
41317  ;
41318  return 0;
41319}
41320_ACEOF
41321if ac_fn_cxx_try_compile "$LINENO"; then :
41322  # It does; now see whether it defined to BIG_ENDIAN or not.
41323	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41324/* end confdefs.h.  */
41325#include <sys/types.h>
41326		#include <sys/param.h>
41327
41328int
41329main ()
41330{
41331#if BYTE_ORDER != BIG_ENDIAN
41332		 not big endian
41333		#endif
41334
41335  ;
41336  return 0;
41337}
41338_ACEOF
41339if ac_fn_cxx_try_compile "$LINENO"; then :
41340  ac_cv_c_bigendian=yes
41341else
41342  ac_cv_c_bigendian=no
41343fi
41344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41345fi
41346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41347    fi
41348    if test $ac_cv_c_bigendian = unknown; then
41349      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41350      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41351/* end confdefs.h.  */
41352#include <limits.h>
41353
41354int
41355main ()
41356{
41357#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41358	      bogus endian macros
41359	     #endif
41360
41361  ;
41362  return 0;
41363}
41364_ACEOF
41365if ac_fn_cxx_try_compile "$LINENO"; then :
41366  # It does; now see whether it defined to _BIG_ENDIAN or not.
41367	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41368/* end confdefs.h.  */
41369#include <limits.h>
41370
41371int
41372main ()
41373{
41374#ifndef _BIG_ENDIAN
41375		 not big endian
41376		#endif
41377
41378  ;
41379  return 0;
41380}
41381_ACEOF
41382if ac_fn_cxx_try_compile "$LINENO"; then :
41383  ac_cv_c_bigendian=yes
41384else
41385  ac_cv_c_bigendian=no
41386fi
41387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41388fi
41389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41390    fi
41391    if test $ac_cv_c_bigendian = unknown; then
41392      # Compile a test program.
41393      if test "$cross_compiling" = yes; then :
41394  # Try to guess by grepping values from an object file.
41395	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41396/* end confdefs.h.  */
41397short int ascii_mm[] =
41398		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41399		short int ascii_ii[] =
41400		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41401		int use_ascii (int i) {
41402		  return ascii_mm[i] + ascii_ii[i];
41403		}
41404		short int ebcdic_ii[] =
41405		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41406		short int ebcdic_mm[] =
41407		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41408		int use_ebcdic (int i) {
41409		  return ebcdic_mm[i] + ebcdic_ii[i];
41410		}
41411		extern int foo;
41412
41413int
41414main ()
41415{
41416return use_ascii (foo) == use_ebcdic (foo);
41417  ;
41418  return 0;
41419}
41420_ACEOF
41421if ac_fn_cxx_try_compile "$LINENO"; then :
41422  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41423	      ac_cv_c_bigendian=yes
41424	    fi
41425	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41426	      if test "$ac_cv_c_bigendian" = unknown; then
41427		ac_cv_c_bigendian=no
41428	      else
41429		# finding both strings is unlikely to happen, but who knows?
41430		ac_cv_c_bigendian=unknown
41431	      fi
41432	    fi
41433fi
41434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41435else
41436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41437/* end confdefs.h.  */
41438$ac_includes_default
41439int
41440main ()
41441{
41442
41443	     /* Are we little or big endian?  From Harbison&Steele.  */
41444	     union
41445	     {
41446	       long int l;
41447	       char c[sizeof (long int)];
41448	     } u;
41449	     u.l = 1;
41450	     return u.c[sizeof (long int) - 1] == 1;
41451
41452  ;
41453  return 0;
41454}
41455_ACEOF
41456if ac_fn_cxx_try_run "$LINENO"; then :
41457  ac_cv_c_bigendian=no
41458else
41459  ac_cv_c_bigendian=yes
41460fi
41461rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41462  conftest.$ac_objext conftest.beam conftest.$ac_ext
41463fi
41464
41465    fi
41466fi
41467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41468$as_echo "$ac_cv_c_bigendian" >&6; }
41469 case $ac_cv_c_bigendian in #(
41470   yes)
41471     ENDIAN="big";; #(
41472   no)
41473     ENDIAN="little" ;; #(
41474   universal)
41475     ENDIAN="universal_endianness"
41476     ;; #(
41477   *)
41478     ENDIAN="unknown" ;;
41479 esac
41480
41481
41482  if test "x$ENDIAN" = xuniversal_endianness; then
41483    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41484  fi
41485  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41486    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
41487  fi
41488
41489
41490# Configure flags for the tools
41491
41492
41493  ###############################################################################
41494  #
41495  # How to compile shared libraries.
41496  #
41497
41498  if test "x$GCC" = xyes; then
41499    COMPILER_NAME=gcc
41500    PICFLAG="-fPIC"
41501    LIBRARY_PREFIX=lib
41502    SHARED_LIBRARY='lib$1.so'
41503    STATIC_LIBRARY='lib$1.a'
41504    SHARED_LIBRARY_FLAGS="-shared"
41505    SHARED_LIBRARY_SUFFIX='.so'
41506    STATIC_LIBRARY_SUFFIX='.a'
41507    OBJ_SUFFIX='.o'
41508    EXE_SUFFIX=''
41509    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41510    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41511    C_FLAG_REORDER=''
41512    CXX_FLAG_REORDER=''
41513    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41514    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41515    LD="$CC"
41516    LDEXE="$CC"
41517    LDCXX="$CXX"
41518    LDEXECXX="$CXX"
41519    POST_STRIP_CMD="$STRIP -g"
41520
41521    # Linking is different on MacOSX
41522    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41523      # Might change in the future to clang.
41524      COMPILER_NAME=gcc
41525      SHARED_LIBRARY='lib$1.dylib'
41526      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41527      SHARED_LIBRARY_SUFFIX='.dylib'
41528      EXE_SUFFIX=''
41529      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41530      SET_SHARED_LIBRARY_MAPFILE=''
41531      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41532      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41533      POST_STRIP_CMD="$STRIP -S"
41534    fi
41535  else
41536    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41537      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
41538      COMPILER_NAME=ossc
41539      PICFLAG="-KPIC"
41540      LIBRARY_PREFIX=lib
41541      SHARED_LIBRARY='lib$1.so'
41542      STATIC_LIBRARY='lib$1.a'
41543      SHARED_LIBRARY_FLAGS="-G"
41544      SHARED_LIBRARY_SUFFIX='.so'
41545      STATIC_LIBRARY_SUFFIX='.a'
41546      OBJ_SUFFIX='.o'
41547      EXE_SUFFIX=''
41548      SET_SHARED_LIBRARY_NAME=''
41549      SET_SHARED_LIBRARY_MAPFILE='-M$1'
41550      C_FLAG_REORDER='-xF'
41551      CXX_FLAG_REORDER='-xF'
41552      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
41553      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41554      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41555      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41556      CFLAGS_JDKLIB_EXTRA='-xstrconst'
41557      POST_STRIP_CMD="$STRIP -x"
41558      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41559    fi
41560    if test "x$OPENJDK_TARGET_OS" = xaix; then
41561        COMPILER_NAME=xlc
41562        PICFLAG="-qpic=large"
41563        LIBRARY_PREFIX=lib
41564        SHARED_LIBRARY='lib$1.so'
41565        STATIC_LIBRARY='lib$1.a'
41566        SHARED_LIBRARY_FLAGS="-qmkshrobj"
41567        SHARED_LIBRARY_SUFFIX='.so'
41568        STATIC_LIBRARY_SUFFIX='.a'
41569        OBJ_SUFFIX='.o'
41570        EXE_SUFFIX=''
41571        SET_SHARED_LIBRARY_NAME=''
41572        SET_SHARED_LIBRARY_MAPFILE=''
41573        C_FLAG_REORDER=''
41574        CXX_FLAG_REORDER=''
41575        SET_SHARED_LIBRARY_ORIGIN=''
41576        SET_EXECUTABLE_ORIGIN=""
41577        CFLAGS_JDK=""
41578        CXXFLAGS_JDK=""
41579        CFLAGS_JDKLIB_EXTRA=''
41580        POST_STRIP_CMD="$STRIP -X32_64"
41581        POST_MCS_CMD=""
41582    fi
41583    if test "x$OPENJDK_TARGET_OS" = xwindows; then
41584      # If it is not gcc, then assume it is the MS Visual Studio compiler
41585      COMPILER_NAME=cl
41586      PICFLAG=""
41587      LIBRARY_PREFIX=
41588      SHARED_LIBRARY='$1.dll'
41589      STATIC_LIBRARY='$1.lib'
41590      SHARED_LIBRARY_FLAGS="-LD"
41591      SHARED_LIBRARY_SUFFIX='.dll'
41592      STATIC_LIBRARY_SUFFIX='.lib'
41593      OBJ_SUFFIX='.obj'
41594      EXE_SUFFIX='.exe'
41595      SET_SHARED_LIBRARY_NAME=''
41596      SET_SHARED_LIBRARY_MAPFILE=''
41597      SET_SHARED_LIBRARY_ORIGIN=''
41598      SET_EXECUTABLE_ORIGIN=''
41599    fi
41600  fi
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620  # The (cross) compiler is now configured, we can now test capabilities
41621  # of the target platform.
41622
41623
41624
41625  ###############################################################################
41626  #
41627  # Setup the opt flags for different compilers
41628  # and different operating systems.
41629  #
41630
41631  #
41632  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
41633  #
41634  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
41635    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
41636    # While waiting for a better solution, the current workaround is to use -mstackrealign.
41637    CFLAGS="$CFLAGS -mstackrealign"
41638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
41639$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
41640    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41641/* end confdefs.h.  */
41642int main() { return 0; }
41643_ACEOF
41644if ac_fn_cxx_try_link "$LINENO"; then :
41645
41646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41647$as_echo "yes" >&6; }
41648
41649else
41650
41651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41652$as_echo "no" >&6; }
41653          as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
41654
41655
41656fi
41657rm -f core conftest.err conftest.$ac_objext \
41658    conftest$ac_exeext conftest.$ac_ext
41659  fi
41660
41661  C_FLAG_DEPS="-MMD -MF"
41662  CXX_FLAG_DEPS="-MMD -MF"
41663
41664  case $COMPILER_TYPE in
41665    CC )
41666      case $COMPILER_NAME in
41667        gcc )
41668          case $OPENJDK_TARGET_OS in
41669            macosx )
41670              # On MacOSX we optimize for size, something
41671              # we should do for all platforms?
41672              C_O_FLAG_HI="-Os"
41673              C_O_FLAG_NORM="-Os"
41674              C_O_FLAG_NONE=""
41675              ;;
41676            *)
41677              C_O_FLAG_HI="-O3"
41678              C_O_FLAG_NORM="-O2"
41679              C_O_FLAG_NONE="-O0"
41680              ;;
41681          esac
41682          CXX_O_FLAG_HI="$C_O_FLAG_HI"
41683          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41684          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41685          CFLAGS_DEBUG_SYMBOLS="-g"
41686          CXXFLAGS_DEBUG_SYMBOLS="-g"
41687          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41688            CFLAGS_DEBUG_SYMBOLS="-g1"
41689            CXXFLAGS_DEBUG_SYMBOLS="-g1"
41690          fi
41691          ;;
41692        ossc )
41693          #
41694          # Forte has different names for this with their C++ compiler...
41695          #
41696          C_FLAG_DEPS="-xMMD -xMF"
41697          CXX_FLAG_DEPS="-xMMD -xMF"
41698
41699          # Extra options used with HIGHEST
41700          #
41701          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
41702          #          done with care, there are some assumptions below that need to
41703          #          be understood about the use of pointers, and IEEE behavior.
41704          #
41705          # Use non-standard floating point mode (not IEEE 754)
41706          CC_HIGHEST="$CC_HIGHEST -fns"
41707          # Do some simplification of floating point arithmetic (not IEEE 754)
41708          CC_HIGHEST="$CC_HIGHEST -fsimple"
41709          # Use single precision floating point with 'float'
41710          CC_HIGHEST="$CC_HIGHEST -fsingle"
41711          # Assume memory references via basic pointer types do not alias
41712          #   (Source with excessing pointer casting and data access with mixed
41713          #    pointer types are not recommended)
41714          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
41715          # Use intrinsic or inline versions for math/std functions
41716          #   (If you expect perfect errno behavior, do not use this)
41717          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
41718          # Loop data dependency optimizations (need -xO3 or higher)
41719          CC_HIGHEST="$CC_HIGHEST -xdepend"
41720          # Pointer parameters to functions do not overlap
41721          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
41722          #    If you pass in multiple pointers to the same data, do not use this)
41723          CC_HIGHEST="$CC_HIGHEST -xrestrict"
41724          # Inline some library routines
41725          #   (If you expect perfect errno behavior, do not use this)
41726          CC_HIGHEST="$CC_HIGHEST -xlibmil"
41727          # Use optimized math routines
41728          #   (If you expect perfect errno behavior, do not use this)
41729          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
41730          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
41731
41732          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
41733            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
41734            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
41735          fi
41736
41737          case $OPENJDK_TARGET_CPU_ARCH in
41738            x86)
41739              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41740              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41741              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41742              C_O_FLAG_NONE="-xregs=no%frameptr"
41743              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41744              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41745              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41746              CXX_O_FLAG_NONE="-xregs=no%frameptr"
41747              if test "x$OPENJDK_TARGET_CPU" = xx86; then
41748                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41749                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41750              fi
41751              ;;
41752            sparc)
41753              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41754              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41755              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41756              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41757              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41758              C_O_FLAG_NONE=""
41759              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41760              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41761              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41762              CXX_O_FLAG_NONE=""
41763              ;;
41764          esac
41765
41766          CFLAGS_DEBUG_SYMBOLS="-g -xs"
41767          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41768          ;;
41769        xlc )
41770          C_FLAG_DEPS="-qmakedep=gcc -MF"
41771          CXX_FLAG_DEPS="-qmakedep=gcc -MF"
41772          C_O_FLAG_HIGHEST="-O3"
41773          C_O_FLAG_HI="-O3 -qstrict"
41774          C_O_FLAG_NORM="-O2"
41775          C_O_FLAG_NONE=""
41776          CXX_O_FLAG_HIGHEST="-O3"
41777          CXX_O_FLAG_HI="-O3 -qstrict"
41778          CXX_O_FLAG_NORM="-O2"
41779          CXX_O_FLAG_NONE=""
41780          CFLAGS_DEBUG_SYMBOLS="-g"
41781          CXXFLAGS_DEBUG_SYMBOLS="-g"
41782          LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41783          CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41784          CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41785          ;;
41786      esac
41787      ;;
41788    CL )
41789      C_O_FLAG_HIGHEST="-O2"
41790      C_O_FLAG_HI="-O1"
41791      C_O_FLAG_NORM="-O1"
41792      C_O_FLAG_NONE="-Od"
41793      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41794      CXX_O_FLAG_HI="$C_O_FLAG_HI"
41795      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41796      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41797      ;;
41798  esac
41799
41800  if test -z "$C_O_FLAG_HIGHEST"; then
41801    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
41802  fi
41803
41804  if test -z "$CXX_O_FLAG_HIGHEST"; then
41805    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
41806  fi
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41822    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41823$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41824  fi
41825
41826  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41827    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41828$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41829  fi
41830
41831  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41832    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41833$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41834  fi
41835
41836
41837# Check whether --with-extra-cflags was given.
41838if test "${with_extra_cflags+set}" = set; then :
41839  withval=$with_extra_cflags;
41840fi
41841
41842
41843
41844# Check whether --with-extra-cxxflags was given.
41845if test "${with_extra_cxxflags+set}" = set; then :
41846  withval=$with_extra_cxxflags;
41847fi
41848
41849
41850
41851# Check whether --with-extra-ldflags was given.
41852if test "${with_extra_ldflags+set}" = set; then :
41853  withval=$with_extra_ldflags;
41854fi
41855
41856
41857  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41858  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41859  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41860
41861  # Hotspot needs these set in their legacy form
41862  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41863  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41864  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41865
41866
41867
41868
41869
41870  ###############################################################################
41871  #
41872  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41873  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41874  #
41875  case $COMPILER_NAME in
41876    gcc )
41877      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
41878      -pipe \
41879      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41880      case $OPENJDK_TARGET_CPU_ARCH in
41881        arm )
41882          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41883          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41884          ;;
41885        ppc )
41886          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41887          ;;
41888        * )
41889          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41890          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41891          ;;
41892      esac
41893      ;;
41894    ossc )
41895      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41896      case $OPENJDK_TARGET_CPU_ARCH in
41897        x86 )
41898          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41899          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41900          ;;
41901      esac
41902
41903      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41904      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41905
41906      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41907      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41908      ;;
41909    xlc )
41910      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41911      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41912
41913      LDFLAGS_JDK="$LDFLAGS_JDK"
41914      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
41915      ;;
41916    cl )
41917      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41918      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41919      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41920      -DWIN32 -DIAL"
41921      case $OPENJDK_TARGET_CPU in
41922        x86 )
41923          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41924          ;;
41925        x86_64 )
41926          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41927          ;;
41928      esac
41929      ;;
41930  esac
41931
41932  ###############################################################################
41933
41934  # Adjust flags according to debug level.
41935  case $DEBUG_LEVEL in
41936    fastdebug )
41937      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41938      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41939      C_O_FLAG_HI="$C_O_FLAG_NORM"
41940      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41941      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41942      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41943      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41944      ;;
41945    slowdebug )
41946      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41947      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41948      C_O_FLAG_HI="$C_O_FLAG_NONE"
41949      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41950      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41951      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41952      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41953      ;;
41954  esac
41955
41956  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41957
41958  # The package path is used only on macosx?
41959  PACKAGE_PATH=/opt/local
41960
41961
41962  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41963    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41964    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41965    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41966    #   Note: -Dmacro         is the same as    #define macro 1
41967    #         -Dmacro=        is the same as    #define macro
41968    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41969      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41970    else
41971      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41972    fi
41973  else
41974    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41975  fi
41976  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41977    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
41978  fi
41979  if test "x$OPENJDK_TARGET_OS" = xwindows; then
41980    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
41981  fi
41982  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41983    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
41984  fi
41985  if test "x$OPENJDK_TARGET_OS" = xaix; then
41986    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
41987  fi
41988  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41989    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41990    # Setting these parameters makes it an error to link to macosx APIs that are
41991    # newer than the given OS version and makes the linked binaries compatible even
41992    # if built on a newer version of the OS.
41993    # The expected format is X.Y.Z
41994    MACOSX_VERSION_MIN=10.7.0
41995
41996    # The macro takes the version with no dots, ex: 1070
41997    # Let the flags variables get resolved in make for easier override on make
41998    # command line.
41999    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42000    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42001  fi
42002  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42003    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
42004  fi
42005  if test "x$DEBUG_LEVEL" = xrelease; then
42006    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42007  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42008    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42009  fi
42010  else
42011    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42012  fi
42013
42014  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42015  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42016
42017  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42018      -I${JDK_OUTPUTDIR}/include \
42019      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42020      -I${JDK_TOPDIR}/src/share/javavm/export \
42021      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42022      -I${JDK_TOPDIR}/src/share/native/common \
42023      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42024
42025  # The shared libraries are compiled using the picflag.
42026  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42027  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42028
42029  # Executable flags
42030  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
42031  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
42032
42033  # Now this is odd. The JDK native libraries have to link against libjvm.so
42034  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42035  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42036  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42037  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42038  # libraries will link to whatever is in memory. Yuck.
42039  #
42040  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42041  if test "x$COMPILER_NAME" = xcl; then
42042    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42043    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42044      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42045    fi
42046    # TODO: make -debug optional "--disable-full-debug-symbols"
42047    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42048    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42049    LDFLAGS_JDKLIB_SUFFIX=""
42050    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42051      LDFLAGS_STACK_SIZE=1048576
42052    else
42053      LDFLAGS_STACK_SIZE=327680
42054    fi
42055    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42056  else
42057    if test "x$COMPILER_NAME" = xgcc; then
42058      # If this is a --hash-style=gnu system, use --hash-style=both, why?
42059      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
42060      if test -n "$HAS_GNU_HASH"; then
42061        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42062      fi
42063      if test "x$OPENJDK_TARGET_OS" = xlinux; then
42064        # And since we now know that the linker is gnu, then add -z defs, to forbid
42065        # undefined symbols in object files.
42066        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42067        if test "x$DEBUG_LEVEL" = "xrelease"; then
42068          # When building release libraries, tell the linker optimize them.
42069          # Should this be supplied to the OSS linker as well?
42070          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42071        fi
42072      fi
42073    fi
42074    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42075        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42076
42077    # On some platforms (mac) the linker warns about non existing -L dirs.
42078    # Add server first if available. Linking aginst client does not always produce the same results.
42079    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42080    # Default to server for other variants.
42081    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42082      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42083    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42084      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42085    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42086      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42087    else
42088      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42089    fi
42090
42091    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42092    if test "x$COMPILER_NAME" = xossc; then
42093      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42094    fi
42095
42096    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42097    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42098      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42099    fi
42100  fi
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116  # Some Zero and Shark settings.
42117  # ZERO_ARCHFLAG tells the compiler which mode to build for
42118  case "${OPENJDK_TARGET_CPU}" in
42119    s390)
42120      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42121      ;;
42122    *)
42123      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42124  esac
42125
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42127$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42128  supports=yes
42129
42130  saved_cflags="$CFLAGS"
42131  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42132  ac_ext=c
42133ac_cpp='$CPP $CPPFLAGS'
42134ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42135ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42136ac_compiler_gnu=$ac_cv_c_compiler_gnu
42137
42138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42139/* end confdefs.h.  */
42140int i;
42141_ACEOF
42142if ac_fn_c_try_compile "$LINENO"; then :
42143
42144else
42145  supports=no
42146fi
42147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42148  ac_ext=cpp
42149ac_cpp='$CXXCPP $CPPFLAGS'
42150ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42151ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42152ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42153
42154  CFLAGS="$saved_cflags"
42155
42156  saved_cxxflags="$CXXFLAGS"
42157  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42158  ac_ext=cpp
42159ac_cpp='$CXXCPP $CPPFLAGS'
42160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42163
42164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42165/* end confdefs.h.  */
42166int i;
42167_ACEOF
42168if ac_fn_cxx_try_compile "$LINENO"; then :
42169
42170else
42171  supports=no
42172fi
42173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42174  ac_ext=cpp
42175ac_cpp='$CXXCPP $CPPFLAGS'
42176ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42177ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42178ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42179
42180  CXXFLAGS="$saved_cxxflags"
42181
42182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42183$as_echo "$supports" >&6; }
42184  if test "x$supports" = "xyes" ; then
42185    :
42186  else
42187    ZERO_ARCHFLAG=""
42188  fi
42189
42190
42191
42192  # Check that the compiler supports -mX (or -qX on AIX) flags
42193  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42194
42195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42196$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42197  supports=yes
42198
42199  saved_cflags="$CFLAGS"
42200  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42201  ac_ext=c
42202ac_cpp='$CPP $CPPFLAGS'
42203ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42204ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42205ac_compiler_gnu=$ac_cv_c_compiler_gnu
42206
42207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42208/* end confdefs.h.  */
42209int i;
42210_ACEOF
42211if ac_fn_c_try_compile "$LINENO"; then :
42212
42213else
42214  supports=no
42215fi
42216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42217  ac_ext=cpp
42218ac_cpp='$CXXCPP $CPPFLAGS'
42219ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42220ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42221ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42222
42223  CFLAGS="$saved_cflags"
42224
42225  saved_cxxflags="$CXXFLAGS"
42226  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42227  ac_ext=cpp
42228ac_cpp='$CXXCPP $CPPFLAGS'
42229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42232
42233  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42234/* end confdefs.h.  */
42235int i;
42236_ACEOF
42237if ac_fn_cxx_try_compile "$LINENO"; then :
42238
42239else
42240  supports=no
42241fi
42242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42243  ac_ext=cpp
42244ac_cpp='$CXXCPP $CPPFLAGS'
42245ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42246ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42247ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42248
42249  CXXFLAGS="$saved_cxxflags"
42250
42251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42252$as_echo "$supports" >&6; }
42253  if test "x$supports" = "xyes" ; then
42254    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42255  else
42256    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42257  fi
42258
42259
42260
42261
42262  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
42263  USING_BROKEN_SUSE_LD=no
42264  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
42265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
42266$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
42267    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
42268    echo "int main() { }" > main.c
42269    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
42270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42271$as_echo "no" >&6; }
42272      USING_BROKEN_SUSE_LD=no
42273    else
42274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42275$as_echo "yes" >&6; }
42276      USING_BROKEN_SUSE_LD=yes
42277    fi
42278    rm -rf version-script.map main.c a.out
42279  fi
42280
42281
42282
42283# Setup debug symbols (need objcopy from the toolchain for that)
42284
42285  #
42286  # ENABLE_DEBUG_SYMBOLS
42287  # This must be done after the toolchain is setup, since we're looking at objcopy.
42288  #
42289  # Check whether --enable-debug-symbols was given.
42290if test "${enable_debug_symbols+set}" = set; then :
42291  enableval=$enable_debug_symbols;
42292fi
42293
42294
42295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42296$as_echo_n "checking if we should generate debug symbols... " >&6; }
42297
42298  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42299    # explicit enabling of enable-debug-symbols and can't find objcopy
42300    #   this is an error
42301    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42302  fi
42303
42304  if test "x$enable_debug_symbols" = "xyes"; then
42305    ENABLE_DEBUG_SYMBOLS=true
42306  elif test "x$enable_debug_symbols" = "xno"; then
42307    ENABLE_DEBUG_SYMBOLS=false
42308  else
42309    # Default is on if objcopy is found
42310    if test "x$OBJCOPY" != x; then
42311      ENABLE_DEBUG_SYMBOLS=true
42312    # MacOS X and Windows don't use objcopy but default is on for those OSes
42313    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42314      ENABLE_DEBUG_SYMBOLS=true
42315    else
42316      ENABLE_DEBUG_SYMBOLS=false
42317    fi
42318  fi
42319
42320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42321$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42322
42323  #
42324  # ZIP_DEBUGINFO_FILES
42325  #
42326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42327$as_echo_n "checking if we should zip debug-info files... " >&6; }
42328  # Check whether --enable-zip-debug-info was given.
42329if test "${enable_zip_debug_info+set}" = set; then :
42330  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42331else
42332  enable_zip_debug_info="yes"
42333fi
42334
42335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42336$as_echo "${enable_zip_debug_info}" >&6; }
42337
42338  if test "x${enable_zip_debug_info}" = "xno"; then
42339    ZIP_DEBUGINFO_FILES=false
42340  else
42341    ZIP_DEBUGINFO_FILES=true
42342  fi
42343
42344
42345
42346
42347
42348
42349
42350###############################################################################
42351#
42352# Check dependencies for external and internal libraries.
42353#
42354###############################################################################
42355
42356# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42357
42358  # When using cygwin or msys, we need a wrapper binary that renames
42359  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42360  # @files and rewrites these too! This wrapper binary is
42361  # called fixpath.
42362  FIXPATH=
42363  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42365$as_echo_n "checking if fixpath can be created... " >&6; }
42366    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42367    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42368    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42369      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42370      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42371      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42372      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42373    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42374      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42375      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42376
42377      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42378      # @ was chosen as separator to minimize risk of other tools messing around with it
42379      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42380      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42381
42382      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42383    fi
42384    rm -f $OUTPUT_ROOT/fixpath*
42385    cd $OUTPUT_ROOT
42386    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42387    cd $CURDIR
42388
42389    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42391$as_echo "no" >&6; }
42392      cat $OUTPUT_ROOT/fixpath1.log
42393      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42394    fi
42395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42396$as_echo "yes" >&6; }
42397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42398$as_echo_n "checking if fixpath.exe works... " >&6; }
42399    cd $OUTPUT_ROOT
42400    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42401    cd $CURDIR
42402    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42404$as_echo "no" >&6; }
42405      cat $OUTPUT_ROOT/fixpath2.log
42406      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42407    fi
42408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42409$as_echo "yes" >&6; }
42410    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42411  fi
42412
42413
42414
42415
42416
42417
42418  ###############################################################################
42419  #
42420  # OS specific settings that we never will need to probe.
42421  #
42422  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42424$as_echo_n "checking what is not needed on Linux?... " >&6; }
42425    PULSE_NOT_NEEDED=yes
42426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42427$as_echo "pulse" >&6; }
42428  fi
42429
42430  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42432$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42433    ALSA_NOT_NEEDED=yes
42434    PULSE_NOT_NEEDED=yes
42435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42436$as_echo "alsa pulse" >&6; }
42437  fi
42438
42439  if test "x$OPENJDK_TARGET_OS" = xaix; then
42440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42441$as_echo_n "checking what is not needed on AIX?... " >&6; }
42442    ALSA_NOT_NEEDED=yes
42443    PULSE_NOT_NEEDED=yes
42444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42445$as_echo "alsa pulse" >&6; }
42446  fi
42447
42448
42449  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42451$as_echo_n "checking what is not needed on Windows?... " >&6; }
42452    CUPS_NOT_NEEDED=yes
42453    ALSA_NOT_NEEDED=yes
42454    PULSE_NOT_NEEDED=yes
42455    X11_NOT_NEEDED=yes
42456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42457$as_echo "alsa cups pulse x11" >&6; }
42458  fi
42459
42460  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42462$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42463    ALSA_NOT_NEEDED=yes
42464    PULSE_NOT_NEEDED=yes
42465    X11_NOT_NEEDED=yes
42466    # If the java runtime framework is disabled, then we need X11.
42467    # This will be adjusted below.
42468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42469$as_echo "alsa pulse x11" >&6; }
42470  fi
42471
42472  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42474$as_echo_n "checking what is not needed on bsd?... " >&6; }
42475    ALSA_NOT_NEEDED=yes
42476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42477$as_echo "alsa" >&6; }
42478  fi
42479
42480  if test "x$OPENJDK" = "xfalse"; then
42481    FREETYPE_NOT_NEEDED=yes
42482  fi
42483
42484  if test "x$SUPPORT_HEADFUL" = xno; then
42485    X11_NOT_NEEDED=yes
42486  fi
42487
42488  ###############################################################################
42489  #
42490  # Check for MacOSX support for OpenJDK.
42491  #
42492
42493
42494  # Check whether --enable-macosx-runtime-support was given.
42495if test "${enable_macosx_runtime_support+set}" = set; then :
42496  enableval=$enable_macosx_runtime_support;
42497fi
42498
42499  if test "x$enable_macosx_runtime_support" != x; then
42500    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42501$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42502  fi
42503
42504
42505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42506$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42507  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42509$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42510  else
42511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42512$as_echo "no" >&6; }
42513  fi
42514
42515
42516
42517  ###############################################################################
42518  #
42519  # Check for X Windows
42520  #
42521
42522  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42523  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42524  # --x-libraries for the sysroot, if that seems to be correct.
42525  if test "x$SYS_ROOT" != "x/"; then
42526    if test "x$x_includes" = xNONE; then
42527      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42528        x_includes="$SYS_ROOT/usr/X11R6/include"
42529      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42530        x_includes="$SYS_ROOT/usr/include"
42531      fi
42532    fi
42533    if test "x$x_libraries" = xNONE; then
42534      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42535        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42536      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42537        x_libraries="$SYS_ROOT/usr/lib64"
42538      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42539        x_libraries="$SYS_ROOT/usr/lib"
42540      fi
42541    fi
42542  fi
42543
42544  # Now let autoconf do it's magic
42545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42546$as_echo_n "checking for X... " >&6; }
42547
42548
42549# Check whether --with-x was given.
42550if test "${with_x+set}" = set; then :
42551  withval=$with_x;
42552fi
42553
42554# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42555if test "x$with_x" = xno; then
42556  # The user explicitly disabled X.
42557  have_x=disabled
42558else
42559  case $x_includes,$x_libraries in #(
42560    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42561    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42562  $as_echo_n "(cached) " >&6
42563else
42564  # One or both of the vars are not set, and there is no cached value.
42565ac_x_includes=no ac_x_libraries=no
42566rm -f -r conftest.dir
42567if mkdir conftest.dir; then
42568  cd conftest.dir
42569  cat >Imakefile <<'_ACEOF'
42570incroot:
42571	@echo incroot='${INCROOT}'
42572usrlibdir:
42573	@echo usrlibdir='${USRLIBDIR}'
42574libdir:
42575	@echo libdir='${LIBDIR}'
42576_ACEOF
42577  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42578    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42579    for ac_var in incroot usrlibdir libdir; do
42580      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42581    done
42582    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42583    for ac_extension in a so sl dylib la dll; do
42584      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42585	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42586	ac_im_usrlibdir=$ac_im_libdir; break
42587      fi
42588    done
42589    # Screen out bogus values from the imake configuration.  They are
42590    # bogus both because they are the default anyway, and because
42591    # using them would break gcc on systems where it needs fixed includes.
42592    case $ac_im_incroot in
42593	/usr/include) ac_x_includes= ;;
42594	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42595    esac
42596    case $ac_im_usrlibdir in
42597	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42598	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42599    esac
42600  fi
42601  cd ..
42602  rm -f -r conftest.dir
42603fi
42604
42605# Standard set of common directories for X headers.
42606# Check X11 before X11Rn because it is often a symlink to the current release.
42607ac_x_header_dirs='
42608/usr/X11/include
42609/usr/X11R7/include
42610/usr/X11R6/include
42611/usr/X11R5/include
42612/usr/X11R4/include
42613
42614/usr/include/X11
42615/usr/include/X11R7
42616/usr/include/X11R6
42617/usr/include/X11R5
42618/usr/include/X11R4
42619
42620/usr/local/X11/include
42621/usr/local/X11R7/include
42622/usr/local/X11R6/include
42623/usr/local/X11R5/include
42624/usr/local/X11R4/include
42625
42626/usr/local/include/X11
42627/usr/local/include/X11R7
42628/usr/local/include/X11R6
42629/usr/local/include/X11R5
42630/usr/local/include/X11R4
42631
42632/usr/X386/include
42633/usr/x386/include
42634/usr/XFree86/include/X11
42635
42636/usr/include
42637/usr/local/include
42638/usr/unsupported/include
42639/usr/athena/include
42640/usr/local/x11r5/include
42641/usr/lpp/Xamples/include
42642
42643/usr/openwin/include
42644/usr/openwin/share/include'
42645
42646if test "$ac_x_includes" = no; then
42647  # Guess where to find include files, by looking for Xlib.h.
42648  # First, try using that file with no special directory specified.
42649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42650/* end confdefs.h.  */
42651#include <X11/Xlib.h>
42652_ACEOF
42653if ac_fn_cxx_try_cpp "$LINENO"; then :
42654  # We can compile using X headers with no special include directory.
42655ac_x_includes=
42656else
42657  for ac_dir in $ac_x_header_dirs; do
42658  if test -r "$ac_dir/X11/Xlib.h"; then
42659    ac_x_includes=$ac_dir
42660    break
42661  fi
42662done
42663fi
42664rm -f conftest.err conftest.i conftest.$ac_ext
42665fi # $ac_x_includes = no
42666
42667if test "$ac_x_libraries" = no; then
42668  # Check for the libraries.
42669  # See if we find them without any special options.
42670  # Don't add to $LIBS permanently.
42671  ac_save_LIBS=$LIBS
42672  LIBS="-lX11 $LIBS"
42673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42674/* end confdefs.h.  */
42675#include <X11/Xlib.h>
42676int
42677main ()
42678{
42679XrmInitialize ()
42680  ;
42681  return 0;
42682}
42683_ACEOF
42684if ac_fn_cxx_try_link "$LINENO"; then :
42685  LIBS=$ac_save_LIBS
42686# We can link X programs with no special library path.
42687ac_x_libraries=
42688else
42689  LIBS=$ac_save_LIBS
42690for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42691do
42692  # Don't even attempt the hair of trying to link an X program!
42693  for ac_extension in a so sl dylib la dll; do
42694    if test -r "$ac_dir/libX11.$ac_extension"; then
42695      ac_x_libraries=$ac_dir
42696      break 2
42697    fi
42698  done
42699done
42700fi
42701rm -f core conftest.err conftest.$ac_objext \
42702    conftest$ac_exeext conftest.$ac_ext
42703fi # $ac_x_libraries = no
42704
42705case $ac_x_includes,$ac_x_libraries in #(
42706  no,* | *,no | *\'*)
42707    # Didn't find X, or a directory has "'" in its name.
42708    ac_cv_have_x="have_x=no";; #(
42709  *)
42710    # Record where we found X for the cache.
42711    ac_cv_have_x="have_x=yes\
42712	ac_x_includes='$ac_x_includes'\
42713	ac_x_libraries='$ac_x_libraries'"
42714esac
42715fi
42716;; #(
42717    *) have_x=yes;;
42718  esac
42719  eval "$ac_cv_have_x"
42720fi # $with_x != no
42721
42722if test "$have_x" != yes; then
42723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42724$as_echo "$have_x" >&6; }
42725  no_x=yes
42726else
42727  # If each of the values was on the command line, it overrides each guess.
42728  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42729  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42730  # Update the cache value to reflect the command line values.
42731  ac_cv_have_x="have_x=yes\
42732	ac_x_includes='$x_includes'\
42733	ac_x_libraries='$x_libraries'"
42734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42735$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42736fi
42737
42738  if test "$no_x" = yes; then
42739  # Not all programs may use this symbol, but it does not hurt to define it.
42740
42741$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42742
42743  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42744else
42745  if test -n "$x_includes"; then
42746    X_CFLAGS="$X_CFLAGS -I$x_includes"
42747  fi
42748
42749  # It would also be nice to do this for all -L options, not just this one.
42750  if test -n "$x_libraries"; then
42751    X_LIBS="$X_LIBS -L$x_libraries"
42752    # For Solaris; some versions of Sun CC require a space after -R and
42753    # others require no space.  Words are not sufficient . . . .
42754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42755$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42756    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42757    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42758    ac_cxx_werror_flag=yes
42759    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42760/* end confdefs.h.  */
42761
42762int
42763main ()
42764{
42765
42766  ;
42767  return 0;
42768}
42769_ACEOF
42770if ac_fn_cxx_try_link "$LINENO"; then :
42771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42772$as_echo "no" >&6; }
42773       X_LIBS="$X_LIBS -R$x_libraries"
42774else
42775  LIBS="$ac_xsave_LIBS -R $x_libraries"
42776       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42777/* end confdefs.h.  */
42778
42779int
42780main ()
42781{
42782
42783  ;
42784  return 0;
42785}
42786_ACEOF
42787if ac_fn_cxx_try_link "$LINENO"; then :
42788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42789$as_echo "yes" >&6; }
42790	  X_LIBS="$X_LIBS -R $x_libraries"
42791else
42792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42793$as_echo "neither works" >&6; }
42794fi
42795rm -f core conftest.err conftest.$ac_objext \
42796    conftest$ac_exeext conftest.$ac_ext
42797fi
42798rm -f core conftest.err conftest.$ac_objext \
42799    conftest$ac_exeext conftest.$ac_ext
42800    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42801    LIBS=$ac_xsave_LIBS
42802  fi
42803
42804  # Check for system-dependent libraries X programs must link with.
42805  # Do this before checking for the system-independent R6 libraries
42806  # (-lICE), since we may need -lsocket or whatever for X linking.
42807
42808  if test "$ISC" = yes; then
42809    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42810  else
42811    # Martyn Johnson says this is needed for Ultrix, if the X
42812    # libraries were built with DECnet support.  And Karl Berry says
42813    # the Alpha needs dnet_stub (dnet does not exist).
42814    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42815    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42816/* end confdefs.h.  */
42817
42818/* Override any GCC internal prototype to avoid an error.
42819   Use char because int might match the return type of a GCC
42820   builtin and then its argument prototype would still apply.  */
42821#ifdef __cplusplus
42822extern "C"
42823#endif
42824char XOpenDisplay ();
42825int
42826main ()
42827{
42828return XOpenDisplay ();
42829  ;
42830  return 0;
42831}
42832_ACEOF
42833if ac_fn_cxx_try_link "$LINENO"; then :
42834
42835else
42836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42837$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42838if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42839  $as_echo_n "(cached) " >&6
42840else
42841  ac_check_lib_save_LIBS=$LIBS
42842LIBS="-ldnet  $LIBS"
42843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42844/* end confdefs.h.  */
42845
42846/* Override any GCC internal prototype to avoid an error.
42847   Use char because int might match the return type of a GCC
42848   builtin and then its argument prototype would still apply.  */
42849#ifdef __cplusplus
42850extern "C"
42851#endif
42852char dnet_ntoa ();
42853int
42854main ()
42855{
42856return dnet_ntoa ();
42857  ;
42858  return 0;
42859}
42860_ACEOF
42861if ac_fn_cxx_try_link "$LINENO"; then :
42862  ac_cv_lib_dnet_dnet_ntoa=yes
42863else
42864  ac_cv_lib_dnet_dnet_ntoa=no
42865fi
42866rm -f core conftest.err conftest.$ac_objext \
42867    conftest$ac_exeext conftest.$ac_ext
42868LIBS=$ac_check_lib_save_LIBS
42869fi
42870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42871$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42872if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42873  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42874fi
42875
42876    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42877      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42878$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42879if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42880  $as_echo_n "(cached) " >&6
42881else
42882  ac_check_lib_save_LIBS=$LIBS
42883LIBS="-ldnet_stub  $LIBS"
42884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42885/* end confdefs.h.  */
42886
42887/* Override any GCC internal prototype to avoid an error.
42888   Use char because int might match the return type of a GCC
42889   builtin and then its argument prototype would still apply.  */
42890#ifdef __cplusplus
42891extern "C"
42892#endif
42893char dnet_ntoa ();
42894int
42895main ()
42896{
42897return dnet_ntoa ();
42898  ;
42899  return 0;
42900}
42901_ACEOF
42902if ac_fn_cxx_try_link "$LINENO"; then :
42903  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42904else
42905  ac_cv_lib_dnet_stub_dnet_ntoa=no
42906fi
42907rm -f core conftest.err conftest.$ac_objext \
42908    conftest$ac_exeext conftest.$ac_ext
42909LIBS=$ac_check_lib_save_LIBS
42910fi
42911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42912$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42913if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42914  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42915fi
42916
42917    fi
42918fi
42919rm -f core conftest.err conftest.$ac_objext \
42920    conftest$ac_exeext conftest.$ac_ext
42921    LIBS="$ac_xsave_LIBS"
42922
42923    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42924    # to get the SysV transport functions.
42925    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42926    # needs -lnsl.
42927    # The nsl library prevents programs from opening the X display
42928    # on Irix 5.2, according to T.E. Dickey.
42929    # The functions gethostbyname, getservbyname, and inet_addr are
42930    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42931    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42932if test "x$ac_cv_func_gethostbyname" = xyes; then :
42933
42934fi
42935
42936    if test $ac_cv_func_gethostbyname = no; then
42937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42938$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42939if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42940  $as_echo_n "(cached) " >&6
42941else
42942  ac_check_lib_save_LIBS=$LIBS
42943LIBS="-lnsl  $LIBS"
42944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42945/* end confdefs.h.  */
42946
42947/* Override any GCC internal prototype to avoid an error.
42948   Use char because int might match the return type of a GCC
42949   builtin and then its argument prototype would still apply.  */
42950#ifdef __cplusplus
42951extern "C"
42952#endif
42953char gethostbyname ();
42954int
42955main ()
42956{
42957return gethostbyname ();
42958  ;
42959  return 0;
42960}
42961_ACEOF
42962if ac_fn_cxx_try_link "$LINENO"; then :
42963  ac_cv_lib_nsl_gethostbyname=yes
42964else
42965  ac_cv_lib_nsl_gethostbyname=no
42966fi
42967rm -f core conftest.err conftest.$ac_objext \
42968    conftest$ac_exeext conftest.$ac_ext
42969LIBS=$ac_check_lib_save_LIBS
42970fi
42971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42972$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42973if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42974  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42975fi
42976
42977      if test $ac_cv_lib_nsl_gethostbyname = no; then
42978	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42979$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42980if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42981  $as_echo_n "(cached) " >&6
42982else
42983  ac_check_lib_save_LIBS=$LIBS
42984LIBS="-lbsd  $LIBS"
42985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42986/* end confdefs.h.  */
42987
42988/* Override any GCC internal prototype to avoid an error.
42989   Use char because int might match the return type of a GCC
42990   builtin and then its argument prototype would still apply.  */
42991#ifdef __cplusplus
42992extern "C"
42993#endif
42994char gethostbyname ();
42995int
42996main ()
42997{
42998return gethostbyname ();
42999  ;
43000  return 0;
43001}
43002_ACEOF
43003if ac_fn_cxx_try_link "$LINENO"; then :
43004  ac_cv_lib_bsd_gethostbyname=yes
43005else
43006  ac_cv_lib_bsd_gethostbyname=no
43007fi
43008rm -f core conftest.err conftest.$ac_objext \
43009    conftest$ac_exeext conftest.$ac_ext
43010LIBS=$ac_check_lib_save_LIBS
43011fi
43012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43013$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43014if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43015  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43016fi
43017
43018      fi
43019    fi
43020
43021    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43022    # socket/setsockopt and other routines are undefined under SCO ODT
43023    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43024    # on later versions), says Simon Leinen: it contains gethostby*
43025    # variants that don't use the name server (or something).  -lsocket
43026    # must be given before -lnsl if both are needed.  We assume that
43027    # if connect needs -lnsl, so does gethostbyname.
43028    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43029if test "x$ac_cv_func_connect" = xyes; then :
43030
43031fi
43032
43033    if test $ac_cv_func_connect = no; then
43034      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43035$as_echo_n "checking for connect in -lsocket... " >&6; }
43036if ${ac_cv_lib_socket_connect+:} false; then :
43037  $as_echo_n "(cached) " >&6
43038else
43039  ac_check_lib_save_LIBS=$LIBS
43040LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43042/* end confdefs.h.  */
43043
43044/* Override any GCC internal prototype to avoid an error.
43045   Use char because int might match the return type of a GCC
43046   builtin and then its argument prototype would still apply.  */
43047#ifdef __cplusplus
43048extern "C"
43049#endif
43050char connect ();
43051int
43052main ()
43053{
43054return connect ();
43055  ;
43056  return 0;
43057}
43058_ACEOF
43059if ac_fn_cxx_try_link "$LINENO"; then :
43060  ac_cv_lib_socket_connect=yes
43061else
43062  ac_cv_lib_socket_connect=no
43063fi
43064rm -f core conftest.err conftest.$ac_objext \
43065    conftest$ac_exeext conftest.$ac_ext
43066LIBS=$ac_check_lib_save_LIBS
43067fi
43068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43069$as_echo "$ac_cv_lib_socket_connect" >&6; }
43070if test "x$ac_cv_lib_socket_connect" = xyes; then :
43071  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43072fi
43073
43074    fi
43075
43076    # Guillermo Gomez says -lposix is necessary on A/UX.
43077    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43078if test "x$ac_cv_func_remove" = xyes; then :
43079
43080fi
43081
43082    if test $ac_cv_func_remove = no; then
43083      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43084$as_echo_n "checking for remove in -lposix... " >&6; }
43085if ${ac_cv_lib_posix_remove+:} false; then :
43086  $as_echo_n "(cached) " >&6
43087else
43088  ac_check_lib_save_LIBS=$LIBS
43089LIBS="-lposix  $LIBS"
43090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43091/* end confdefs.h.  */
43092
43093/* Override any GCC internal prototype to avoid an error.
43094   Use char because int might match the return type of a GCC
43095   builtin and then its argument prototype would still apply.  */
43096#ifdef __cplusplus
43097extern "C"
43098#endif
43099char remove ();
43100int
43101main ()
43102{
43103return remove ();
43104  ;
43105  return 0;
43106}
43107_ACEOF
43108if ac_fn_cxx_try_link "$LINENO"; then :
43109  ac_cv_lib_posix_remove=yes
43110else
43111  ac_cv_lib_posix_remove=no
43112fi
43113rm -f core conftest.err conftest.$ac_objext \
43114    conftest$ac_exeext conftest.$ac_ext
43115LIBS=$ac_check_lib_save_LIBS
43116fi
43117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43118$as_echo "$ac_cv_lib_posix_remove" >&6; }
43119if test "x$ac_cv_lib_posix_remove" = xyes; then :
43120  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43121fi
43122
43123    fi
43124
43125    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43126    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43127if test "x$ac_cv_func_shmat" = xyes; then :
43128
43129fi
43130
43131    if test $ac_cv_func_shmat = no; then
43132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43133$as_echo_n "checking for shmat in -lipc... " >&6; }
43134if ${ac_cv_lib_ipc_shmat+:} false; then :
43135  $as_echo_n "(cached) " >&6
43136else
43137  ac_check_lib_save_LIBS=$LIBS
43138LIBS="-lipc  $LIBS"
43139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43140/* end confdefs.h.  */
43141
43142/* Override any GCC internal prototype to avoid an error.
43143   Use char because int might match the return type of a GCC
43144   builtin and then its argument prototype would still apply.  */
43145#ifdef __cplusplus
43146extern "C"
43147#endif
43148char shmat ();
43149int
43150main ()
43151{
43152return shmat ();
43153  ;
43154  return 0;
43155}
43156_ACEOF
43157if ac_fn_cxx_try_link "$LINENO"; then :
43158  ac_cv_lib_ipc_shmat=yes
43159else
43160  ac_cv_lib_ipc_shmat=no
43161fi
43162rm -f core conftest.err conftest.$ac_objext \
43163    conftest$ac_exeext conftest.$ac_ext
43164LIBS=$ac_check_lib_save_LIBS
43165fi
43166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43167$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43168if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43169  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43170fi
43171
43172    fi
43173  fi
43174
43175  # Check for libraries that X11R6 Xt/Xaw programs need.
43176  ac_save_LDFLAGS=$LDFLAGS
43177  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43178  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43179  # check for ICE first), but we must link in the order -lSM -lICE or
43180  # we get undefined symbols.  So assume we have SM if we have ICE.
43181  # These have to be linked with before -lX11, unlike the other
43182  # libraries we check for below, so use a different variable.
43183  # John Interrante, Karl Berry
43184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43185$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43186if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43187  $as_echo_n "(cached) " >&6
43188else
43189  ac_check_lib_save_LIBS=$LIBS
43190LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43192/* end confdefs.h.  */
43193
43194/* Override any GCC internal prototype to avoid an error.
43195   Use char because int might match the return type of a GCC
43196   builtin and then its argument prototype would still apply.  */
43197#ifdef __cplusplus
43198extern "C"
43199#endif
43200char IceConnectionNumber ();
43201int
43202main ()
43203{
43204return IceConnectionNumber ();
43205  ;
43206  return 0;
43207}
43208_ACEOF
43209if ac_fn_cxx_try_link "$LINENO"; then :
43210  ac_cv_lib_ICE_IceConnectionNumber=yes
43211else
43212  ac_cv_lib_ICE_IceConnectionNumber=no
43213fi
43214rm -f core conftest.err conftest.$ac_objext \
43215    conftest$ac_exeext conftest.$ac_ext
43216LIBS=$ac_check_lib_save_LIBS
43217fi
43218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43219$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43220if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43221  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43222fi
43223
43224  LDFLAGS=$ac_save_LDFLAGS
43225
43226fi
43227
43228
43229  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43230  # this doesn't make sense so we remove it.
43231  if test "x$COMPILE_TYPE" = xcross; then
43232    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43233  fi
43234
43235  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43236
43237  # Print a helpful message on how to acquire the necessary build dependency.
43238  # x11 is the help tag: freetype, cups, pulse, alsa etc
43239  MISSING_DEPENDENCY=x11
43240
43241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43242    cygwin_help $MISSING_DEPENDENCY
43243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43244    msys_help $MISSING_DEPENDENCY
43245  else
43246    PKGHANDLER_COMMAND=
43247
43248    case $PKGHANDLER in
43249      apt-get)
43250        apt_help     $MISSING_DEPENDENCY ;;
43251      yum)
43252        yum_help     $MISSING_DEPENDENCY ;;
43253      port)
43254        port_help    $MISSING_DEPENDENCY ;;
43255      pkgutil)
43256        pkgutil_help $MISSING_DEPENDENCY ;;
43257      pkgadd)
43258        pkgadd_help  $MISSING_DEPENDENCY ;;
43259    esac
43260
43261    if test "x$PKGHANDLER_COMMAND" != x; then
43262      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43263    fi
43264  fi
43265
43266    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43267  fi
43268
43269  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43270    OPENWIN_HOME="/usr/openwin"
43271  fi
43272
43273
43274
43275  #
43276  # Weird Sol10 something check...TODO change to try compile
43277  #
43278  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43279    if test "`uname -r`" = "5.10"; then
43280      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43281        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43282      fi
43283    fi
43284  fi
43285
43286  ac_ext=c
43287ac_cpp='$CPP $CPPFLAGS'
43288ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43289ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43290ac_compiler_gnu=$ac_cv_c_compiler_gnu
43291
43292  OLD_CFLAGS="$CFLAGS"
43293  CFLAGS="$CFLAGS $X_CFLAGS"
43294
43295  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43296  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43297do :
43298  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43299ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43300        # include <X11/Xlib.h>
43301        # include <X11/Xutil.h>
43302
43303
43304"
43305if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43306  cat >>confdefs.h <<_ACEOF
43307#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43308_ACEOF
43309 X11_A_OK=yes
43310else
43311  X11_A_OK=no; break
43312fi
43313
43314done
43315
43316
43317  CFLAGS="$OLD_CFLAGS"
43318  ac_ext=cpp
43319ac_cpp='$CXXCPP $CPPFLAGS'
43320ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43321ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43322ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43323
43324
43325  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43326
43327  # Print a helpful message on how to acquire the necessary build dependency.
43328  # x11 is the help tag: freetype, cups, pulse, alsa etc
43329  MISSING_DEPENDENCY=x11
43330
43331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43332    cygwin_help $MISSING_DEPENDENCY
43333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43334    msys_help $MISSING_DEPENDENCY
43335  else
43336    PKGHANDLER_COMMAND=
43337
43338    case $PKGHANDLER in
43339      apt-get)
43340        apt_help     $MISSING_DEPENDENCY ;;
43341      yum)
43342        yum_help     $MISSING_DEPENDENCY ;;
43343      port)
43344        port_help    $MISSING_DEPENDENCY ;;
43345      pkgutil)
43346        pkgutil_help $MISSING_DEPENDENCY ;;
43347      pkgadd)
43348        pkgadd_help  $MISSING_DEPENDENCY ;;
43349    esac
43350
43351    if test "x$PKGHANDLER_COMMAND" != x; then
43352      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43353    fi
43354  fi
43355
43356    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43357  fi
43358
43359
43360
43361
43362
43363
43364  ###############################################################################
43365  #
43366  # The common unix printing system cups is used to print from java.
43367  #
43368
43369# Check whether --with-cups was given.
43370if test "${with_cups+set}" = set; then :
43371  withval=$with_cups;
43372fi
43373
43374
43375# Check whether --with-cups-include was given.
43376if test "${with_cups_include+set}" = set; then :
43377  withval=$with_cups_include;
43378fi
43379
43380
43381  if test "x$CUPS_NOT_NEEDED" = xyes; then
43382    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43383      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43384$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43385    fi
43386    CUPS_CFLAGS=
43387  else
43388    CUPS_FOUND=no
43389
43390    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43391      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43392    fi
43393
43394    if test "x${with_cups}" != x; then
43395      CUPS_CFLAGS="-I${with_cups}/include"
43396      CUPS_FOUND=yes
43397    fi
43398    if test "x${with_cups_include}" != x; then
43399      CUPS_CFLAGS="-I${with_cups_include}"
43400      CUPS_FOUND=yes
43401    fi
43402    if test "x$CUPS_FOUND" = xno; then
43403
43404
43405  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43406    # Source the builddeps file again, to make sure it uses the latest variables!
43407    . $builddepsfile
43408    # Look for a target and build machine specific resource!
43409    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43410    if test "x$resource" = x; then
43411      # Ok, lets instead look for a target specific resource
43412      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43413    fi
43414    if test "x$resource" = x; then
43415      # Ok, lets instead look for a build specific resource
43416      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43417    fi
43418    if test "x$resource" = x; then
43419      # Ok, lets instead look for a generic resource
43420      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43421      resource=${builddep_cups}
43422    fi
43423    if test "x$resource" != x; then
43424      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43425$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43426      # If the resource in the builddeps.conf file is an existing directory,
43427      # for example /java/linux/cups
43428      if test -d ${resource}; then
43429        depdir=${resource}
43430      else
43431
43432  # cups is for example mymodule
43433  # $resource is for example libs/general/libmymod_1_2_3.zip
43434  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43435  # $with_builddeps_dir is for example /localhome/builddeps
43436  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43437  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43438  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43439  filename=`basename $resource`
43440  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43441  filebase=${filename%%.*}
43442  extension=${filename#*.}
43443  installdir=$with_builddeps_dir/$filebase
43444  if test ! -f $installdir/$filename.unpacked; then
43445    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43446$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43447    if test ! -d $installdir; then
43448      mkdir -p $installdir
43449    fi
43450    if test ! -d $installdir; then
43451      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43452    fi
43453    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43454    touch $tmpfile
43455    if test ! -f $tmpfile; then
43456      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43457    fi
43458
43459  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43460  # $tmpfile is the local file name for the downloaded file.
43461  VALID_TOOL=no
43462  if test "x$BDEPS_FTP" = xwget; then
43463    VALID_TOOL=yes
43464    wget -O $tmpfile $with_builddeps_server/$resource
43465  fi
43466  if test "x$BDEPS_FTP" = xlftp; then
43467    VALID_TOOL=yes
43468    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43469  fi
43470  if test "x$BDEPS_FTP" = xftp; then
43471    VALID_TOOL=yes
43472    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43473    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43474    FTPUSERPWD=${FTPSERVER%%@*}
43475    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43476      FTPUSER=${userpwd%%:*}
43477      FTPPWD=${userpwd#*@}
43478      FTPSERVER=${FTPSERVER#*@}
43479    else
43480      FTPUSER=ftp
43481      FTPPWD=ftp
43482    fi
43483    # the "pass" command does not work on some
43484    # ftp clients (read ftp.exe) but if it works,
43485    # passive mode is better!
43486    ( \
43487        echo "user $FTPUSER $FTPPWD"        ; \
43488        echo "pass"                         ; \
43489        echo "bin"                          ; \
43490        echo "get $FTPPATH $tmpfile"              ; \
43491    ) | ftp -in $FTPSERVER
43492  fi
43493  if test "x$VALID_TOOL" != xyes; then
43494    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43495  fi
43496
43497    mv $tmpfile $installdir/$filename
43498    if test ! -s $installdir/$filename; then
43499      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43500    fi
43501    case "$extension" in
43502      zip)  echo "Unzipping $installdir/$filename..."
43503        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43504        ;;
43505      tar.gz) echo "Untaring $installdir/$filename..."
43506        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43507        ;;
43508      tgz) echo "Untaring $installdir/$filename..."
43509        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43510        ;;
43511      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43512        ;;
43513    esac
43514  fi
43515  if test -f $installdir/$filename.unpacked; then
43516    depdir=$installdir
43517  fi
43518
43519      fi
43520      # Source the builddeps file again, because in the previous command, the depdir
43521      # was updated to point at the current build dependency install directory.
43522      . $builddepsfile
43523      # Now extract variables from the builddeps.conf files.
43524      theroot=${builddep_cups_ROOT}
43525      thecflags=${builddep_cups_CFLAGS}
43526      thelibs=${builddep_cups_LIBS}
43527      if test "x$depdir" = x; then
43528        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43529      fi
43530      CUPS=$depdir
43531      if test "x$theroot" != x; then
43532        CUPS="$theroot"
43533      fi
43534      if test "x$thecflags" != x; then
43535        CUPS_CFLAGS="$thecflags"
43536      fi
43537      if test "x$thelibs" != x; then
43538        CUPS_LIBS="$thelibs"
43539      fi
43540      CUPS_FOUND=yes
43541
43542    fi
43543
43544  fi
43545
43546    fi
43547    if test "x$CUPS_FOUND" = xno; then
43548      # Are the cups headers installed in the default /usr/include location?
43549      for ac_header in cups/cups.h cups/ppd.h
43550do :
43551  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43552ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43554  cat >>confdefs.h <<_ACEOF
43555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43556_ACEOF
43557
43558            CUPS_FOUND=yes
43559            CUPS_CFLAGS=
43560            DEFAULT_CUPS=yes
43561
43562
43563fi
43564
43565done
43566
43567    fi
43568    if test "x$CUPS_FOUND" = xno; then
43569      # Getting nervous now? Lets poke around for standard Solaris third-party
43570      # package installation locations.
43571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43572$as_echo_n "checking for cups headers... " >&6; }
43573      if test -s /opt/sfw/cups/include/cups/cups.h; then
43574        # An SFW package seems to be installed!
43575        CUPS_FOUND=yes
43576        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43577      elif test -s /opt/csw/include/cups/cups.h; then
43578        # A CSW package seems to be installed!
43579        CUPS_FOUND=yes
43580        CUPS_CFLAGS="-I/opt/csw/include"
43581      fi
43582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43583$as_echo "$CUPS_FOUND" >&6; }
43584    fi
43585    if test "x$CUPS_FOUND" = xno; then
43586
43587  # Print a helpful message on how to acquire the necessary build dependency.
43588  # cups is the help tag: freetype, cups, pulse, alsa etc
43589  MISSING_DEPENDENCY=cups
43590
43591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43592    cygwin_help $MISSING_DEPENDENCY
43593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43594    msys_help $MISSING_DEPENDENCY
43595  else
43596    PKGHANDLER_COMMAND=
43597
43598    case $PKGHANDLER in
43599      apt-get)
43600        apt_help     $MISSING_DEPENDENCY ;;
43601      yum)
43602        yum_help     $MISSING_DEPENDENCY ;;
43603      port)
43604        port_help    $MISSING_DEPENDENCY ;;
43605      pkgutil)
43606        pkgutil_help $MISSING_DEPENDENCY ;;
43607      pkgadd)
43608        pkgadd_help  $MISSING_DEPENDENCY ;;
43609    esac
43610
43611    if test "x$PKGHANDLER_COMMAND" != x; then
43612      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43613    fi
43614  fi
43615
43616      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43617    fi
43618  fi
43619
43620
43621
43622
43623
43624
43625  ###############################################################################
43626  #
43627  # The ubiquitous freetype library is used to render fonts.
43628  #
43629
43630# Check whether --with-freetype was given.
43631if test "${with_freetype+set}" = set; then :
43632  withval=$with_freetype;
43633fi
43634
43635
43636# Check whether --with-freetype-include was given.
43637if test "${with_freetype_include+set}" = set; then :
43638  withval=$with_freetype_include;
43639fi
43640
43641
43642# Check whether --with-freetype-lib was given.
43643if test "${with_freetype_lib+set}" = set; then :
43644  withval=$with_freetype_lib;
43645fi
43646
43647  # Check whether --enable-freetype-bundling was given.
43648if test "${enable_freetype_bundling+set}" = set; then :
43649  enableval=$enable_freetype_bundling;
43650fi
43651
43652
43653  FREETYPE_CFLAGS=
43654  FREETYPE_LIBS=
43655  FREETYPE_BUNDLE_LIB_PATH=
43656
43657  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43658    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43659      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43660$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43661    fi
43662    if test "x$enable_freetype_bundling" != x; then
43663      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43664$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43665    fi
43666  else
43667    # freetype is needed to build; go get it!
43668
43669    BUNDLE_FREETYPE="$enable_freetype_bundling"
43670
43671    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43672      # User has specified settings
43673
43674      if test "x$BUNDLE_FREETYPE" = x; then
43675        # If not specified, default is to bundle freetype
43676        BUNDLE_FREETYPE=yes
43677      fi
43678
43679      if test "x$with_freetype" != x; then
43680        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43681        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43682      fi
43683
43684      # Allow --with-freetype-lib and --with-freetype-include to override
43685      if test "x$with_freetype_include" != x; then
43686        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43687      fi
43688      if test "x$with_freetype_lib" != x; then
43689        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43690      fi
43691
43692      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43693        # Okay, we got it. Check that it works.
43694
43695  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43696  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43697  METHOD="--with-freetype"
43698
43699  # First check if the files exists.
43700  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43701    # We found an arbitrary include file. That's a good sign.
43702    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43703$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43704    FOUND_FREETYPE=yes
43705
43706    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43707    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43708      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43709$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43710      FOUND_FREETYPE=no
43711    else
43712      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43713        # On Windows, we will need both .lib and .dll file.
43714        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43715          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43717          FOUND_FREETYPE=no
43718        fi
43719      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
43720        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43721        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43722      fi
43723    fi
43724  fi
43725
43726  if test "x$FOUND_FREETYPE" = xyes; then
43727
43728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43729
43730  # Input might be given as Windows format, start by converting to
43731  # unix format.
43732  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43733  new_path=`$CYGPATH -u "$path"`
43734
43735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43738  # "foo.exe" is OK but "foo" is an error.
43739  #
43740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43741  # It is also a way to make sure we got the proper file name for the real test later on.
43742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43743  if test "x$test_shortpath" = x; then
43744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43747  fi
43748
43749  # Call helper function which possibly converts this using DOS-style short mode.
43750  # If so, the updated path is stored in $new_path.
43751
43752  input_path="$new_path"
43753  # Check if we need to convert this using DOS-style short mode. If the path
43754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43755  # take no chances and rewrite it.
43756  # Note: m4 eats our [], so we need to use [ and ] instead.
43757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43758  if test "x$has_forbidden_chars" != x; then
43759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43763      # Going to short mode and back again did indeed matter. Since short mode is
43764      # case insensitive, let's make it lowercase to improve readability.
43765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43766      # Now convert it back to Unix-stile (cygpath)
43767      input_path=`$CYGPATH -u "$shortmode_path"`
43768      new_path="$input_path"
43769    fi
43770  fi
43771
43772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43773  if test "x$test_cygdrive_prefix" = x; then
43774    # As a simple fix, exclude /usr/bin since it's not a real path.
43775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43777      # a path prefixed by /cygdrive for fixpath to work.
43778      new_path="$CYGWIN_ROOT_PATH$input_path"
43779    fi
43780  fi
43781
43782
43783  if test "x$path" != "x$new_path"; then
43784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43787  fi
43788
43789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43790
43791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43792  has_colon=`$ECHO $path | $GREP ^.:`
43793  new_path="$path"
43794  if test "x$has_colon" = x; then
43795    # Not in mixed or Windows style, start by that.
43796    new_path=`cmd //c echo $path`
43797  fi
43798
43799
43800  input_path="$new_path"
43801  # Check if we need to convert this using DOS-style short mode. If the path
43802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43803  # take no chances and rewrite it.
43804  # Note: m4 eats our [], so we need to use [ and ] instead.
43805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43806  if test "x$has_forbidden_chars" != x; then
43807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43809  fi
43810
43811
43812  windows_path="$new_path"
43813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43814    unix_path=`$CYGPATH -u "$windows_path"`
43815    new_path="$unix_path"
43816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43818    new_path="$unix_path"
43819  fi
43820
43821  if test "x$path" != "x$new_path"; then
43822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43825  fi
43826
43827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43829
43830  else
43831    # We're on a posix platform. Hooray! :)
43832    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43833    has_space=`$ECHO "$path" | $GREP " "`
43834    if test "x$has_space" != x; then
43835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43837      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43838    fi
43839
43840    # Use eval to expand a potential ~
43841    eval path="$path"
43842    if test ! -f "$path" && test ! -d "$path"; then
43843      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43844    fi
43845
43846    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43847  fi
43848
43849
43850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43851
43852  # Input might be given as Windows format, start by converting to
43853  # unix format.
43854  path="$POTENTIAL_FREETYPE_LIB_PATH"
43855  new_path=`$CYGPATH -u "$path"`
43856
43857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43860  # "foo.exe" is OK but "foo" is an error.
43861  #
43862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43863  # It is also a way to make sure we got the proper file name for the real test later on.
43864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43865  if test "x$test_shortpath" = x; then
43866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43867$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43868    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43869  fi
43870
43871  # Call helper function which possibly converts this using DOS-style short mode.
43872  # If so, the updated path is stored in $new_path.
43873
43874  input_path="$new_path"
43875  # Check if we need to convert this using DOS-style short mode. If the path
43876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43877  # take no chances and rewrite it.
43878  # Note: m4 eats our [], so we need to use [ and ] instead.
43879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43880  if test "x$has_forbidden_chars" != x; then
43881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43885      # Going to short mode and back again did indeed matter. Since short mode is
43886      # case insensitive, let's make it lowercase to improve readability.
43887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43888      # Now convert it back to Unix-stile (cygpath)
43889      input_path=`$CYGPATH -u "$shortmode_path"`
43890      new_path="$input_path"
43891    fi
43892  fi
43893
43894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43895  if test "x$test_cygdrive_prefix" = x; then
43896    # As a simple fix, exclude /usr/bin since it's not a real path.
43897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43899      # a path prefixed by /cygdrive for fixpath to work.
43900      new_path="$CYGWIN_ROOT_PATH$input_path"
43901    fi
43902  fi
43903
43904
43905  if test "x$path" != "x$new_path"; then
43906    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43908$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43909  fi
43910
43911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43912
43913  path="$POTENTIAL_FREETYPE_LIB_PATH"
43914  has_colon=`$ECHO $path | $GREP ^.:`
43915  new_path="$path"
43916  if test "x$has_colon" = x; then
43917    # Not in mixed or Windows style, start by that.
43918    new_path=`cmd //c echo $path`
43919  fi
43920
43921
43922  input_path="$new_path"
43923  # Check if we need to convert this using DOS-style short mode. If the path
43924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43925  # take no chances and rewrite it.
43926  # Note: m4 eats our [], so we need to use [ and ] instead.
43927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43928  if test "x$has_forbidden_chars" != x; then
43929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43931  fi
43932
43933
43934  windows_path="$new_path"
43935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43936    unix_path=`$CYGPATH -u "$windows_path"`
43937    new_path="$unix_path"
43938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43940    new_path="$unix_path"
43941  fi
43942
43943  if test "x$path" != "x$new_path"; then
43944    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43947  fi
43948
43949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43951
43952  else
43953    # We're on a posix platform. Hooray! :)
43954    path="$POTENTIAL_FREETYPE_LIB_PATH"
43955    has_space=`$ECHO "$path" | $GREP " "`
43956    if test "x$has_space" != x; then
43957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43960    fi
43961
43962    # Use eval to expand a potential ~
43963    eval path="$path"
43964    if test ! -f "$path" && test ! -d "$path"; then
43965      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43966    fi
43967
43968    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43969  fi
43970
43971
43972    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43974$as_echo_n "checking for freetype includes... " >&6; }
43975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43976$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43977    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43979$as_echo_n "checking for freetype libraries... " >&6; }
43980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43981$as_echo "$FREETYPE_LIB_PATH" >&6; }
43982  fi
43983
43984        if test "x$FOUND_FREETYPE" != xyes; then
43985          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43986        fi
43987      else
43988        # User specified only one of lib or include. This is an error.
43989        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43990          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43991$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43992          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43993        else
43994          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43995$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43996          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43997        fi
43998      fi
43999    else
44000      # User did not specify settings, but we need freetype. Try to locate it.
44001
44002      if test "x$BUNDLE_FREETYPE" = x; then
44003        # If not specified, default is to bundle freetype only on windows
44004        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44005          BUNDLE_FREETYPE=yes
44006        else
44007          BUNDLE_FREETYPE=no
44008        fi
44009      fi
44010
44011      if test "x$FOUND_FREETYPE" != xyes; then
44012        # Check builddeps
44013
44014
44015  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44016    # Source the builddeps file again, to make sure it uses the latest variables!
44017    . $builddepsfile
44018    # Look for a target and build machine specific resource!
44019    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44020    if test "x$resource" = x; then
44021      # Ok, lets instead look for a target specific resource
44022      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44023    fi
44024    if test "x$resource" = x; then
44025      # Ok, lets instead look for a build specific resource
44026      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44027    fi
44028    if test "x$resource" = x; then
44029      # Ok, lets instead look for a generic resource
44030      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44031      resource=${builddep_freetype2}
44032    fi
44033    if test "x$resource" != x; then
44034      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44035$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44036      # If the resource in the builddeps.conf file is an existing directory,
44037      # for example /java/linux/cups
44038      if test -d ${resource}; then
44039        depdir=${resource}
44040      else
44041
44042  # freetype2 is for example mymodule
44043  # $resource is for example libs/general/libmymod_1_2_3.zip
44044  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44045  # $with_builddeps_dir is for example /localhome/builddeps
44046  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44047  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44048  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44049  filename=`basename $resource`
44050  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44051  filebase=${filename%%.*}
44052  extension=${filename#*.}
44053  installdir=$with_builddeps_dir/$filebase
44054  if test ! -f $installdir/$filename.unpacked; then
44055    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44056$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44057    if test ! -d $installdir; then
44058      mkdir -p $installdir
44059    fi
44060    if test ! -d $installdir; then
44061      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44062    fi
44063    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44064    touch $tmpfile
44065    if test ! -f $tmpfile; then
44066      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44067    fi
44068
44069  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44070  # $tmpfile is the local file name for the downloaded file.
44071  VALID_TOOL=no
44072  if test "x$BDEPS_FTP" = xwget; then
44073    VALID_TOOL=yes
44074    wget -O $tmpfile $with_builddeps_server/$resource
44075  fi
44076  if test "x$BDEPS_FTP" = xlftp; then
44077    VALID_TOOL=yes
44078    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44079  fi
44080  if test "x$BDEPS_FTP" = xftp; then
44081    VALID_TOOL=yes
44082    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44083    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44084    FTPUSERPWD=${FTPSERVER%%@*}
44085    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44086      FTPUSER=${userpwd%%:*}
44087      FTPPWD=${userpwd#*@}
44088      FTPSERVER=${FTPSERVER#*@}
44089    else
44090      FTPUSER=ftp
44091      FTPPWD=ftp
44092    fi
44093    # the "pass" command does not work on some
44094    # ftp clients (read ftp.exe) but if it works,
44095    # passive mode is better!
44096    ( \
44097        echo "user $FTPUSER $FTPPWD"        ; \
44098        echo "pass"                         ; \
44099        echo "bin"                          ; \
44100        echo "get $FTPPATH $tmpfile"              ; \
44101    ) | ftp -in $FTPSERVER
44102  fi
44103  if test "x$VALID_TOOL" != xyes; then
44104    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44105  fi
44106
44107    mv $tmpfile $installdir/$filename
44108    if test ! -s $installdir/$filename; then
44109      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44110    fi
44111    case "$extension" in
44112      zip)  echo "Unzipping $installdir/$filename..."
44113        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44114        ;;
44115      tar.gz) echo "Untaring $installdir/$filename..."
44116        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44117        ;;
44118      tgz) echo "Untaring $installdir/$filename..."
44119        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44120        ;;
44121      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44122        ;;
44123    esac
44124  fi
44125  if test -f $installdir/$filename.unpacked; then
44126    depdir=$installdir
44127  fi
44128
44129      fi
44130      # Source the builddeps file again, because in the previous command, the depdir
44131      # was updated to point at the current build dependency install directory.
44132      . $builddepsfile
44133      # Now extract variables from the builddeps.conf files.
44134      theroot=${builddep_freetype2_ROOT}
44135      thecflags=${builddep_freetype2_CFLAGS}
44136      thelibs=${builddep_freetype2_LIBS}
44137      if test "x$depdir" = x; then
44138        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44139      fi
44140      FREETYPE=$depdir
44141      if test "x$theroot" != x; then
44142        FREETYPE="$theroot"
44143      fi
44144      if test "x$thecflags" != x; then
44145        FREETYPE_CFLAGS="$thecflags"
44146      fi
44147      if test "x$thelibs" != x; then
44148        FREETYPE_LIBS="$thelibs"
44149      fi
44150      FOUND_FREETYPE=yes
44151      else FOUND_FREETYPE=no
44152
44153    fi
44154    else FOUND_FREETYPE=no
44155
44156  fi
44157
44158        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44159        if test "x$FOUND_FREETYPE" = xyes; then
44160          if test "x$BUNDLE_FREETYPE" = xyes; then
44161            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44162$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44163            FOUND_FREETYPE=no
44164          else
44165            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44166$as_echo_n "checking for freetype... " >&6; }
44167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44168$as_echo "yes (using builddeps)" >&6; }
44169          fi
44170        fi
44171      fi
44172
44173      if test "x$FOUND_FREETYPE" != xyes; then
44174        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44175        if test "x$PKG_CONFIG" != x; then
44176
44177pkg_failed=no
44178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44179$as_echo_n "checking for FREETYPE... " >&6; }
44180
44181if test -n "$FREETYPE_CFLAGS"; then
44182    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44183 elif test -n "$PKG_CONFIG"; then
44184    if test -n "$PKG_CONFIG" && \
44185    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44186  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44187  ac_status=$?
44188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44189  test $ac_status = 0; }; then
44190  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44191else
44192  pkg_failed=yes
44193fi
44194 else
44195    pkg_failed=untried
44196fi
44197if test -n "$FREETYPE_LIBS"; then
44198    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44199 elif test -n "$PKG_CONFIG"; then
44200    if test -n "$PKG_CONFIG" && \
44201    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44202  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44203  ac_status=$?
44204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44205  test $ac_status = 0; }; then
44206  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44207else
44208  pkg_failed=yes
44209fi
44210 else
44211    pkg_failed=untried
44212fi
44213
44214
44215
44216if test $pkg_failed = yes; then
44217
44218if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44219        _pkg_short_errors_supported=yes
44220else
44221        _pkg_short_errors_supported=no
44222fi
44223        if test $_pkg_short_errors_supported = yes; then
44224	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44225        else
44226	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44227        fi
44228	# Put the nasty error message in config.log where it belongs
44229	echo "$FREETYPE_PKG_ERRORS" >&5
44230
44231	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44232$as_echo "no" >&6; }
44233                FOUND_FREETYPE=no
44234elif test $pkg_failed = untried; then
44235	FOUND_FREETYPE=no
44236else
44237	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44238	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44240$as_echo "yes" >&6; }
44241	FOUND_FREETYPE=yes
44242fi
44243          if test "x$FOUND_FREETYPE" = xyes; then
44244            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44245            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44246            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44247            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44248              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44249            fi
44250            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44251            if test "x$BUNDLE_FREETYPE" = xyes; then
44252              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44253$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44254              FOUND_FREETYPE=no
44255            else
44256              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44257$as_echo_n "checking for freetype... " >&6; }
44258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44259$as_echo "yes (using pkg-config)" >&6; }
44260            fi
44261          fi
44262        fi
44263      fi
44264
44265      if test "x$FOUND_FREETYPE" != xyes; then
44266        # Check in well-known locations
44267        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44268          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44269
44270  windows_path="$FREETYPE_BASE_DIR"
44271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44272    unix_path=`$CYGPATH -u "$windows_path"`
44273    FREETYPE_BASE_DIR="$unix_path"
44274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44276    FREETYPE_BASE_DIR="$unix_path"
44277  fi
44278
44279
44280  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44281  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44282  METHOD="well-known location"
44283
44284  # First check if the files exists.
44285  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44286    # We found an arbitrary include file. That's a good sign.
44287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44288$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44289    FOUND_FREETYPE=yes
44290
44291    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44292    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44293      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44294$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44295      FOUND_FREETYPE=no
44296    else
44297      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44298        # On Windows, we will need both .lib and .dll file.
44299        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44300          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44302          FOUND_FREETYPE=no
44303        fi
44304      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
44305        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44306        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44307      fi
44308    fi
44309  fi
44310
44311  if test "x$FOUND_FREETYPE" = xyes; then
44312
44313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44314
44315  # Input might be given as Windows format, start by converting to
44316  # unix format.
44317  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44318  new_path=`$CYGPATH -u "$path"`
44319
44320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44323  # "foo.exe" is OK but "foo" is an error.
44324  #
44325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44326  # It is also a way to make sure we got the proper file name for the real test later on.
44327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44328  if test "x$test_shortpath" = x; then
44329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44332  fi
44333
44334  # Call helper function which possibly converts this using DOS-style short mode.
44335  # If so, the updated path is stored in $new_path.
44336
44337  input_path="$new_path"
44338  # Check if we need to convert this using DOS-style short mode. If the path
44339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44340  # take no chances and rewrite it.
44341  # Note: m4 eats our [], so we need to use [ and ] instead.
44342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44343  if test "x$has_forbidden_chars" != x; then
44344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44348      # Going to short mode and back again did indeed matter. Since short mode is
44349      # case insensitive, let's make it lowercase to improve readability.
44350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44351      # Now convert it back to Unix-stile (cygpath)
44352      input_path=`$CYGPATH -u "$shortmode_path"`
44353      new_path="$input_path"
44354    fi
44355  fi
44356
44357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44358  if test "x$test_cygdrive_prefix" = x; then
44359    # As a simple fix, exclude /usr/bin since it's not a real path.
44360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44362      # a path prefixed by /cygdrive for fixpath to work.
44363      new_path="$CYGWIN_ROOT_PATH$input_path"
44364    fi
44365  fi
44366
44367
44368  if test "x$path" != "x$new_path"; then
44369    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44372  fi
44373
44374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44375
44376  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44377  has_colon=`$ECHO $path | $GREP ^.:`
44378  new_path="$path"
44379  if test "x$has_colon" = x; then
44380    # Not in mixed or Windows style, start by that.
44381    new_path=`cmd //c echo $path`
44382  fi
44383
44384
44385  input_path="$new_path"
44386  # Check if we need to convert this using DOS-style short mode. If the path
44387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44388  # take no chances and rewrite it.
44389  # Note: m4 eats our [], so we need to use [ and ] instead.
44390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44391  if test "x$has_forbidden_chars" != x; then
44392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44394  fi
44395
44396
44397  windows_path="$new_path"
44398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44399    unix_path=`$CYGPATH -u "$windows_path"`
44400    new_path="$unix_path"
44401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44403    new_path="$unix_path"
44404  fi
44405
44406  if test "x$path" != "x$new_path"; then
44407    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44410  fi
44411
44412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44414
44415  else
44416    # We're on a posix platform. Hooray! :)
44417    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44418    has_space=`$ECHO "$path" | $GREP " "`
44419    if test "x$has_space" != x; then
44420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44422      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44423    fi
44424
44425    # Use eval to expand a potential ~
44426    eval path="$path"
44427    if test ! -f "$path" && test ! -d "$path"; then
44428      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44429    fi
44430
44431    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44432  fi
44433
44434
44435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44436
44437  # Input might be given as Windows format, start by converting to
44438  # unix format.
44439  path="$POTENTIAL_FREETYPE_LIB_PATH"
44440  new_path=`$CYGPATH -u "$path"`
44441
44442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44445  # "foo.exe" is OK but "foo" is an error.
44446  #
44447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44448  # It is also a way to make sure we got the proper file name for the real test later on.
44449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44450  if test "x$test_shortpath" = x; then
44451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44454  fi
44455
44456  # Call helper function which possibly converts this using DOS-style short mode.
44457  # If so, the updated path is stored in $new_path.
44458
44459  input_path="$new_path"
44460  # Check if we need to convert this using DOS-style short mode. If the path
44461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44462  # take no chances and rewrite it.
44463  # Note: m4 eats our [], so we need to use [ and ] instead.
44464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44465  if test "x$has_forbidden_chars" != x; then
44466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44470      # Going to short mode and back again did indeed matter. Since short mode is
44471      # case insensitive, let's make it lowercase to improve readability.
44472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44473      # Now convert it back to Unix-stile (cygpath)
44474      input_path=`$CYGPATH -u "$shortmode_path"`
44475      new_path="$input_path"
44476    fi
44477  fi
44478
44479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44480  if test "x$test_cygdrive_prefix" = x; then
44481    # As a simple fix, exclude /usr/bin since it's not a real path.
44482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44484      # a path prefixed by /cygdrive for fixpath to work.
44485      new_path="$CYGWIN_ROOT_PATH$input_path"
44486    fi
44487  fi
44488
44489
44490  if test "x$path" != "x$new_path"; then
44491    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44494  fi
44495
44496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44497
44498  path="$POTENTIAL_FREETYPE_LIB_PATH"
44499  has_colon=`$ECHO $path | $GREP ^.:`
44500  new_path="$path"
44501  if test "x$has_colon" = x; then
44502    # Not in mixed or Windows style, start by that.
44503    new_path=`cmd //c echo $path`
44504  fi
44505
44506
44507  input_path="$new_path"
44508  # Check if we need to convert this using DOS-style short mode. If the path
44509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44510  # take no chances and rewrite it.
44511  # Note: m4 eats our [], so we need to use [ and ] instead.
44512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44513  if test "x$has_forbidden_chars" != x; then
44514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44516  fi
44517
44518
44519  windows_path="$new_path"
44520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44521    unix_path=`$CYGPATH -u "$windows_path"`
44522    new_path="$unix_path"
44523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44525    new_path="$unix_path"
44526  fi
44527
44528  if test "x$path" != "x$new_path"; then
44529    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44532  fi
44533
44534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44536
44537  else
44538    # We're on a posix platform. Hooray! :)
44539    path="$POTENTIAL_FREETYPE_LIB_PATH"
44540    has_space=`$ECHO "$path" | $GREP " "`
44541    if test "x$has_space" != x; then
44542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44544      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44545    fi
44546
44547    # Use eval to expand a potential ~
44548    eval path="$path"
44549    if test ! -f "$path" && test ! -d "$path"; then
44550      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44551    fi
44552
44553    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44554  fi
44555
44556
44557    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44559$as_echo_n "checking for freetype includes... " >&6; }
44560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44561$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44562    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44564$as_echo_n "checking for freetype libraries... " >&6; }
44565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44566$as_echo "$FREETYPE_LIB_PATH" >&6; }
44567  fi
44568
44569          if test "x$FOUND_FREETYPE" != xyes; then
44570            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44571
44572  windows_path="$FREETYPE_BASE_DIR"
44573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44574    unix_path=`$CYGPATH -u "$windows_path"`
44575    FREETYPE_BASE_DIR="$unix_path"
44576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44578    FREETYPE_BASE_DIR="$unix_path"
44579  fi
44580
44581
44582  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44583  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44584  METHOD="well-known location"
44585
44586  # First check if the files exists.
44587  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44588    # We found an arbitrary include file. That's a good sign.
44589    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44590$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44591    FOUND_FREETYPE=yes
44592
44593    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44594    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44595      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44596$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44597      FOUND_FREETYPE=no
44598    else
44599      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44600        # On Windows, we will need both .lib and .dll file.
44601        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44602          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44604          FOUND_FREETYPE=no
44605        fi
44606      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
44607        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44608        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44609      fi
44610    fi
44611  fi
44612
44613  if test "x$FOUND_FREETYPE" = xyes; then
44614
44615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44616
44617  # Input might be given as Windows format, start by converting to
44618  # unix format.
44619  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44620  new_path=`$CYGPATH -u "$path"`
44621
44622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44625  # "foo.exe" is OK but "foo" is an error.
44626  #
44627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44628  # It is also a way to make sure we got the proper file name for the real test later on.
44629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44630  if test "x$test_shortpath" = x; then
44631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44633    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44634  fi
44635
44636  # Call helper function which possibly converts this using DOS-style short mode.
44637  # If so, the updated path is stored in $new_path.
44638
44639  input_path="$new_path"
44640  # Check if we need to convert this using DOS-style short mode. If the path
44641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44642  # take no chances and rewrite it.
44643  # Note: m4 eats our [], so we need to use [ and ] instead.
44644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44645  if test "x$has_forbidden_chars" != x; then
44646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44650      # Going to short mode and back again did indeed matter. Since short mode is
44651      # case insensitive, let's make it lowercase to improve readability.
44652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44653      # Now convert it back to Unix-stile (cygpath)
44654      input_path=`$CYGPATH -u "$shortmode_path"`
44655      new_path="$input_path"
44656    fi
44657  fi
44658
44659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44660  if test "x$test_cygdrive_prefix" = x; then
44661    # As a simple fix, exclude /usr/bin since it's not a real path.
44662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44664      # a path prefixed by /cygdrive for fixpath to work.
44665      new_path="$CYGWIN_ROOT_PATH$input_path"
44666    fi
44667  fi
44668
44669
44670  if test "x$path" != "x$new_path"; then
44671    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44673$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44674  fi
44675
44676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44677
44678  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44679  has_colon=`$ECHO $path | $GREP ^.:`
44680  new_path="$path"
44681  if test "x$has_colon" = x; then
44682    # Not in mixed or Windows style, start by that.
44683    new_path=`cmd //c echo $path`
44684  fi
44685
44686
44687  input_path="$new_path"
44688  # Check if we need to convert this using DOS-style short mode. If the path
44689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44690  # take no chances and rewrite it.
44691  # Note: m4 eats our [], so we need to use [ and ] instead.
44692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44693  if test "x$has_forbidden_chars" != x; then
44694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44696  fi
44697
44698
44699  windows_path="$new_path"
44700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44701    unix_path=`$CYGPATH -u "$windows_path"`
44702    new_path="$unix_path"
44703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44705    new_path="$unix_path"
44706  fi
44707
44708  if test "x$path" != "x$new_path"; then
44709    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44712  fi
44713
44714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44716
44717  else
44718    # We're on a posix platform. Hooray! :)
44719    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44720    has_space=`$ECHO "$path" | $GREP " "`
44721    if test "x$has_space" != x; then
44722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44724      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44725    fi
44726
44727    # Use eval to expand a potential ~
44728    eval path="$path"
44729    if test ! -f "$path" && test ! -d "$path"; then
44730      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44731    fi
44732
44733    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44734  fi
44735
44736
44737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  path="$POTENTIAL_FREETYPE_LIB_PATH"
44742  new_path=`$CYGPATH -u "$path"`
44743
44744  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44745  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44746  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44747  # "foo.exe" is OK but "foo" is an error.
44748  #
44749  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44750  # It is also a way to make sure we got the proper file name for the real test later on.
44751  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44752  if test "x$test_shortpath" = x; then
44753    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44754$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44755    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44756  fi
44757
44758  # Call helper function which possibly converts this using DOS-style short mode.
44759  # If so, the updated path is stored in $new_path.
44760
44761  input_path="$new_path"
44762  # Check if we need to convert this using DOS-style short mode. If the path
44763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44764  # take no chances and rewrite it.
44765  # Note: m4 eats our [], so we need to use [ and ] instead.
44766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44767  if test "x$has_forbidden_chars" != x; then
44768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44772      # Going to short mode and back again did indeed matter. Since short mode is
44773      # case insensitive, let's make it lowercase to improve readability.
44774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44775      # Now convert it back to Unix-stile (cygpath)
44776      input_path=`$CYGPATH -u "$shortmode_path"`
44777      new_path="$input_path"
44778    fi
44779  fi
44780
44781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44782  if test "x$test_cygdrive_prefix" = x; then
44783    # As a simple fix, exclude /usr/bin since it's not a real path.
44784    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44786      # a path prefixed by /cygdrive for fixpath to work.
44787      new_path="$CYGWIN_ROOT_PATH$input_path"
44788    fi
44789  fi
44790
44791
44792  if test "x$path" != "x$new_path"; then
44793    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44796  fi
44797
44798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44799
44800  path="$POTENTIAL_FREETYPE_LIB_PATH"
44801  has_colon=`$ECHO $path | $GREP ^.:`
44802  new_path="$path"
44803  if test "x$has_colon" = x; then
44804    # Not in mixed or Windows style, start by that.
44805    new_path=`cmd //c echo $path`
44806  fi
44807
44808
44809  input_path="$new_path"
44810  # Check if we need to convert this using DOS-style short mode. If the path
44811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44812  # take no chances and rewrite it.
44813  # Note: m4 eats our [], so we need to use [ and ] instead.
44814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44815  if test "x$has_forbidden_chars" != x; then
44816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44818  fi
44819
44820
44821  windows_path="$new_path"
44822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44823    unix_path=`$CYGPATH -u "$windows_path"`
44824    new_path="$unix_path"
44825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44827    new_path="$unix_path"
44828  fi
44829
44830  if test "x$path" != "x$new_path"; then
44831    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44833$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44834  fi
44835
44836  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44837  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44838
44839  else
44840    # We're on a posix platform. Hooray! :)
44841    path="$POTENTIAL_FREETYPE_LIB_PATH"
44842    has_space=`$ECHO "$path" | $GREP " "`
44843    if test "x$has_space" != x; then
44844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44846      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44847    fi
44848
44849    # Use eval to expand a potential ~
44850    eval path="$path"
44851    if test ! -f "$path" && test ! -d "$path"; then
44852      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44853    fi
44854
44855    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44856  fi
44857
44858
44859    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44861$as_echo_n "checking for freetype includes... " >&6; }
44862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44863$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44864    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44866$as_echo_n "checking for freetype libraries... " >&6; }
44867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44868$as_echo "$FREETYPE_LIB_PATH" >&6; }
44869  fi
44870
44871          fi
44872        else
44873          if test "x$SYS_ROOT" = "x/"; then
44874            FREETYPE_ROOT=
44875          else
44876            FREETYPE_ROOT="$SYS_ROOT"
44877          fi
44878          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44879
44880  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44881  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44882  METHOD="well-known location"
44883
44884  # First check if the files exists.
44885  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44886    # We found an arbitrary include file. That's a good sign.
44887    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44888$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44889    FOUND_FREETYPE=yes
44890
44891    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44892    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44893      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44894$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44895      FOUND_FREETYPE=no
44896    else
44897      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44898        # On Windows, we will need both .lib and .dll file.
44899        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44900          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44902          FOUND_FREETYPE=no
44903        fi
44904      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
44905        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44906        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44907      fi
44908    fi
44909  fi
44910
44911  if test "x$FOUND_FREETYPE" = xyes; then
44912
44913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44914
44915  # Input might be given as Windows format, start by converting to
44916  # unix format.
44917  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44918  new_path=`$CYGPATH -u "$path"`
44919
44920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44923  # "foo.exe" is OK but "foo" is an error.
44924  #
44925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44926  # It is also a way to make sure we got the proper file name for the real test later on.
44927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44928  if test "x$test_shortpath" = x; then
44929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44931    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44932  fi
44933
44934  # Call helper function which possibly converts this using DOS-style short mode.
44935  # If so, the updated path is stored in $new_path.
44936
44937  input_path="$new_path"
44938  # Check if we need to convert this using DOS-style short mode. If the path
44939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44940  # take no chances and rewrite it.
44941  # Note: m4 eats our [], so we need to use [ and ] instead.
44942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44943  if test "x$has_forbidden_chars" != x; then
44944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44948      # Going to short mode and back again did indeed matter. Since short mode is
44949      # case insensitive, let's make it lowercase to improve readability.
44950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44951      # Now convert it back to Unix-stile (cygpath)
44952      input_path=`$CYGPATH -u "$shortmode_path"`
44953      new_path="$input_path"
44954    fi
44955  fi
44956
44957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44958  if test "x$test_cygdrive_prefix" = x; then
44959    # As a simple fix, exclude /usr/bin since it's not a real path.
44960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44962      # a path prefixed by /cygdrive for fixpath to work.
44963      new_path="$CYGWIN_ROOT_PATH$input_path"
44964    fi
44965  fi
44966
44967
44968  if test "x$path" != "x$new_path"; then
44969    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44972  fi
44973
44974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44975
44976  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44977  has_colon=`$ECHO $path | $GREP ^.:`
44978  new_path="$path"
44979  if test "x$has_colon" = x; then
44980    # Not in mixed or Windows style, start by that.
44981    new_path=`cmd //c echo $path`
44982  fi
44983
44984
44985  input_path="$new_path"
44986  # Check if we need to convert this using DOS-style short mode. If the path
44987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44988  # take no chances and rewrite it.
44989  # Note: m4 eats our [], so we need to use [ and ] instead.
44990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44991  if test "x$has_forbidden_chars" != x; then
44992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44994  fi
44995
44996
44997  windows_path="$new_path"
44998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44999    unix_path=`$CYGPATH -u "$windows_path"`
45000    new_path="$unix_path"
45001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45003    new_path="$unix_path"
45004  fi
45005
45006  if test "x$path" != "x$new_path"; then
45007    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45009$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45010  fi
45011
45012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45014
45015  else
45016    # We're on a posix platform. Hooray! :)
45017    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45018    has_space=`$ECHO "$path" | $GREP " "`
45019    if test "x$has_space" != x; then
45020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45022      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45023    fi
45024
45025    # Use eval to expand a potential ~
45026    eval path="$path"
45027    if test ! -f "$path" && test ! -d "$path"; then
45028      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45029    fi
45030
45031    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45032  fi
45033
45034
45035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45036
45037  # Input might be given as Windows format, start by converting to
45038  # unix format.
45039  path="$POTENTIAL_FREETYPE_LIB_PATH"
45040  new_path=`$CYGPATH -u "$path"`
45041
45042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45045  # "foo.exe" is OK but "foo" is an error.
45046  #
45047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45048  # It is also a way to make sure we got the proper file name for the real test later on.
45049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45050  if test "x$test_shortpath" = x; then
45051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45052$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45053    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45054  fi
45055
45056  # Call helper function which possibly converts this using DOS-style short mode.
45057  # If so, the updated path is stored in $new_path.
45058
45059  input_path="$new_path"
45060  # Check if we need to convert this using DOS-style short mode. If the path
45061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45062  # take no chances and rewrite it.
45063  # Note: m4 eats our [], so we need to use [ and ] instead.
45064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45065  if test "x$has_forbidden_chars" != x; then
45066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45070      # Going to short mode and back again did indeed matter. Since short mode is
45071      # case insensitive, let's make it lowercase to improve readability.
45072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45073      # Now convert it back to Unix-stile (cygpath)
45074      input_path=`$CYGPATH -u "$shortmode_path"`
45075      new_path="$input_path"
45076    fi
45077  fi
45078
45079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45080  if test "x$test_cygdrive_prefix" = x; then
45081    # As a simple fix, exclude /usr/bin since it's not a real path.
45082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45084      # a path prefixed by /cygdrive for fixpath to work.
45085      new_path="$CYGWIN_ROOT_PATH$input_path"
45086    fi
45087  fi
45088
45089
45090  if test "x$path" != "x$new_path"; then
45091    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45093$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45094  fi
45095
45096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45097
45098  path="$POTENTIAL_FREETYPE_LIB_PATH"
45099  has_colon=`$ECHO $path | $GREP ^.:`
45100  new_path="$path"
45101  if test "x$has_colon" = x; then
45102    # Not in mixed or Windows style, start by that.
45103    new_path=`cmd //c echo $path`
45104  fi
45105
45106
45107  input_path="$new_path"
45108  # Check if we need to convert this using DOS-style short mode. If the path
45109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45110  # take no chances and rewrite it.
45111  # Note: m4 eats our [], so we need to use [ and ] instead.
45112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45113  if test "x$has_forbidden_chars" != x; then
45114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45116  fi
45117
45118
45119  windows_path="$new_path"
45120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45121    unix_path=`$CYGPATH -u "$windows_path"`
45122    new_path="$unix_path"
45123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45125    new_path="$unix_path"
45126  fi
45127
45128  if test "x$path" != "x$new_path"; then
45129    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45131$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45132  fi
45133
45134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45136
45137  else
45138    # We're on a posix platform. Hooray! :)
45139    path="$POTENTIAL_FREETYPE_LIB_PATH"
45140    has_space=`$ECHO "$path" | $GREP " "`
45141    if test "x$has_space" != x; then
45142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45143$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45144      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45145    fi
45146
45147    # Use eval to expand a potential ~
45148    eval path="$path"
45149    if test ! -f "$path" && test ! -d "$path"; then
45150      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45151    fi
45152
45153    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45154  fi
45155
45156
45157    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45159$as_echo_n "checking for freetype includes... " >&6; }
45160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45161$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45162    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45164$as_echo_n "checking for freetype libraries... " >&6; }
45165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45166$as_echo "$FREETYPE_LIB_PATH" >&6; }
45167  fi
45168
45169
45170          if test "x$FOUND_FREETYPE" != xyes; then
45171            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
45172
45173  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45174  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45175  METHOD="well-known location"
45176
45177  # First check if the files exists.
45178  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45179    # We found an arbitrary include file. That's a good sign.
45180    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45181$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45182    FOUND_FREETYPE=yes
45183
45184    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45185    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45186      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45187$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45188      FOUND_FREETYPE=no
45189    else
45190      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45191        # On Windows, we will need both .lib and .dll file.
45192        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45194$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45195          FOUND_FREETYPE=no
45196        fi
45197      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
45198        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45199        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45200      fi
45201    fi
45202  fi
45203
45204  if test "x$FOUND_FREETYPE" = xyes; then
45205
45206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45207
45208  # Input might be given as Windows format, start by converting to
45209  # unix format.
45210  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45211  new_path=`$CYGPATH -u "$path"`
45212
45213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45216  # "foo.exe" is OK but "foo" is an error.
45217  #
45218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45219  # It is also a way to make sure we got the proper file name for the real test later on.
45220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45221  if test "x$test_shortpath" = x; then
45222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45225  fi
45226
45227  # Call helper function which possibly converts this using DOS-style short mode.
45228  # If so, the updated path is stored in $new_path.
45229
45230  input_path="$new_path"
45231  # Check if we need to convert this using DOS-style short mode. If the path
45232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45233  # take no chances and rewrite it.
45234  # Note: m4 eats our [], so we need to use [ and ] instead.
45235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45236  if test "x$has_forbidden_chars" != x; then
45237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45241      # Going to short mode and back again did indeed matter. Since short mode is
45242      # case insensitive, let's make it lowercase to improve readability.
45243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45244      # Now convert it back to Unix-stile (cygpath)
45245      input_path=`$CYGPATH -u "$shortmode_path"`
45246      new_path="$input_path"
45247    fi
45248  fi
45249
45250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45251  if test "x$test_cygdrive_prefix" = x; then
45252    # As a simple fix, exclude /usr/bin since it's not a real path.
45253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45255      # a path prefixed by /cygdrive for fixpath to work.
45256      new_path="$CYGWIN_ROOT_PATH$input_path"
45257    fi
45258  fi
45259
45260
45261  if test "x$path" != "x$new_path"; then
45262    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45265  fi
45266
45267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45268
45269  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45270  has_colon=`$ECHO $path | $GREP ^.:`
45271  new_path="$path"
45272  if test "x$has_colon" = x; then
45273    # Not in mixed or Windows style, start by that.
45274    new_path=`cmd //c echo $path`
45275  fi
45276
45277
45278  input_path="$new_path"
45279  # Check if we need to convert this using DOS-style short mode. If the path
45280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45281  # take no chances and rewrite it.
45282  # Note: m4 eats our [], so we need to use [ and ] instead.
45283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45284  if test "x$has_forbidden_chars" != x; then
45285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45287  fi
45288
45289
45290  windows_path="$new_path"
45291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45292    unix_path=`$CYGPATH -u "$windows_path"`
45293    new_path="$unix_path"
45294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45296    new_path="$unix_path"
45297  fi
45298
45299  if test "x$path" != "x$new_path"; then
45300    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45303  fi
45304
45305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45307
45308  else
45309    # We're on a posix platform. Hooray! :)
45310    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45311    has_space=`$ECHO "$path" | $GREP " "`
45312    if test "x$has_space" != x; then
45313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45315      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45316    fi
45317
45318    # Use eval to expand a potential ~
45319    eval path="$path"
45320    if test ! -f "$path" && test ! -d "$path"; then
45321      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45322    fi
45323
45324    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45325  fi
45326
45327
45328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45329
45330  # Input might be given as Windows format, start by converting to
45331  # unix format.
45332  path="$POTENTIAL_FREETYPE_LIB_PATH"
45333  new_path=`$CYGPATH -u "$path"`
45334
45335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45338  # "foo.exe" is OK but "foo" is an error.
45339  #
45340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45341  # It is also a way to make sure we got the proper file name for the real test later on.
45342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45343  if test "x$test_shortpath" = x; then
45344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45347  fi
45348
45349  # Call helper function which possibly converts this using DOS-style short mode.
45350  # If so, the updated path is stored in $new_path.
45351
45352  input_path="$new_path"
45353  # Check if we need to convert this using DOS-style short mode. If the path
45354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45355  # take no chances and rewrite it.
45356  # Note: m4 eats our [], so we need to use [ and ] instead.
45357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45358  if test "x$has_forbidden_chars" != x; then
45359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45363      # Going to short mode and back again did indeed matter. Since short mode is
45364      # case insensitive, let's make it lowercase to improve readability.
45365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45366      # Now convert it back to Unix-stile (cygpath)
45367      input_path=`$CYGPATH -u "$shortmode_path"`
45368      new_path="$input_path"
45369    fi
45370  fi
45371
45372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45373  if test "x$test_cygdrive_prefix" = x; then
45374    # As a simple fix, exclude /usr/bin since it's not a real path.
45375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45377      # a path prefixed by /cygdrive for fixpath to work.
45378      new_path="$CYGWIN_ROOT_PATH$input_path"
45379    fi
45380  fi
45381
45382
45383  if test "x$path" != "x$new_path"; then
45384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45387  fi
45388
45389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45390
45391  path="$POTENTIAL_FREETYPE_LIB_PATH"
45392  has_colon=`$ECHO $path | $GREP ^.:`
45393  new_path="$path"
45394  if test "x$has_colon" = x; then
45395    # Not in mixed or Windows style, start by that.
45396    new_path=`cmd //c echo $path`
45397  fi
45398
45399
45400  input_path="$new_path"
45401  # Check if we need to convert this using DOS-style short mode. If the path
45402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45403  # take no chances and rewrite it.
45404  # Note: m4 eats our [], so we need to use [ and ] instead.
45405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45406  if test "x$has_forbidden_chars" != x; then
45407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45409  fi
45410
45411
45412  windows_path="$new_path"
45413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45414    unix_path=`$CYGPATH -u "$windows_path"`
45415    new_path="$unix_path"
45416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45418    new_path="$unix_path"
45419  fi
45420
45421  if test "x$path" != "x$new_path"; then
45422    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45425  fi
45426
45427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45429
45430  else
45431    # We're on a posix platform. Hooray! :)
45432    path="$POTENTIAL_FREETYPE_LIB_PATH"
45433    has_space=`$ECHO "$path" | $GREP " "`
45434    if test "x$has_space" != x; then
45435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45437      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45438    fi
45439
45440    # Use eval to expand a potential ~
45441    eval path="$path"
45442    if test ! -f "$path" && test ! -d "$path"; then
45443      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45444    fi
45445
45446    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45447  fi
45448
45449
45450    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45452$as_echo_n "checking for freetype includes... " >&6; }
45453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45454$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45455    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45457$as_echo_n "checking for freetype libraries... " >&6; }
45458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45459$as_echo "$FREETYPE_LIB_PATH" >&6; }
45460  fi
45461
45462          fi
45463
45464          if test "x$FOUND_FREETYPE" != xyes; then
45465            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45466            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45467
45468  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45469  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45470  METHOD="well-known location"
45471
45472  # First check if the files exists.
45473  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45474    # We found an arbitrary include file. That's a good sign.
45475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45476$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45477    FOUND_FREETYPE=yes
45478
45479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45481      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45483      FOUND_FREETYPE=no
45484    else
45485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45486        # On Windows, we will need both .lib and .dll file.
45487        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45488          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45490          FOUND_FREETYPE=no
45491        fi
45492      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
45493        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45494        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45495      fi
45496    fi
45497  fi
45498
45499  if test "x$FOUND_FREETYPE" = xyes; then
45500
45501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45502
45503  # Input might be given as Windows format, start by converting to
45504  # unix format.
45505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45506  new_path=`$CYGPATH -u "$path"`
45507
45508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45511  # "foo.exe" is OK but "foo" is an error.
45512  #
45513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45514  # It is also a way to make sure we got the proper file name for the real test later on.
45515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45516  if test "x$test_shortpath" = x; then
45517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45520  fi
45521
45522  # Call helper function which possibly converts this using DOS-style short mode.
45523  # If so, the updated path is stored in $new_path.
45524
45525  input_path="$new_path"
45526  # Check if we need to convert this using DOS-style short mode. If the path
45527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45528  # take no chances and rewrite it.
45529  # Note: m4 eats our [], so we need to use [ and ] instead.
45530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45531  if test "x$has_forbidden_chars" != x; then
45532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45536      # Going to short mode and back again did indeed matter. Since short mode is
45537      # case insensitive, let's make it lowercase to improve readability.
45538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45539      # Now convert it back to Unix-stile (cygpath)
45540      input_path=`$CYGPATH -u "$shortmode_path"`
45541      new_path="$input_path"
45542    fi
45543  fi
45544
45545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45546  if test "x$test_cygdrive_prefix" = x; then
45547    # As a simple fix, exclude /usr/bin since it's not a real path.
45548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45550      # a path prefixed by /cygdrive for fixpath to work.
45551      new_path="$CYGWIN_ROOT_PATH$input_path"
45552    fi
45553  fi
45554
45555
45556  if test "x$path" != "x$new_path"; then
45557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45560  fi
45561
45562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45563
45564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45565  has_colon=`$ECHO $path | $GREP ^.:`
45566  new_path="$path"
45567  if test "x$has_colon" = x; then
45568    # Not in mixed or Windows style, start by that.
45569    new_path=`cmd //c echo $path`
45570  fi
45571
45572
45573  input_path="$new_path"
45574  # Check if we need to convert this using DOS-style short mode. If the path
45575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45576  # take no chances and rewrite it.
45577  # Note: m4 eats our [], so we need to use [ and ] instead.
45578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45579  if test "x$has_forbidden_chars" != x; then
45580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45582  fi
45583
45584
45585  windows_path="$new_path"
45586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45587    unix_path=`$CYGPATH -u "$windows_path"`
45588    new_path="$unix_path"
45589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45591    new_path="$unix_path"
45592  fi
45593
45594  if test "x$path" != "x$new_path"; then
45595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45598  fi
45599
45600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45602
45603  else
45604    # We're on a posix platform. Hooray! :)
45605    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45606    has_space=`$ECHO "$path" | $GREP " "`
45607    if test "x$has_space" != x; then
45608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45610      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45611    fi
45612
45613    # Use eval to expand a potential ~
45614    eval path="$path"
45615    if test ! -f "$path" && test ! -d "$path"; then
45616      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45617    fi
45618
45619    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45620  fi
45621
45622
45623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45624
45625  # Input might be given as Windows format, start by converting to
45626  # unix format.
45627  path="$POTENTIAL_FREETYPE_LIB_PATH"
45628  new_path=`$CYGPATH -u "$path"`
45629
45630  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45631  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45632  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45633  # "foo.exe" is OK but "foo" is an error.
45634  #
45635  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45636  # It is also a way to make sure we got the proper file name for the real test later on.
45637  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45638  if test "x$test_shortpath" = x; then
45639    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45641    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45642  fi
45643
45644  # Call helper function which possibly converts this using DOS-style short mode.
45645  # If so, the updated path is stored in $new_path.
45646
45647  input_path="$new_path"
45648  # Check if we need to convert this using DOS-style short mode. If the path
45649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45650  # take no chances and rewrite it.
45651  # Note: m4 eats our [], so we need to use [ and ] instead.
45652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45653  if test "x$has_forbidden_chars" != x; then
45654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45658      # Going to short mode and back again did indeed matter. Since short mode is
45659      # case insensitive, let's make it lowercase to improve readability.
45660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45661      # Now convert it back to Unix-stile (cygpath)
45662      input_path=`$CYGPATH -u "$shortmode_path"`
45663      new_path="$input_path"
45664    fi
45665  fi
45666
45667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45668  if test "x$test_cygdrive_prefix" = x; then
45669    # As a simple fix, exclude /usr/bin since it's not a real path.
45670    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45672      # a path prefixed by /cygdrive for fixpath to work.
45673      new_path="$CYGWIN_ROOT_PATH$input_path"
45674    fi
45675  fi
45676
45677
45678  if test "x$path" != "x$new_path"; then
45679    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45681$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45682  fi
45683
45684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45685
45686  path="$POTENTIAL_FREETYPE_LIB_PATH"
45687  has_colon=`$ECHO $path | $GREP ^.:`
45688  new_path="$path"
45689  if test "x$has_colon" = x; then
45690    # Not in mixed or Windows style, start by that.
45691    new_path=`cmd //c echo $path`
45692  fi
45693
45694
45695  input_path="$new_path"
45696  # Check if we need to convert this using DOS-style short mode. If the path
45697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45698  # take no chances and rewrite it.
45699  # Note: m4 eats our [], so we need to use [ and ] instead.
45700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45701  if test "x$has_forbidden_chars" != x; then
45702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45704  fi
45705
45706
45707  windows_path="$new_path"
45708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45709    unix_path=`$CYGPATH -u "$windows_path"`
45710    new_path="$unix_path"
45711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45713    new_path="$unix_path"
45714  fi
45715
45716  if test "x$path" != "x$new_path"; then
45717    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45719$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45720  fi
45721
45722  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45723  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45724
45725  else
45726    # We're on a posix platform. Hooray! :)
45727    path="$POTENTIAL_FREETYPE_LIB_PATH"
45728    has_space=`$ECHO "$path" | $GREP " "`
45729    if test "x$has_space" != x; then
45730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45732      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45733    fi
45734
45735    # Use eval to expand a potential ~
45736    eval path="$path"
45737    if test ! -f "$path" && test ! -d "$path"; then
45738      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45739    fi
45740
45741    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45742  fi
45743
45744
45745    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45747$as_echo_n "checking for freetype includes... " >&6; }
45748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45749$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45750    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45752$as_echo_n "checking for freetype libraries... " >&6; }
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45754$as_echo "$FREETYPE_LIB_PATH" >&6; }
45755  fi
45756
45757            else
45758
45759  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45760  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45761  METHOD="well-known location"
45762
45763  # First check if the files exists.
45764  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45765    # We found an arbitrary include file. That's a good sign.
45766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45767$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45768    FOUND_FREETYPE=yes
45769
45770    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45771    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45772      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45773$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45774      FOUND_FREETYPE=no
45775    else
45776      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45777        # On Windows, we will need both .lib and .dll file.
45778        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45779          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45781          FOUND_FREETYPE=no
45782        fi
45783      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
45784        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45785        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45786      fi
45787    fi
45788  fi
45789
45790  if test "x$FOUND_FREETYPE" = xyes; then
45791
45792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45793
45794  # Input might be given as Windows format, start by converting to
45795  # unix format.
45796  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45797  new_path=`$CYGPATH -u "$path"`
45798
45799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45802  # "foo.exe" is OK but "foo" is an error.
45803  #
45804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45805  # It is also a way to make sure we got the proper file name for the real test later on.
45806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45807  if test "x$test_shortpath" = x; then
45808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45809$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45810    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45811  fi
45812
45813  # Call helper function which possibly converts this using DOS-style short mode.
45814  # If so, the updated path is stored in $new_path.
45815
45816  input_path="$new_path"
45817  # Check if we need to convert this using DOS-style short mode. If the path
45818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45819  # take no chances and rewrite it.
45820  # Note: m4 eats our [], so we need to use [ and ] instead.
45821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45822  if test "x$has_forbidden_chars" != x; then
45823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45827      # Going to short mode and back again did indeed matter. Since short mode is
45828      # case insensitive, let's make it lowercase to improve readability.
45829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45830      # Now convert it back to Unix-stile (cygpath)
45831      input_path=`$CYGPATH -u "$shortmode_path"`
45832      new_path="$input_path"
45833    fi
45834  fi
45835
45836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45837  if test "x$test_cygdrive_prefix" = x; then
45838    # As a simple fix, exclude /usr/bin since it's not a real path.
45839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45841      # a path prefixed by /cygdrive for fixpath to work.
45842      new_path="$CYGWIN_ROOT_PATH$input_path"
45843    fi
45844  fi
45845
45846
45847  if test "x$path" != "x$new_path"; then
45848    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45850$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45851  fi
45852
45853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45854
45855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45856  has_colon=`$ECHO $path | $GREP ^.:`
45857  new_path="$path"
45858  if test "x$has_colon" = x; then
45859    # Not in mixed or Windows style, start by that.
45860    new_path=`cmd //c echo $path`
45861  fi
45862
45863
45864  input_path="$new_path"
45865  # Check if we need to convert this using DOS-style short mode. If the path
45866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45867  # take no chances and rewrite it.
45868  # Note: m4 eats our [], so we need to use [ and ] instead.
45869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45870  if test "x$has_forbidden_chars" != x; then
45871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45873  fi
45874
45875
45876  windows_path="$new_path"
45877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45878    unix_path=`$CYGPATH -u "$windows_path"`
45879    new_path="$unix_path"
45880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45882    new_path="$unix_path"
45883  fi
45884
45885  if test "x$path" != "x$new_path"; then
45886    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45888$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45889  fi
45890
45891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45893
45894  else
45895    # We're on a posix platform. Hooray! :)
45896    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45897    has_space=`$ECHO "$path" | $GREP " "`
45898    if test "x$has_space" != x; then
45899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45900$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45901      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45902    fi
45903
45904    # Use eval to expand a potential ~
45905    eval path="$path"
45906    if test ! -f "$path" && test ! -d "$path"; then
45907      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45908    fi
45909
45910    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45911  fi
45912
45913
45914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45915
45916  # Input might be given as Windows format, start by converting to
45917  # unix format.
45918  path="$POTENTIAL_FREETYPE_LIB_PATH"
45919  new_path=`$CYGPATH -u "$path"`
45920
45921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45924  # "foo.exe" is OK but "foo" is an error.
45925  #
45926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45927  # It is also a way to make sure we got the proper file name for the real test later on.
45928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45929  if test "x$test_shortpath" = x; then
45930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45933  fi
45934
45935  # Call helper function which possibly converts this using DOS-style short mode.
45936  # If so, the updated path is stored in $new_path.
45937
45938  input_path="$new_path"
45939  # Check if we need to convert this using DOS-style short mode. If the path
45940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45941  # take no chances and rewrite it.
45942  # Note: m4 eats our [], so we need to use [ and ] instead.
45943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45944  if test "x$has_forbidden_chars" != x; then
45945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45949      # Going to short mode and back again did indeed matter. Since short mode is
45950      # case insensitive, let's make it lowercase to improve readability.
45951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45952      # Now convert it back to Unix-stile (cygpath)
45953      input_path=`$CYGPATH -u "$shortmode_path"`
45954      new_path="$input_path"
45955    fi
45956  fi
45957
45958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45959  if test "x$test_cygdrive_prefix" = x; then
45960    # As a simple fix, exclude /usr/bin since it's not a real path.
45961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45963      # a path prefixed by /cygdrive for fixpath to work.
45964      new_path="$CYGWIN_ROOT_PATH$input_path"
45965    fi
45966  fi
45967
45968
45969  if test "x$path" != "x$new_path"; then
45970    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45973  fi
45974
45975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45976
45977  path="$POTENTIAL_FREETYPE_LIB_PATH"
45978  has_colon=`$ECHO $path | $GREP ^.:`
45979  new_path="$path"
45980  if test "x$has_colon" = x; then
45981    # Not in mixed or Windows style, start by that.
45982    new_path=`cmd //c echo $path`
45983  fi
45984
45985
45986  input_path="$new_path"
45987  # Check if we need to convert this using DOS-style short mode. If the path
45988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45989  # take no chances and rewrite it.
45990  # Note: m4 eats our [], so we need to use [ and ] instead.
45991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45992  if test "x$has_forbidden_chars" != x; then
45993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45995  fi
45996
45997
45998  windows_path="$new_path"
45999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46000    unix_path=`$CYGPATH -u "$windows_path"`
46001    new_path="$unix_path"
46002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46004    new_path="$unix_path"
46005  fi
46006
46007  if test "x$path" != "x$new_path"; then
46008    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46011  fi
46012
46013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46015
46016  else
46017    # We're on a posix platform. Hooray! :)
46018    path="$POTENTIAL_FREETYPE_LIB_PATH"
46019    has_space=`$ECHO "$path" | $GREP " "`
46020    if test "x$has_space" != x; then
46021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46024    fi
46025
46026    # Use eval to expand a potential ~
46027    eval path="$path"
46028    if test ! -f "$path" && test ! -d "$path"; then
46029      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46030    fi
46031
46032    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46033  fi
46034
46035
46036    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46037    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46038$as_echo_n "checking for freetype includes... " >&6; }
46039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46040$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46041    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46043$as_echo_n "checking for freetype libraries... " >&6; }
46044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46045$as_echo "$FREETYPE_LIB_PATH" >&6; }
46046  fi
46047
46048              if test "x$FOUND_FREETYPE" != xyes; then
46049
46050  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46051  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46052  METHOD="well-known location"
46053
46054  # First check if the files exists.
46055  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46056    # We found an arbitrary include file. That's a good sign.
46057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46058$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46059    FOUND_FREETYPE=yes
46060
46061    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46062    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46063      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46065      FOUND_FREETYPE=no
46066    else
46067      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46068        # On Windows, we will need both .lib and .dll file.
46069        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46070          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46071$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46072          FOUND_FREETYPE=no
46073        fi
46074      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
46075        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46076        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46077      fi
46078    fi
46079  fi
46080
46081  if test "x$FOUND_FREETYPE" = xyes; then
46082
46083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46084
46085  # Input might be given as Windows format, start by converting to
46086  # unix format.
46087  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46088  new_path=`$CYGPATH -u "$path"`
46089
46090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46093  # "foo.exe" is OK but "foo" is an error.
46094  #
46095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46096  # It is also a way to make sure we got the proper file name for the real test later on.
46097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46098  if test "x$test_shortpath" = x; then
46099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46101    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46102  fi
46103
46104  # Call helper function which possibly converts this using DOS-style short mode.
46105  # If so, the updated path is stored in $new_path.
46106
46107  input_path="$new_path"
46108  # Check if we need to convert this using DOS-style short mode. If the path
46109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46110  # take no chances and rewrite it.
46111  # Note: m4 eats our [], so we need to use [ and ] instead.
46112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46113  if test "x$has_forbidden_chars" != x; then
46114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46118      # Going to short mode and back again did indeed matter. Since short mode is
46119      # case insensitive, let's make it lowercase to improve readability.
46120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46121      # Now convert it back to Unix-stile (cygpath)
46122      input_path=`$CYGPATH -u "$shortmode_path"`
46123      new_path="$input_path"
46124    fi
46125  fi
46126
46127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46128  if test "x$test_cygdrive_prefix" = x; then
46129    # As a simple fix, exclude /usr/bin since it's not a real path.
46130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46132      # a path prefixed by /cygdrive for fixpath to work.
46133      new_path="$CYGWIN_ROOT_PATH$input_path"
46134    fi
46135  fi
46136
46137
46138  if test "x$path" != "x$new_path"; then
46139    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46142  fi
46143
46144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46145
46146  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46147  has_colon=`$ECHO $path | $GREP ^.:`
46148  new_path="$path"
46149  if test "x$has_colon" = x; then
46150    # Not in mixed or Windows style, start by that.
46151    new_path=`cmd //c echo $path`
46152  fi
46153
46154
46155  input_path="$new_path"
46156  # Check if we need to convert this using DOS-style short mode. If the path
46157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46158  # take no chances and rewrite it.
46159  # Note: m4 eats our [], so we need to use [ and ] instead.
46160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46161  if test "x$has_forbidden_chars" != x; then
46162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46164  fi
46165
46166
46167  windows_path="$new_path"
46168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46169    unix_path=`$CYGPATH -u "$windows_path"`
46170    new_path="$unix_path"
46171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46173    new_path="$unix_path"
46174  fi
46175
46176  if test "x$path" != "x$new_path"; then
46177    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46180  fi
46181
46182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46184
46185  else
46186    # We're on a posix platform. Hooray! :)
46187    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46188    has_space=`$ECHO "$path" | $GREP " "`
46189    if test "x$has_space" != x; then
46190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46191$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46192      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46193    fi
46194
46195    # Use eval to expand a potential ~
46196    eval path="$path"
46197    if test ! -f "$path" && test ! -d "$path"; then
46198      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46199    fi
46200
46201    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46202  fi
46203
46204
46205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46206
46207  # Input might be given as Windows format, start by converting to
46208  # unix format.
46209  path="$POTENTIAL_FREETYPE_LIB_PATH"
46210  new_path=`$CYGPATH -u "$path"`
46211
46212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46215  # "foo.exe" is OK but "foo" is an error.
46216  #
46217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46218  # It is also a way to make sure we got the proper file name for the real test later on.
46219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46220  if test "x$test_shortpath" = x; then
46221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46223    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46224  fi
46225
46226  # Call helper function which possibly converts this using DOS-style short mode.
46227  # If so, the updated path is stored in $new_path.
46228
46229  input_path="$new_path"
46230  # Check if we need to convert this using DOS-style short mode. If the path
46231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46232  # take no chances and rewrite it.
46233  # Note: m4 eats our [], so we need to use [ and ] instead.
46234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46235  if test "x$has_forbidden_chars" != x; then
46236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46240      # Going to short mode and back again did indeed matter. Since short mode is
46241      # case insensitive, let's make it lowercase to improve readability.
46242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46243      # Now convert it back to Unix-stile (cygpath)
46244      input_path=`$CYGPATH -u "$shortmode_path"`
46245      new_path="$input_path"
46246    fi
46247  fi
46248
46249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46250  if test "x$test_cygdrive_prefix" = x; then
46251    # As a simple fix, exclude /usr/bin since it's not a real path.
46252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46254      # a path prefixed by /cygdrive for fixpath to work.
46255      new_path="$CYGWIN_ROOT_PATH$input_path"
46256    fi
46257  fi
46258
46259
46260  if test "x$path" != "x$new_path"; then
46261    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46263$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46264  fi
46265
46266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46267
46268  path="$POTENTIAL_FREETYPE_LIB_PATH"
46269  has_colon=`$ECHO $path | $GREP ^.:`
46270  new_path="$path"
46271  if test "x$has_colon" = x; then
46272    # Not in mixed or Windows style, start by that.
46273    new_path=`cmd //c echo $path`
46274  fi
46275
46276
46277  input_path="$new_path"
46278  # Check if we need to convert this using DOS-style short mode. If the path
46279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46280  # take no chances and rewrite it.
46281  # Note: m4 eats our [], so we need to use [ and ] instead.
46282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46283  if test "x$has_forbidden_chars" != x; then
46284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46286  fi
46287
46288
46289  windows_path="$new_path"
46290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46291    unix_path=`$CYGPATH -u "$windows_path"`
46292    new_path="$unix_path"
46293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46295    new_path="$unix_path"
46296  fi
46297
46298  if test "x$path" != "x$new_path"; then
46299    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46301$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46302  fi
46303
46304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46306
46307  else
46308    # We're on a posix platform. Hooray! :)
46309    path="$POTENTIAL_FREETYPE_LIB_PATH"
46310    has_space=`$ECHO "$path" | $GREP " "`
46311    if test "x$has_space" != x; then
46312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46314      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46315    fi
46316
46317    # Use eval to expand a potential ~
46318    eval path="$path"
46319    if test ! -f "$path" && test ! -d "$path"; then
46320      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46321    fi
46322
46323    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46324  fi
46325
46326
46327    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46329$as_echo_n "checking for freetype includes... " >&6; }
46330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46331$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46332    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46334$as_echo_n "checking for freetype libraries... " >&6; }
46335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46336$as_echo "$FREETYPE_LIB_PATH" >&6; }
46337  fi
46338
46339              fi
46340            fi
46341          fi
46342        fi
46343      fi # end check in well-known locations
46344
46345      if test "x$FOUND_FREETYPE" != xyes; then
46346
46347  # Print a helpful message on how to acquire the necessary build dependency.
46348  # freetype is the help tag: freetype, cups, pulse, alsa etc
46349  MISSING_DEPENDENCY=freetype
46350
46351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46352    cygwin_help $MISSING_DEPENDENCY
46353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46354    msys_help $MISSING_DEPENDENCY
46355  else
46356    PKGHANDLER_COMMAND=
46357
46358    case $PKGHANDLER in
46359      apt-get)
46360        apt_help     $MISSING_DEPENDENCY ;;
46361      yum)
46362        yum_help     $MISSING_DEPENDENCY ;;
46363      port)
46364        port_help    $MISSING_DEPENDENCY ;;
46365      pkgutil)
46366        pkgutil_help $MISSING_DEPENDENCY ;;
46367      pkgadd)
46368        pkgadd_help  $MISSING_DEPENDENCY ;;
46369    esac
46370
46371    if test "x$PKGHANDLER_COMMAND" != x; then
46372      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46373    fi
46374  fi
46375
46376        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46377      fi
46378    fi # end user specified settings
46379
46380    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46381    if test "x$FREETYPE_CFLAGS" = x; then
46382
46383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46384
46385  # Input might be given as Windows format, start by converting to
46386  # unix format.
46387  path="$FREETYPE_INCLUDE_PATH"
46388  new_path=`$CYGPATH -u "$path"`
46389
46390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46393  # "foo.exe" is OK but "foo" is an error.
46394  #
46395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46396  # It is also a way to make sure we got the proper file name for the real test later on.
46397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46398  if test "x$test_shortpath" = x; then
46399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46400$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46401    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46402  fi
46403
46404  # Call helper function which possibly converts this using DOS-style short mode.
46405  # If so, the updated path is stored in $new_path.
46406
46407  input_path="$new_path"
46408  # Check if we need to convert this using DOS-style short mode. If the path
46409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46410  # take no chances and rewrite it.
46411  # Note: m4 eats our [], so we need to use [ and ] instead.
46412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46413  if test "x$has_forbidden_chars" != x; then
46414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46418      # Going to short mode and back again did indeed matter. Since short mode is
46419      # case insensitive, let's make it lowercase to improve readability.
46420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46421      # Now convert it back to Unix-stile (cygpath)
46422      input_path=`$CYGPATH -u "$shortmode_path"`
46423      new_path="$input_path"
46424    fi
46425  fi
46426
46427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46428  if test "x$test_cygdrive_prefix" = x; then
46429    # As a simple fix, exclude /usr/bin since it's not a real path.
46430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46432      # a path prefixed by /cygdrive for fixpath to work.
46433      new_path="$CYGWIN_ROOT_PATH$input_path"
46434    fi
46435  fi
46436
46437
46438  if test "x$path" != "x$new_path"; then
46439    FREETYPE_INCLUDE_PATH="$new_path"
46440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46441$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46442  fi
46443
46444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46445
46446  path="$FREETYPE_INCLUDE_PATH"
46447  has_colon=`$ECHO $path | $GREP ^.:`
46448  new_path="$path"
46449  if test "x$has_colon" = x; then
46450    # Not in mixed or Windows style, start by that.
46451    new_path=`cmd //c echo $path`
46452  fi
46453
46454
46455  input_path="$new_path"
46456  # Check if we need to convert this using DOS-style short mode. If the path
46457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46458  # take no chances and rewrite it.
46459  # Note: m4 eats our [], so we need to use [ and ] instead.
46460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46461  if test "x$has_forbidden_chars" != x; then
46462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46464  fi
46465
46466
46467  windows_path="$new_path"
46468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46469    unix_path=`$CYGPATH -u "$windows_path"`
46470    new_path="$unix_path"
46471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46473    new_path="$unix_path"
46474  fi
46475
46476  if test "x$path" != "x$new_path"; then
46477    FREETYPE_INCLUDE_PATH="$new_path"
46478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46479$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46480  fi
46481
46482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46484
46485  else
46486    # We're on a posix platform. Hooray! :)
46487    path="$FREETYPE_INCLUDE_PATH"
46488    has_space=`$ECHO "$path" | $GREP " "`
46489    if test "x$has_space" != x; then
46490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46491$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46493    fi
46494
46495    # Use eval to expand a potential ~
46496    eval path="$path"
46497    if test ! -f "$path" && test ! -d "$path"; then
46498      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46499    fi
46500
46501    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46502  fi
46503
46504      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46505        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46506      else
46507        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46508      fi
46509    fi
46510
46511    if test "x$FREETYPE_LIBS" = x; then
46512
46513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46514
46515  # Input might be given as Windows format, start by converting to
46516  # unix format.
46517  path="$FREETYPE_LIB_PATH"
46518  new_path=`$CYGPATH -u "$path"`
46519
46520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46523  # "foo.exe" is OK but "foo" is an error.
46524  #
46525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46526  # It is also a way to make sure we got the proper file name for the real test later on.
46527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46528  if test "x$test_shortpath" = x; then
46529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46530$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46531    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46532  fi
46533
46534  # Call helper function which possibly converts this using DOS-style short mode.
46535  # If so, the updated path is stored in $new_path.
46536
46537  input_path="$new_path"
46538  # Check if we need to convert this using DOS-style short mode. If the path
46539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46540  # take no chances and rewrite it.
46541  # Note: m4 eats our [], so we need to use [ and ] instead.
46542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46543  if test "x$has_forbidden_chars" != x; then
46544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46548      # Going to short mode and back again did indeed matter. Since short mode is
46549      # case insensitive, let's make it lowercase to improve readability.
46550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46551      # Now convert it back to Unix-stile (cygpath)
46552      input_path=`$CYGPATH -u "$shortmode_path"`
46553      new_path="$input_path"
46554    fi
46555  fi
46556
46557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46558  if test "x$test_cygdrive_prefix" = x; then
46559    # As a simple fix, exclude /usr/bin since it's not a real path.
46560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46562      # a path prefixed by /cygdrive for fixpath to work.
46563      new_path="$CYGWIN_ROOT_PATH$input_path"
46564    fi
46565  fi
46566
46567
46568  if test "x$path" != "x$new_path"; then
46569    FREETYPE_LIB_PATH="$new_path"
46570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46571$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46572  fi
46573
46574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46575
46576  path="$FREETYPE_LIB_PATH"
46577  has_colon=`$ECHO $path | $GREP ^.:`
46578  new_path="$path"
46579  if test "x$has_colon" = x; then
46580    # Not in mixed or Windows style, start by that.
46581    new_path=`cmd //c echo $path`
46582  fi
46583
46584
46585  input_path="$new_path"
46586  # Check if we need to convert this using DOS-style short mode. If the path
46587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46588  # take no chances and rewrite it.
46589  # Note: m4 eats our [], so we need to use [ and ] instead.
46590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46591  if test "x$has_forbidden_chars" != x; then
46592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46594  fi
46595
46596
46597  windows_path="$new_path"
46598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46599    unix_path=`$CYGPATH -u "$windows_path"`
46600    new_path="$unix_path"
46601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46603    new_path="$unix_path"
46604  fi
46605
46606  if test "x$path" != "x$new_path"; then
46607    FREETYPE_LIB_PATH="$new_path"
46608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46609$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46610  fi
46611
46612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46614
46615  else
46616    # We're on a posix platform. Hooray! :)
46617    path="$FREETYPE_LIB_PATH"
46618    has_space=`$ECHO "$path" | $GREP " "`
46619    if test "x$has_space" != x; then
46620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46621$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46622      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46623    fi
46624
46625    # Use eval to expand a potential ~
46626    eval path="$path"
46627    if test ! -f "$path" && test ! -d "$path"; then
46628      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46629    fi
46630
46631    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46632  fi
46633
46634      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46635        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46636      else
46637        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46638      fi
46639    fi
46640
46641    # Try to compile it
46642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46643$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46644    ac_ext=cpp
46645ac_cpp='$CXXCPP $CPPFLAGS'
46646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46649
46650    PREV_CXXCFLAGS="$CXXFLAGS"
46651    PREV_LIBS="$LIBS"
46652    PREV_CXX="$CXX"
46653    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46654    LIBS="$LIBS $FREETYPE_LIBS"
46655    CXX="$FIXPATH $CXX"
46656    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46657/* end confdefs.h.  */
46658
46659          #include<ft2build.h>
46660          #include FT_FREETYPE_H
46661          int main () {
46662            FT_Init_FreeType(NULL);
46663            return 0;
46664          }
46665
46666_ACEOF
46667if ac_fn_cxx_try_link "$LINENO"; then :
46668
46669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46670$as_echo "yes" >&6; }
46671
46672else
46673
46674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46675$as_echo "no" >&6; }
46676          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46677$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46678          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46679$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46680
46681
46682  # Print a helpful message on how to acquire the necessary build dependency.
46683  # freetype is the help tag: freetype, cups, pulse, alsa etc
46684  MISSING_DEPENDENCY=freetype
46685
46686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46687    cygwin_help $MISSING_DEPENDENCY
46688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46689    msys_help $MISSING_DEPENDENCY
46690  else
46691    PKGHANDLER_COMMAND=
46692
46693    case $PKGHANDLER in
46694      apt-get)
46695        apt_help     $MISSING_DEPENDENCY ;;
46696      yum)
46697        yum_help     $MISSING_DEPENDENCY ;;
46698      port)
46699        port_help    $MISSING_DEPENDENCY ;;
46700      pkgutil)
46701        pkgutil_help $MISSING_DEPENDENCY ;;
46702      pkgadd)
46703        pkgadd_help  $MISSING_DEPENDENCY ;;
46704    esac
46705
46706    if test "x$PKGHANDLER_COMMAND" != x; then
46707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46708    fi
46709  fi
46710
46711
46712          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46713
46714
46715fi
46716rm -f core conftest.err conftest.$ac_objext \
46717    conftest$ac_exeext conftest.$ac_ext
46718    CXXCFLAGS="$PREV_CXXFLAGS"
46719    LIBS="$PREV_LIBS"
46720    CXX="$PREV_CXX"
46721    ac_ext=cpp
46722ac_cpp='$CXXCPP $CPPFLAGS'
46723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46726
46727
46728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46729$as_echo_n "checking if we should bundle freetype... " >&6; }
46730    if test "x$BUNDLE_FREETYPE" = xyes; then
46731      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46732    fi
46733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46734$as_echo "$BUNDLE_FREETYPE" >&6; }
46735
46736  fi # end freetype needed
46737
46738
46739
46740
46741
46742
46743
46744  ###############################################################################
46745  #
46746  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46747  #
46748
46749# Check whether --with-alsa was given.
46750if test "${with_alsa+set}" = set; then :
46751  withval=$with_alsa;
46752fi
46753
46754
46755# Check whether --with-alsa-include was given.
46756if test "${with_alsa_include+set}" = set; then :
46757  withval=$with_alsa_include;
46758fi
46759
46760
46761# Check whether --with-alsa-lib was given.
46762if test "${with_alsa_lib+set}" = set; then :
46763  withval=$with_alsa_lib;
46764fi
46765
46766
46767  if test "x$ALSA_NOT_NEEDED" = xyes; then
46768    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46769      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46770$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46771    fi
46772    ALSA_CFLAGS=
46773    ALSA_LIBS=
46774  else
46775    ALSA_FOUND=no
46776
46777    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46778      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46779    fi
46780
46781    if test "x${with_alsa}" != x; then
46782      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46783      ALSA_CFLAGS="-I${with_alsa}/include"
46784      ALSA_FOUND=yes
46785    fi
46786    if test "x${with_alsa_include}" != x; then
46787      ALSA_CFLAGS="-I${with_alsa_include}"
46788      ALSA_FOUND=yes
46789    fi
46790    if test "x${with_alsa_lib}" != x; then
46791      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46792      ALSA_FOUND=yes
46793    fi
46794    if test "x$ALSA_FOUND" = xno; then
46795
46796
46797  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46798    # Source the builddeps file again, to make sure it uses the latest variables!
46799    . $builddepsfile
46800    # Look for a target and build machine specific resource!
46801    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46802    if test "x$resource" = x; then
46803      # Ok, lets instead look for a target specific resource
46804      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46805    fi
46806    if test "x$resource" = x; then
46807      # Ok, lets instead look for a build specific resource
46808      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46809    fi
46810    if test "x$resource" = x; then
46811      # Ok, lets instead look for a generic resource
46812      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46813      resource=${builddep_alsa}
46814    fi
46815    if test "x$resource" != x; then
46816      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46817$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46818      # If the resource in the builddeps.conf file is an existing directory,
46819      # for example /java/linux/cups
46820      if test -d ${resource}; then
46821        depdir=${resource}
46822      else
46823
46824  # alsa is for example mymodule
46825  # $resource is for example libs/general/libmymod_1_2_3.zip
46826  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46827  # $with_builddeps_dir is for example /localhome/builddeps
46828  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46829  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46830  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46831  filename=`basename $resource`
46832  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46833  filebase=${filename%%.*}
46834  extension=${filename#*.}
46835  installdir=$with_builddeps_dir/$filebase
46836  if test ! -f $installdir/$filename.unpacked; then
46837    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46838$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46839    if test ! -d $installdir; then
46840      mkdir -p $installdir
46841    fi
46842    if test ! -d $installdir; then
46843      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46844    fi
46845    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46846    touch $tmpfile
46847    if test ! -f $tmpfile; then
46848      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46849    fi
46850
46851  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46852  # $tmpfile is the local file name for the downloaded file.
46853  VALID_TOOL=no
46854  if test "x$BDEPS_FTP" = xwget; then
46855    VALID_TOOL=yes
46856    wget -O $tmpfile $with_builddeps_server/$resource
46857  fi
46858  if test "x$BDEPS_FTP" = xlftp; then
46859    VALID_TOOL=yes
46860    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46861  fi
46862  if test "x$BDEPS_FTP" = xftp; then
46863    VALID_TOOL=yes
46864    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46865    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46866    FTPUSERPWD=${FTPSERVER%%@*}
46867    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46868      FTPUSER=${userpwd%%:*}
46869      FTPPWD=${userpwd#*@}
46870      FTPSERVER=${FTPSERVER#*@}
46871    else
46872      FTPUSER=ftp
46873      FTPPWD=ftp
46874    fi
46875    # the "pass" command does not work on some
46876    # ftp clients (read ftp.exe) but if it works,
46877    # passive mode is better!
46878    ( \
46879        echo "user $FTPUSER $FTPPWD"        ; \
46880        echo "pass"                         ; \
46881        echo "bin"                          ; \
46882        echo "get $FTPPATH $tmpfile"              ; \
46883    ) | ftp -in $FTPSERVER
46884  fi
46885  if test "x$VALID_TOOL" != xyes; then
46886    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46887  fi
46888
46889    mv $tmpfile $installdir/$filename
46890    if test ! -s $installdir/$filename; then
46891      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46892    fi
46893    case "$extension" in
46894      zip)  echo "Unzipping $installdir/$filename..."
46895        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46896        ;;
46897      tar.gz) echo "Untaring $installdir/$filename..."
46898        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46899        ;;
46900      tgz) echo "Untaring $installdir/$filename..."
46901        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46902        ;;
46903      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46904        ;;
46905    esac
46906  fi
46907  if test -f $installdir/$filename.unpacked; then
46908    depdir=$installdir
46909  fi
46910
46911      fi
46912      # Source the builddeps file again, because in the previous command, the depdir
46913      # was updated to point at the current build dependency install directory.
46914      . $builddepsfile
46915      # Now extract variables from the builddeps.conf files.
46916      theroot=${builddep_alsa_ROOT}
46917      thecflags=${builddep_alsa_CFLAGS}
46918      thelibs=${builddep_alsa_LIBS}
46919      if test "x$depdir" = x; then
46920        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46921      fi
46922      ALSA=$depdir
46923      if test "x$theroot" != x; then
46924        ALSA="$theroot"
46925      fi
46926      if test "x$thecflags" != x; then
46927        ALSA_CFLAGS="$thecflags"
46928      fi
46929      if test "x$thelibs" != x; then
46930        ALSA_LIBS="$thelibs"
46931      fi
46932      ALSA_FOUND=yes
46933      else ALSA_FOUND=no
46934
46935    fi
46936    else ALSA_FOUND=no
46937
46938  fi
46939
46940    fi
46941    if test "x$ALSA_FOUND" = xno; then
46942
46943pkg_failed=no
46944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46945$as_echo_n "checking for ALSA... " >&6; }
46946
46947if test -n "$ALSA_CFLAGS"; then
46948    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46949 elif test -n "$PKG_CONFIG"; then
46950    if test -n "$PKG_CONFIG" && \
46951    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46952  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46953  ac_status=$?
46954  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46955  test $ac_status = 0; }; then
46956  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46957else
46958  pkg_failed=yes
46959fi
46960 else
46961    pkg_failed=untried
46962fi
46963if test -n "$ALSA_LIBS"; then
46964    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46965 elif test -n "$PKG_CONFIG"; then
46966    if test -n "$PKG_CONFIG" && \
46967    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46968  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46969  ac_status=$?
46970  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46971  test $ac_status = 0; }; then
46972  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46973else
46974  pkg_failed=yes
46975fi
46976 else
46977    pkg_failed=untried
46978fi
46979
46980
46981
46982if test $pkg_failed = yes; then
46983
46984if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46985        _pkg_short_errors_supported=yes
46986else
46987        _pkg_short_errors_supported=no
46988fi
46989        if test $_pkg_short_errors_supported = yes; then
46990	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46991        else
46992	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46993        fi
46994	# Put the nasty error message in config.log where it belongs
46995	echo "$ALSA_PKG_ERRORS" >&5
46996
46997	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46998$as_echo "no" >&6; }
46999                ALSA_FOUND=no
47000elif test $pkg_failed = untried; then
47001	ALSA_FOUND=no
47002else
47003	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47004	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47006$as_echo "yes" >&6; }
47007	ALSA_FOUND=yes
47008fi
47009    fi
47010    if test "x$ALSA_FOUND" = xno; then
47011      for ac_header in alsa/asoundlib.h
47012do :
47013  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47014if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47015  cat >>confdefs.h <<_ACEOF
47016#define HAVE_ALSA_ASOUNDLIB_H 1
47017_ACEOF
47018
47019            ALSA_FOUND=yes
47020            ALSA_CFLAGS=-Iignoreme
47021            ALSA_LIBS=-lasound
47022            DEFAULT_ALSA=yes
47023
47024else
47025  ALSA_FOUND=no
47026fi
47027
47028done
47029
47030    fi
47031    if test "x$ALSA_FOUND" = xno; then
47032
47033  # Print a helpful message on how to acquire the necessary build dependency.
47034  # alsa is the help tag: freetype, cups, pulse, alsa etc
47035  MISSING_DEPENDENCY=alsa
47036
47037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47038    cygwin_help $MISSING_DEPENDENCY
47039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47040    msys_help $MISSING_DEPENDENCY
47041  else
47042    PKGHANDLER_COMMAND=
47043
47044    case $PKGHANDLER in
47045      apt-get)
47046        apt_help     $MISSING_DEPENDENCY ;;
47047      yum)
47048        yum_help     $MISSING_DEPENDENCY ;;
47049      port)
47050        port_help    $MISSING_DEPENDENCY ;;
47051      pkgutil)
47052        pkgutil_help $MISSING_DEPENDENCY ;;
47053      pkgadd)
47054        pkgadd_help  $MISSING_DEPENDENCY ;;
47055    esac
47056
47057    if test "x$PKGHANDLER_COMMAND" != x; then
47058      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47059    fi
47060  fi
47061
47062      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47063    fi
47064  fi
47065
47066
47067
47068
47069
47070
47071  ###############################################################################
47072  #
47073  # Check for the jpeg library
47074  #
47075
47076  USE_EXTERNAL_LIBJPEG=true
47077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47078$as_echo_n "checking for main in -ljpeg... " >&6; }
47079if ${ac_cv_lib_jpeg_main+:} false; then :
47080  $as_echo_n "(cached) " >&6
47081else
47082  ac_check_lib_save_LIBS=$LIBS
47083LIBS="-ljpeg  $LIBS"
47084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47085/* end confdefs.h.  */
47086
47087
47088int
47089main ()
47090{
47091return main ();
47092  ;
47093  return 0;
47094}
47095_ACEOF
47096if ac_fn_cxx_try_link "$LINENO"; then :
47097  ac_cv_lib_jpeg_main=yes
47098else
47099  ac_cv_lib_jpeg_main=no
47100fi
47101rm -f core conftest.err conftest.$ac_objext \
47102    conftest$ac_exeext conftest.$ac_ext
47103LIBS=$ac_check_lib_save_LIBS
47104fi
47105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47106$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47107if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47108  cat >>confdefs.h <<_ACEOF
47109#define HAVE_LIBJPEG 1
47110_ACEOF
47111
47112  LIBS="-ljpeg $LIBS"
47113
47114else
47115   USE_EXTERNAL_LIBJPEG=false
47116      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47117$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47118
47119fi
47120
47121
47122
47123  ###############################################################################
47124  #
47125  # Check for the gif library
47126  #
47127
47128
47129# Check whether --with-giflib was given.
47130if test "${with_giflib+set}" = set; then :
47131  withval=$with_giflib;
47132fi
47133
47134
47135
47136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47137$as_echo_n "checking for which giflib to use... " >&6; }
47138
47139  # default is bundled
47140  DEFAULT_GIFLIB=bundled
47141
47142  #
47143  # if user didn't specify, use DEFAULT_GIFLIB
47144  #
47145  if test "x${with_giflib}" = "x"; then
47146    with_giflib=${DEFAULT_GIFLIB}
47147  fi
47148
47149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47150$as_echo "${with_giflib}" >&6; }
47151
47152  if test "x${with_giflib}" = "xbundled"; then
47153    USE_EXTERNAL_LIBGIF=false
47154  elif test "x${with_giflib}" = "xsystem"; then
47155    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47156if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47157
47158else
47159   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47160fi
47161
47162
47163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47164$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47165if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47166  $as_echo_n "(cached) " >&6
47167else
47168  ac_check_lib_save_LIBS=$LIBS
47169LIBS="-lgif  $LIBS"
47170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47171/* end confdefs.h.  */
47172
47173/* Override any GCC internal prototype to avoid an error.
47174   Use char because int might match the return type of a GCC
47175   builtin and then its argument prototype would still apply.  */
47176#ifdef __cplusplus
47177extern "C"
47178#endif
47179char DGifGetCode ();
47180int
47181main ()
47182{
47183return DGifGetCode ();
47184  ;
47185  return 0;
47186}
47187_ACEOF
47188if ac_fn_cxx_try_link "$LINENO"; then :
47189  ac_cv_lib_gif_DGifGetCode=yes
47190else
47191  ac_cv_lib_gif_DGifGetCode=no
47192fi
47193rm -f core conftest.err conftest.$ac_objext \
47194    conftest$ac_exeext conftest.$ac_ext
47195LIBS=$ac_check_lib_save_LIBS
47196fi
47197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47198$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47199if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47200  cat >>confdefs.h <<_ACEOF
47201#define HAVE_LIBGIF 1
47202_ACEOF
47203
47204  LIBS="-lgif $LIBS"
47205
47206else
47207   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47208fi
47209
47210
47211    USE_EXTERNAL_LIBGIF=true
47212  else
47213    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47214  fi
47215
47216
47217  ###############################################################################
47218  #
47219  # Check for the zlib library
47220  #
47221
47222
47223# Check whether --with-zlib was given.
47224if test "${with_zlib+set}" = set; then :
47225  withval=$with_zlib;
47226fi
47227
47228
47229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47230$as_echo_n "checking for compress in -lz... " >&6; }
47231if ${ac_cv_lib_z_compress+:} false; then :
47232  $as_echo_n "(cached) " >&6
47233else
47234  ac_check_lib_save_LIBS=$LIBS
47235LIBS="-lz  $LIBS"
47236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47237/* end confdefs.h.  */
47238
47239/* Override any GCC internal prototype to avoid an error.
47240   Use char because int might match the return type of a GCC
47241   builtin and then its argument prototype would still apply.  */
47242#ifdef __cplusplus
47243extern "C"
47244#endif
47245char compress ();
47246int
47247main ()
47248{
47249return compress ();
47250  ;
47251  return 0;
47252}
47253_ACEOF
47254if ac_fn_cxx_try_link "$LINENO"; then :
47255  ac_cv_lib_z_compress=yes
47256else
47257  ac_cv_lib_z_compress=no
47258fi
47259rm -f core conftest.err conftest.$ac_objext \
47260    conftest$ac_exeext conftest.$ac_ext
47261LIBS=$ac_check_lib_save_LIBS
47262fi
47263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47264$as_echo "$ac_cv_lib_z_compress" >&6; }
47265if test "x$ac_cv_lib_z_compress" = xyes; then :
47266   ZLIB_FOUND=yes
47267else
47268   ZLIB_FOUND=no
47269fi
47270
47271
47272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47273$as_echo_n "checking for which zlib to use... " >&6; }
47274
47275  DEFAULT_ZLIB=bundled
47276  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47277    #
47278    # On macosx default is system...on others default is
47279    #
47280    DEFAULT_ZLIB=system
47281  fi
47282
47283  if test "x${ZLIB_FOUND}" != "xyes"; then
47284    #
47285    # If we don't find any system...set default to bundled
47286    #
47287    DEFAULT_ZLIB=bundled
47288  fi
47289
47290  #
47291  # If user didn't specify, use DEFAULT_ZLIB
47292  #
47293  if test "x${with_zlib}" = "x"; then
47294    with_zlib=${DEFAULT_ZLIB}
47295  fi
47296
47297  if test "x${with_zlib}" = "xbundled"; then
47298    USE_EXTERNAL_LIBZ=false
47299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47300$as_echo "bundled" >&6; }
47301  elif test "x${with_zlib}" = "xsystem"; then
47302    if test "x${ZLIB_FOUND}" = "xyes"; then
47303      USE_EXTERNAL_LIBZ=true
47304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47305$as_echo "system" >&6; }
47306    else
47307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47308$as_echo "system not found" >&6; }
47309      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47310    fi
47311  else
47312    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47313  fi
47314
47315
47316
47317  ###############################################################################
47318  LIBZIP_CAN_USE_MMAP=true
47319
47320
47321
47322  ###############################################################################
47323  #
47324  # Check if altzone exists in time.h
47325  #
47326
47327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47328/* end confdefs.h.  */
47329#include <time.h>
47330int
47331main ()
47332{
47333return (int)altzone;
47334  ;
47335  return 0;
47336}
47337_ACEOF
47338if ac_fn_cxx_try_link "$LINENO"; then :
47339  has_altzone=yes
47340else
47341  has_altzone=no
47342fi
47343rm -f core conftest.err conftest.$ac_objext \
47344    conftest$ac_exeext conftest.$ac_ext
47345  if test "x$has_altzone" = xyes; then
47346
47347$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47348
47349  fi
47350
47351  ###############################################################################
47352  #
47353  # Check the maths library
47354  #
47355
47356  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47357$as_echo_n "checking for cos in -lm... " >&6; }
47358if ${ac_cv_lib_m_cos+:} false; then :
47359  $as_echo_n "(cached) " >&6
47360else
47361  ac_check_lib_save_LIBS=$LIBS
47362LIBS="-lm  $LIBS"
47363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47364/* end confdefs.h.  */
47365
47366/* Override any GCC internal prototype to avoid an error.
47367   Use char because int might match the return type of a GCC
47368   builtin and then its argument prototype would still apply.  */
47369#ifdef __cplusplus
47370extern "C"
47371#endif
47372char cos ();
47373int
47374main ()
47375{
47376return cos ();
47377  ;
47378  return 0;
47379}
47380_ACEOF
47381if ac_fn_cxx_try_link "$LINENO"; then :
47382  ac_cv_lib_m_cos=yes
47383else
47384  ac_cv_lib_m_cos=no
47385fi
47386rm -f core conftest.err conftest.$ac_objext \
47387    conftest$ac_exeext conftest.$ac_ext
47388LIBS=$ac_check_lib_save_LIBS
47389fi
47390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47391$as_echo "$ac_cv_lib_m_cos" >&6; }
47392if test "x$ac_cv_lib_m_cos" = xyes; then :
47393  cat >>confdefs.h <<_ACEOF
47394#define HAVE_LIBM 1
47395_ACEOF
47396
47397  LIBS="-lm $LIBS"
47398
47399else
47400
47401        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47402$as_echo "$as_me: Maths library was not found" >&6;}
47403
47404
47405fi
47406
47407
47408
47409  ###############################################################################
47410  #
47411  # Check for libdl.so
47412
47413  save_LIBS="$LIBS"
47414  LIBS=""
47415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47416$as_echo_n "checking for dlopen in -ldl... " >&6; }
47417if ${ac_cv_lib_dl_dlopen+:} false; then :
47418  $as_echo_n "(cached) " >&6
47419else
47420  ac_check_lib_save_LIBS=$LIBS
47421LIBS="-ldl  $LIBS"
47422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47423/* end confdefs.h.  */
47424
47425/* Override any GCC internal prototype to avoid an error.
47426   Use char because int might match the return type of a GCC
47427   builtin and then its argument prototype would still apply.  */
47428#ifdef __cplusplus
47429extern "C"
47430#endif
47431char dlopen ();
47432int
47433main ()
47434{
47435return dlopen ();
47436  ;
47437  return 0;
47438}
47439_ACEOF
47440if ac_fn_cxx_try_link "$LINENO"; then :
47441  ac_cv_lib_dl_dlopen=yes
47442else
47443  ac_cv_lib_dl_dlopen=no
47444fi
47445rm -f core conftest.err conftest.$ac_objext \
47446    conftest$ac_exeext conftest.$ac_ext
47447LIBS=$ac_check_lib_save_LIBS
47448fi
47449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47450$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47451if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47452  cat >>confdefs.h <<_ACEOF
47453#define HAVE_LIBDL 1
47454_ACEOF
47455
47456  LIBS="-ldl $LIBS"
47457
47458fi
47459
47460  LIBDL="$LIBS"
47461
47462  LIBS="$save_LIBS"
47463
47464
47465  ###############################################################################
47466  #
47467  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47468  # dynamic build is configured on command line.
47469  #
47470
47471# Check whether --with-stdc++lib was given.
47472if test "${with_stdc__lib+set}" = set; then :
47473  withval=$with_stdc__lib;
47474        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47475                && test "x$with_stdc__lib" != xdefault; then
47476          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47477        fi
47478
47479else
47480  with_stdc__lib=default
47481
47482fi
47483
47484
47485  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47486    # Test if -lstdc++ works.
47487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47488$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47489    ac_ext=cpp
47490ac_cpp='$CXXCPP $CPPFLAGS'
47491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47494
47495    OLD_CXXFLAGS="$CXXFLAGS"
47496    CXXFLAGS="$CXXFLAGS -lstdc++"
47497    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47498/* end confdefs.h.  */
47499
47500int
47501main ()
47502{
47503return 0;
47504  ;
47505  return 0;
47506}
47507_ACEOF
47508if ac_fn_cxx_try_link "$LINENO"; then :
47509  has_dynamic_libstdcxx=yes
47510else
47511  has_dynamic_libstdcxx=no
47512fi
47513rm -f core conftest.err conftest.$ac_objext \
47514    conftest$ac_exeext conftest.$ac_ext
47515    CXXFLAGS="$OLD_CXXFLAGS"
47516    ac_ext=cpp
47517ac_cpp='$CXXCPP $CPPFLAGS'
47518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47521
47522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47523$as_echo "$has_dynamic_libstdcxx" >&6; }
47524
47525    # Test if stdc++ can be linked statically.
47526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47527$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47528    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47529    ac_ext=cpp
47530ac_cpp='$CXXCPP $CPPFLAGS'
47531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47534
47535    OLD_LIBS="$LIBS"
47536    OLD_CXX="$CXX"
47537    LIBS="$STATIC_STDCXX_FLAGS"
47538    CXX="$CC"
47539    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47540/* end confdefs.h.  */
47541
47542int
47543main ()
47544{
47545return 0;
47546  ;
47547  return 0;
47548}
47549_ACEOF
47550if ac_fn_cxx_try_link "$LINENO"; then :
47551  has_static_libstdcxx=yes
47552else
47553  has_static_libstdcxx=no
47554fi
47555rm -f core conftest.err conftest.$ac_objext \
47556    conftest$ac_exeext conftest.$ac_ext
47557    LIBS="$OLD_LIBS"
47558    CXX="$OLD_CXX"
47559    ac_ext=cpp
47560ac_cpp='$CXXCPP $CPPFLAGS'
47561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47564
47565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47566$as_echo "$has_static_libstdcxx" >&6; }
47567
47568    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47569      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47570    fi
47571
47572    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47573      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47574    fi
47575
47576    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47577      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47578    fi
47579
47580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47581$as_echo_n "checking how to link with libstdc++... " >&6; }
47582    # If dynamic was requested, it's available since it would fail above otherwise.
47583    # If dynamic wasn't requested, go with static unless it isn't available.
47584    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47585      LIBCXX="$LIBCXX -lstdc++"
47586      LDCXX="$CXX"
47587      STATIC_CXX_SETTING="STATIC_CXX=false"
47588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47589$as_echo "dynamic" >&6; }
47590    else
47591      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47592      LDCXX="$CC"
47593      STATIC_CXX_SETTING="STATIC_CXX=true"
47594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47595$as_echo "static" >&6; }
47596    fi
47597  fi
47598
47599
47600  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47601    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47602
47603pkg_failed=no
47604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47605$as_echo_n "checking for LIBFFI... " >&6; }
47606
47607if test -n "$LIBFFI_CFLAGS"; then
47608    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47609 elif test -n "$PKG_CONFIG"; then
47610    if test -n "$PKG_CONFIG" && \
47611    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47612  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47613  ac_status=$?
47614  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47615  test $ac_status = 0; }; then
47616  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47617else
47618  pkg_failed=yes
47619fi
47620 else
47621    pkg_failed=untried
47622fi
47623if test -n "$LIBFFI_LIBS"; then
47624    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47625 elif test -n "$PKG_CONFIG"; then
47626    if test -n "$PKG_CONFIG" && \
47627    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47628  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47629  ac_status=$?
47630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47631  test $ac_status = 0; }; then
47632  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47633else
47634  pkg_failed=yes
47635fi
47636 else
47637    pkg_failed=untried
47638fi
47639
47640
47641
47642if test $pkg_failed = yes; then
47643
47644if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47645        _pkg_short_errors_supported=yes
47646else
47647        _pkg_short_errors_supported=no
47648fi
47649        if test $_pkg_short_errors_supported = yes; then
47650	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47651        else
47652	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47653        fi
47654	# Put the nasty error message in config.log where it belongs
47655	echo "$LIBFFI_PKG_ERRORS" >&5
47656
47657	as_fn_error $? "Package requirements (libffi) were not met:
47658
47659$LIBFFI_PKG_ERRORS
47660
47661Consider adjusting the PKG_CONFIG_PATH environment variable if you
47662installed software in a non-standard prefix.
47663
47664Alternatively, you may set the environment variables LIBFFI_CFLAGS
47665and LIBFFI_LIBS to avoid the need to call pkg-config.
47666See the pkg-config man page for more details.
47667" "$LINENO" 5
47668elif test $pkg_failed = untried; then
47669	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47671as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47672is in your PATH or set the PKG_CONFIG environment variable to the full
47673path to pkg-config.
47674
47675Alternatively, you may set the environment variables LIBFFI_CFLAGS
47676and LIBFFI_LIBS to avoid the need to call pkg-config.
47677See the pkg-config man page for more details.
47678
47679To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47680See \`config.log' for more details" "$LINENO" 5; }
47681else
47682	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47683	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47685$as_echo "yes" >&6; }
47686	:
47687fi
47688
47689  fi
47690
47691  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47692    # Extract the first word of "llvm-config", so it can be a program name with args.
47693set dummy llvm-config; ac_word=$2
47694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47695$as_echo_n "checking for $ac_word... " >&6; }
47696if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47697  $as_echo_n "(cached) " >&6
47698else
47699  if test -n "$LLVM_CONFIG"; then
47700  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47701else
47702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47703for as_dir in $PATH
47704do
47705  IFS=$as_save_IFS
47706  test -z "$as_dir" && as_dir=.
47707    for ac_exec_ext in '' $ac_executable_extensions; do
47708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47709    ac_cv_prog_LLVM_CONFIG="llvm-config"
47710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47711    break 2
47712  fi
47713done
47714  done
47715IFS=$as_save_IFS
47716
47717fi
47718fi
47719LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47720if test -n "$LLVM_CONFIG"; then
47721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47722$as_echo "$LLVM_CONFIG" >&6; }
47723else
47724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47725$as_echo "no" >&6; }
47726fi
47727
47728
47729
47730    if test "x$LLVM_CONFIG" != xllvm-config; then
47731      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47732    fi
47733
47734    llvm_components="jit mcjit engine nativecodegen native"
47735    unset LLVM_CFLAGS
47736    for flag in $("$LLVM_CONFIG" --cxxflags); do
47737      if echo "${flag}" | grep -q '^-[ID]'; then
47738        if test "${flag}" != "-D_DEBUG" ; then
47739          if test "${LLVM_CFLAGS}" != "" ; then
47740            LLVM_CFLAGS="${LLVM_CFLAGS} "
47741          fi
47742          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47743        fi
47744      fi
47745    done
47746    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47747    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47748
47749    unset LLVM_LDFLAGS
47750    for flag in $("${LLVM_CONFIG}" --ldflags); do
47751      if echo "${flag}" | grep -q '^-L'; then
47752        if test "${LLVM_LDFLAGS}" != ""; then
47753          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47754        fi
47755        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47756      fi
47757    done
47758
47759    unset LLVM_LIBS
47760    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47761      if echo "${flag}" | grep -q '^-l'; then
47762        if test "${LLVM_LIBS}" != ""; then
47763          LLVM_LIBS="${LLVM_LIBS} "
47764        fi
47765        LLVM_LIBS="${LLVM_LIBS}${flag}"
47766      fi
47767    done
47768
47769
47770
47771
47772  fi
47773
47774  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47775  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
47776    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47777  fi
47778
47779  # TODO better (platform agnostic) test
47780  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
47781    LIBCXX="-lstdc++"
47782  fi
47783
47784
47785
47786
47787
47788###############################################################################
47789#
47790# We need to do some final tweaking, when everything else is done.
47791#
47792###############################################################################
47793
47794
47795  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47796
47797
47798  # The name of the Service Agent jar.
47799  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47800  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47801    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47802  fi
47803
47804
47805
47806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47807$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47808
47809    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47810      ENABLE_INTREE_EC=yes
47811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47812$as_echo "yes" >&6; }
47813    else
47814      ENABLE_INTREE_EC=no
47815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47816$as_echo "no" >&6; }
47817    fi
47818
47819
47820
47821
47822###############################################################################
47823#
47824# Configure parts of the build that only affect the build performance,
47825# not the result.
47826#
47827###############################################################################
47828
47829
47830  # How many cores do we have on this build system?
47831
47832# Check whether --with-num-cores was given.
47833if test "${with_num_cores+set}" = set; then :
47834  withval=$with_num_cores;
47835fi
47836
47837  if test "x$with_num_cores" = x; then
47838    # The number of cores were not specified, try to probe them.
47839
47840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47841$as_echo_n "checking for number of cores... " >&6; }
47842  NUM_CORES=1
47843  FOUND_CORES=no
47844
47845  if test -f /proc/cpuinfo; then
47846    # Looks like a Linux (or cygwin) system
47847    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47848    FOUND_CORES=yes
47849  elif test -x /usr/sbin/psrinfo; then
47850    # Looks like a Solaris system
47851    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47852    FOUND_CORES=yes
47853  elif test -x /usr/sbin/system_profiler; then
47854    # Looks like a MacOSX system
47855    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47856    FOUND_CORES=yes
47857  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47858    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47859    FOUND_CORES=yes
47860  elif test -n "$NUMBER_OF_PROCESSORS"; then
47861    # On windows, look in the env
47862    NUM_CORES=$NUMBER_OF_PROCESSORS
47863    FOUND_CORES=yes
47864  fi
47865
47866  if test "x$FOUND_CORES" = xyes; then
47867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47868$as_echo "$NUM_CORES" >&6; }
47869  else
47870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47871$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47873$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47874  fi
47875
47876  else
47877    NUM_CORES=$with_num_cores
47878  fi
47879
47880
47881
47882  # How much memory do we have on this build system?
47883
47884# Check whether --with-memory-size was given.
47885if test "${with_memory_size+set}" = set; then :
47886  withval=$with_memory_size;
47887fi
47888
47889  if test "x$with_memory_size" = x; then
47890    # The memory size was not specified, try to probe it.
47891
47892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47893$as_echo_n "checking for memory size... " >&6; }
47894  # Default to 1024 MB
47895  MEMORY_SIZE=1024
47896  FOUND_MEM=no
47897
47898  if test -f /proc/meminfo; then
47899    # Looks like a Linux (or cygwin) system
47900    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47901    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47902    FOUND_MEM=yes
47903  elif test -x /usr/sbin/prtconf; then
47904    # Looks like a Solaris or AIX system
47905    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47906    FOUND_MEM=yes
47907  elif test -x /usr/sbin/system_profiler; then
47908    # Looks like a MacOSX system
47909    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47910    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47911    FOUND_MEM=yes
47912  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47913    # Windows, but without cygwin
47914    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47915    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47916    FOUND_MEM=yes
47917  fi
47918
47919  if test "x$FOUND_MEM" = xyes; then
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47921$as_echo "$MEMORY_SIZE MB" >&6; }
47922  else
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47924$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47925    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47926$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47927  fi
47928
47929  else
47930    MEMORY_SIZE=$with_memory_size
47931  fi
47932
47933
47934
47935  # Provide a decent default number of parallel jobs for make depending on
47936  # number of cores, amount of memory and machine architecture.
47937
47938# Check whether --with-jobs was given.
47939if test "${with_jobs+set}" = set; then :
47940  withval=$with_jobs;
47941fi
47942
47943  if test "x$with_jobs" = x; then
47944    # Number of jobs was not specified, calculate.
47945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47946$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47947    # Approximate memory in GB, rounding up a bit.
47948    memory_gb=`expr $MEMORY_SIZE / 1100`
47949    # Pick the lowest of memory in gb and number of cores.
47950    if test "$memory_gb" -lt "$NUM_CORES"; then
47951      JOBS="$memory_gb"
47952    else
47953      JOBS="$NUM_CORES"
47954      # On bigger machines, leave some room for other processes to run
47955      if test "$JOBS" -gt "4"; then
47956        JOBS=`expr $JOBS '*' 90 / 100`
47957      fi
47958    fi
47959    # Cap number of jobs to 16
47960    if test "$JOBS" -gt "16"; then
47961      JOBS=16
47962    fi
47963    if test "$JOBS" -eq "0"; then
47964      JOBS=1
47965    fi
47966    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47967$as_echo "$JOBS" >&6; }
47968  else
47969    JOBS=$with_jobs
47970  fi
47971
47972
47973
47974# Setup smart javac (after cores and memory have been setup)
47975
47976
47977# Check whether --with-sjavac-server-java was given.
47978if test "${with_sjavac_server_java+set}" = set; then :
47979  withval=$with_sjavac_server_java;
47980fi
47981
47982
47983  if test "x$with_sjavac_server_java" != x; then
47984    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
47985    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
47986    if test "x$FOUND_VERSION" = x; then
47987      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
47988    fi
47989  else
47990    SJAVAC_SERVER_JAVA=""
47991    # Hotspot specific options.
47992
47993  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
47994  $ECHO "Command: $JAVA -verbosegc -version" >&5
47995  OUTPUT=`$JAVA -verbosegc -version 2>&1`
47996  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
47997  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
47998  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
47999    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48000    JVM_ARG_OK=true
48001  else
48002    $ECHO "Arg failed:" >&5
48003    $ECHO "$OUTPUT" >&5
48004    JVM_ARG_OK=false
48005  fi
48006
48007    # JRockit specific options.
48008
48009  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48010  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48011  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48012  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48013  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48014  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48015    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48016    JVM_ARG_OK=true
48017  else
48018    $ECHO "Arg failed:" >&5
48019    $ECHO "$OUTPUT" >&5
48020    JVM_ARG_OK=false
48021  fi
48022
48023    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48024  fi
48025
48026
48027  if test "$MEMORY_SIZE" -gt "2500"; then
48028
48029  $ECHO "Check if jvm arg is ok: -d64" >&5
48030  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48031  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48032  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48033  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48034  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48035    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48036    JVM_ARG_OK=true
48037  else
48038    $ECHO "Arg failed:" >&5
48039    $ECHO "$OUTPUT" >&5
48040    JVM_ARG_OK=false
48041  fi
48042
48043    if test "$JVM_ARG_OK" = true; then
48044      JVM_64BIT=true
48045      JVM_ARG_OK=false
48046    fi
48047  fi
48048
48049  if test "$JVM_64BIT" = true; then
48050    if test "$MEMORY_SIZE" -gt "17000"; then
48051
48052  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48053  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48054  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48055  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48056  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48057  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48058    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48059    JVM_ARG_OK=true
48060  else
48061    $ECHO "Arg failed:" >&5
48062    $ECHO "$OUTPUT" >&5
48063    JVM_ARG_OK=false
48064  fi
48065
48066    fi
48067    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48068
48069  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48070  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48071  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48072  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48073  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48074  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48075    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48076    JVM_ARG_OK=true
48077  else
48078    $ECHO "Arg failed:" >&5
48079    $ECHO "$OUTPUT" >&5
48080    JVM_ARG_OK=false
48081  fi
48082
48083    fi
48084    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48085
48086  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48087  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48088  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48089  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48090  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48091  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48092    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48093    JVM_ARG_OK=true
48094  else
48095    $ECHO "Arg failed:" >&5
48096    $ECHO "$OUTPUT" >&5
48097    JVM_ARG_OK=false
48098  fi
48099
48100    fi
48101    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48102
48103  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48104  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48105  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48106  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48107  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48108  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48109    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48110    JVM_ARG_OK=true
48111  else
48112    $ECHO "Arg failed:" >&5
48113    $ECHO "$OUTPUT" >&5
48114    JVM_ARG_OK=false
48115  fi
48116
48117    fi
48118  fi
48119  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48120
48121  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48122  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48123  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48124  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48125  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48126  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48127    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48128    JVM_ARG_OK=true
48129  else
48130    $ECHO "Arg failed:" >&5
48131    $ECHO "$OUTPUT" >&5
48132    JVM_ARG_OK=false
48133  fi
48134
48135  fi
48136  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48137
48138  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48139  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48140  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48141  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48142  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48143  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48144    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48145    JVM_ARG_OK=true
48146  else
48147    $ECHO "Arg failed:" >&5
48148    $ECHO "$OUTPUT" >&5
48149    JVM_ARG_OK=false
48150  fi
48151
48152  fi
48153  if test "$JVM_ARG_OK" = false; then
48154
48155  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48156  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48157  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48158  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48159  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48160  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48161    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48162    JVM_ARG_OK=true
48163  else
48164    $ECHO "Arg failed:" >&5
48165    $ECHO "$OUTPUT" >&5
48166    JVM_ARG_OK=false
48167  fi
48168
48169  fi
48170
48171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48172$as_echo_n "checking whether to use sjavac... " >&6; }
48173  # Check whether --enable-sjavac was given.
48174if test "${enable_sjavac+set}" = set; then :
48175  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48176else
48177  ENABLE_SJAVAC='no'
48178fi
48179
48180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48181$as_echo "$ENABLE_SJAVAC" >&6; }
48182
48183
48184  if test "x$ENABLE_SJAVAC" = xyes; then
48185    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48186  else
48187    SJAVAC_SERVER_DIR=
48188  fi
48189
48190
48191
48192# Can the C/C++ compiler use precompiled headers?
48193
48194
48195  ###############################################################################
48196  #
48197  # Can the C/C++ compiler use precompiled headers?
48198  #
48199  # Check whether --enable-precompiled-headers was given.
48200if test "${enable_precompiled_headers+set}" = set; then :
48201  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48202else
48203  ENABLE_PRECOMPH=yes
48204fi
48205
48206
48207  USE_PRECOMPILED_HEADER=1
48208  if test "x$ENABLE_PRECOMPH" = xno; then
48209    USE_PRECOMPILED_HEADER=0
48210  fi
48211
48212  if test "x$ENABLE_PRECOMPH" = xyes; then
48213    # Check that the compiler actually supports precomp headers.
48214    if test "x$GCC" = xyes; then
48215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48216$as_echo_n "checking that precompiled headers work... " >&6; }
48217      echo "int alfa();" > conftest.h
48218      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48219      if test ! -f conftest.hpp.gch; then
48220        USE_PRECOMPILED_HEADER=0
48221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48222$as_echo "no" >&6; }
48223      else
48224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48225$as_echo "yes" >&6; }
48226      fi
48227      rm -f conftest.h conftest.hpp.gch
48228    fi
48229  fi
48230
48231
48232
48233
48234# Setup use of ccache, if available
48235
48236  # Check whether --enable-ccache was given.
48237if test "${enable_ccache+set}" = set; then :
48238  enableval=$enable_ccache;
48239fi
48240
48241
48242  CCACHE=
48243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48244$as_echo_n "checking is ccache enabled... " >&6; }
48245  ENABLE_CCACHE=$enable_ccache
48246  if test "x$enable_ccache" = xyes; then
48247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48248$as_echo "yes" >&6; }
48249    OLD_PATH="$PATH"
48250    if test "x$TOOLS_DIR" != x; then
48251      PATH=$TOOLS_DIR:$PATH
48252    fi
48253
48254
48255
48256  # Publish this variable in the help.
48257
48258
48259  if test "x$CCACHE" = x; then
48260    # The variable is not set by user, try to locate tool using the code snippet
48261    for ac_prog in ccache
48262do
48263  # Extract the first word of "$ac_prog", so it can be a program name with args.
48264set dummy $ac_prog; ac_word=$2
48265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48266$as_echo_n "checking for $ac_word... " >&6; }
48267if ${ac_cv_path_CCACHE+:} false; then :
48268  $as_echo_n "(cached) " >&6
48269else
48270  case $CCACHE in
48271  [\\/]* | ?:[\\/]*)
48272  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48273  ;;
48274  *)
48275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48276for as_dir in $PATH
48277do
48278  IFS=$as_save_IFS
48279  test -z "$as_dir" && as_dir=.
48280    for ac_exec_ext in '' $ac_executable_extensions; do
48281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48282    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48284    break 2
48285  fi
48286done
48287  done
48288IFS=$as_save_IFS
48289
48290  ;;
48291esac
48292fi
48293CCACHE=$ac_cv_path_CCACHE
48294if test -n "$CCACHE"; then
48295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48296$as_echo "$CCACHE" >&6; }
48297else
48298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48299$as_echo "no" >&6; }
48300fi
48301
48302
48303  test -n "$CCACHE" && break
48304done
48305
48306  else
48307    # The variable is set, but is it from the command line or the environment?
48308
48309    # Try to remove the string !CCACHE! from our list.
48310    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48311    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48312      # If it failed, the variable was not from the command line. Ignore it,
48313      # but warn the user (except for BASH, which is always set by the calling BASH).
48314      if test "xCCACHE" != xBASH; then
48315        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48316$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48317      fi
48318      # Try to locate tool using the code snippet
48319      for ac_prog in ccache
48320do
48321  # Extract the first word of "$ac_prog", so it can be a program name with args.
48322set dummy $ac_prog; ac_word=$2
48323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48324$as_echo_n "checking for $ac_word... " >&6; }
48325if ${ac_cv_path_CCACHE+:} false; then :
48326  $as_echo_n "(cached) " >&6
48327else
48328  case $CCACHE in
48329  [\\/]* | ?:[\\/]*)
48330  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48331  ;;
48332  *)
48333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48334for as_dir in $PATH
48335do
48336  IFS=$as_save_IFS
48337  test -z "$as_dir" && as_dir=.
48338    for ac_exec_ext in '' $ac_executable_extensions; do
48339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48340    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48342    break 2
48343  fi
48344done
48345  done
48346IFS=$as_save_IFS
48347
48348  ;;
48349esac
48350fi
48351CCACHE=$ac_cv_path_CCACHE
48352if test -n "$CCACHE"; then
48353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48354$as_echo "$CCACHE" >&6; }
48355else
48356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48357$as_echo "no" >&6; }
48358fi
48359
48360
48361  test -n "$CCACHE" && break
48362done
48363
48364    else
48365      # If it succeeded, then it was overridden by the user. We will use it
48366      # for the tool.
48367
48368      # First remove it from the list of overridden variables, so we can test
48369      # for unknown variables in the end.
48370      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48371
48372      # Check if the provided tool contains a complete path.
48373      tool_specified="$CCACHE"
48374      tool_basename="${tool_specified##*/}"
48375      if test "x$tool_basename" = "x$tool_specified"; then
48376        # A command without a complete path is provided, search $PATH.
48377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48378$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48379        # Extract the first word of "$tool_basename", so it can be a program name with args.
48380set dummy $tool_basename; ac_word=$2
48381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48382$as_echo_n "checking for $ac_word... " >&6; }
48383if ${ac_cv_path_CCACHE+:} false; then :
48384  $as_echo_n "(cached) " >&6
48385else
48386  case $CCACHE in
48387  [\\/]* | ?:[\\/]*)
48388  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48389  ;;
48390  *)
48391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48392for as_dir in $PATH
48393do
48394  IFS=$as_save_IFS
48395  test -z "$as_dir" && as_dir=.
48396    for ac_exec_ext in '' $ac_executable_extensions; do
48397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48398    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48400    break 2
48401  fi
48402done
48403  done
48404IFS=$as_save_IFS
48405
48406  ;;
48407esac
48408fi
48409CCACHE=$ac_cv_path_CCACHE
48410if test -n "$CCACHE"; then
48411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48412$as_echo "$CCACHE" >&6; }
48413else
48414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48415$as_echo "no" >&6; }
48416fi
48417
48418
48419        if test "x$CCACHE" = x; then
48420          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48421        fi
48422      else
48423        # Otherwise we believe it is a complete path. Use it as it is.
48424        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48425$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48427$as_echo_n "checking for CCACHE... " >&6; }
48428        if test ! -x "$tool_specified"; then
48429          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48430$as_echo "not found" >&6; }
48431          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48432        fi
48433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48434$as_echo "$tool_specified" >&6; }
48435      fi
48436    fi
48437  fi
48438
48439
48440
48441  if test "x$CCACHE" = x; then
48442    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48443  fi
48444
48445
48446    CCACHE_STATUS="enabled"
48447    PATH="$OLD_PATH"
48448  elif test "x$enable_ccache" = xno; then
48449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48450$as_echo "no, explicitly disabled" >&6; }
48451  elif test "x$enable_ccache" = x; then
48452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48453$as_echo "no" >&6; }
48454  else
48455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48456$as_echo "unknown" >&6; }
48457    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48458  fi
48459
48460
48461
48462# Check whether --with-ccache-dir was given.
48463if test "${with_ccache_dir+set}" = set; then :
48464  withval=$with_ccache_dir;
48465fi
48466
48467
48468  if test "x$with_ccache_dir" != x; then
48469    # When using a non home ccache directory, assume the use is to share ccache files
48470    # with other users. Thus change the umask.
48471    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48472    if test "x$CCACHE" = x; then
48473      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48474$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48475    fi
48476  fi
48477
48478  if test "x$CCACHE" != x; then
48479
48480  if test "x$CCACHE" != x; then
48481    # Only use ccache if it is 3.1.4 or later, which supports
48482    # precompiled headers.
48483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48484$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48485    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48486    if test "x$HAS_GOOD_CCACHE" = x; then
48487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48488$as_echo "no, disabling ccache" >&6; }
48489      CCACHE=
48490      CCACHE_STATUS="disabled"
48491    else
48492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48493$as_echo "yes" >&6; }
48494      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48495$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48496      PUSHED_FLAGS="$CXXFLAGS"
48497      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48498      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48499/* end confdefs.h.  */
48500
48501int
48502main ()
48503{
48504
48505  ;
48506  return 0;
48507}
48508_ACEOF
48509if ac_fn_cxx_try_compile "$LINENO"; then :
48510  CC_KNOWS_CCACHE_TRICK=yes
48511else
48512  CC_KNOWS_CCACHE_TRICK=no
48513fi
48514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48515      CXXFLAGS="$PUSHED_FLAGS"
48516      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48518$as_echo "yes" >&6; }
48519      else
48520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48521$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48522        CCACHE=
48523        CCACHE_STATUS="disabled"
48524      fi
48525    fi
48526  fi
48527
48528  if test "x$CCACHE" != x; then
48529    CCACHE_SLOPPINESS=time_macros
48530    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48531    CCACHE_FLAGS=-fpch-preprocess
48532
48533    if test "x$SET_CCACHE_DIR" != x; then
48534      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48535      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48536    fi
48537  fi
48538
48539  fi
48540
48541
48542###############################################################################
48543#
48544# And now the finish...
48545#
48546###############################################################################
48547
48548# Check for some common pitfalls
48549
48550  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48551    file_to_test="$SRC_ROOT/LICENSE"
48552    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48553      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
48554    fi
48555  fi
48556
48557
48558  # Did user specify any unknown variables?
48559
48560  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48561    # Replace the separating ! with spaces before presenting for end user.
48562    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48563    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48564$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48565  fi
48566
48567
48568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48569$as_echo_n "checking if build directory is on local disk... " >&6; }
48570
48571  # df -l lists only local disks; if the given directory is not found then
48572  # a non-zero exit code is given
48573  if test "x$DF" = x; then
48574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48575      # msys does not have df; use Windows "net use" instead.
48576      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48577      if test "x$IS_NETWORK_DISK" = x; then
48578        OUTPUT_DIR_IS_LOCAL="yes"
48579      else
48580        OUTPUT_DIR_IS_LOCAL="no"
48581      fi
48582    else
48583      # No df here, say it's local
48584      OUTPUT_DIR_IS_LOCAL="yes"
48585    fi
48586  else
48587    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48588      OUTPUT_DIR_IS_LOCAL="yes"
48589    else
48590      OUTPUT_DIR_IS_LOCAL="no"
48591    fi
48592  fi
48593
48594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48595$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48596
48597
48598
48599  # Check if the user has any old-style ALT_ variables set.
48600  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48601
48602  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48603  # Since we can't properly handle the dependencies for this, warn the user about the situation
48604  if test -e $OUTPUT_ROOT/spec.gmk; then
48605    IS_RECONFIGURE=yes
48606  else
48607    IS_RECONFIGURE=no
48608  fi
48609
48610
48611# At the end, call the custom hook. (Dummy macro if no custom sources available)
48612
48613
48614# We're messing a bit with internal autoconf variables to put the config.status
48615# in the output directory instead of the current directory.
48616CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48617
48618# Create the actual output files. Now the main work of configure is done.
48619cat >confcache <<\_ACEOF
48620# This file is a shell script that caches the results of configure
48621# tests run on this system so they can be shared between configure
48622# scripts and configure runs, see configure's option --config-cache.
48623# It is not useful on other systems.  If it contains results you don't
48624# want to keep, you may remove or edit it.
48625#
48626# config.status only pays attention to the cache file if you give it
48627# the --recheck option to rerun configure.
48628#
48629# `ac_cv_env_foo' variables (set or unset) will be overridden when
48630# loading this file, other *unset* `ac_cv_foo' will be assigned the
48631# following values.
48632
48633_ACEOF
48634
48635# The following way of writing the cache mishandles newlines in values,
48636# but we know of no workaround that is simple, portable, and efficient.
48637# So, we kill variables containing newlines.
48638# Ultrix sh set writes to stderr and can't be redirected directly,
48639# and sets the high bit in the cache file unless we assign to the vars.
48640(
48641  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48642    eval ac_val=\$$ac_var
48643    case $ac_val in #(
48644    *${as_nl}*)
48645      case $ac_var in #(
48646      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48647$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48648      esac
48649      case $ac_var in #(
48650      _ | IFS | as_nl) ;; #(
48651      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48652      *) { eval $ac_var=; unset $ac_var;} ;;
48653      esac ;;
48654    esac
48655  done
48656
48657  (set) 2>&1 |
48658    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48659    *${as_nl}ac_space=\ *)
48660      # `set' does not quote correctly, so add quotes: double-quote
48661      # substitution turns \\\\ into \\, and sed turns \\ into \.
48662      sed -n \
48663	"s/'/'\\\\''/g;
48664	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48665      ;; #(
48666    *)
48667      # `set' quotes correctly as required by POSIX, so do not add quotes.
48668      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48669      ;;
48670    esac |
48671    sort
48672) |
48673  sed '
48674     /^ac_cv_env_/b end
48675     t clear
48676     :clear
48677     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48678     t end
48679     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48680     :end' >>confcache
48681if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48682  if test -w "$cache_file"; then
48683    if test "x$cache_file" != "x/dev/null"; then
48684      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48685$as_echo "$as_me: updating cache $cache_file" >&6;}
48686      if test ! -f "$cache_file" || test -h "$cache_file"; then
48687	cat confcache >"$cache_file"
48688      else
48689        case $cache_file in #(
48690        */* | ?:*)
48691	  mv -f confcache "$cache_file"$$ &&
48692	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48693        *)
48694	  mv -f confcache "$cache_file" ;;
48695	esac
48696      fi
48697    fi
48698  else
48699    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48700$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48701  fi
48702fi
48703rm -f confcache
48704
48705test "x$prefix" = xNONE && prefix=$ac_default_prefix
48706# Let make expand exec_prefix.
48707test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48708
48709DEFS=-DHAVE_CONFIG_H
48710
48711ac_libobjs=
48712ac_ltlibobjs=
48713U=
48714for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48715  # 1. Remove the extension, and $U if already installed.
48716  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48717  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48718  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48719  #    will be set to the directory where LIBOBJS objects are built.
48720  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48721  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48722done
48723LIBOBJS=$ac_libobjs
48724
48725LTLIBOBJS=$ac_ltlibobjs
48726
48727
48728
48729: "${CONFIG_STATUS=./config.status}"
48730ac_write_fail=0
48731ac_clean_files_save=$ac_clean_files
48732ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48733{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48734$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48735as_write_fail=0
48736cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48737#! $SHELL
48738# Generated by $as_me.
48739# Run this file to recreate the current configuration.
48740# Compiler output produced by configure, useful for debugging
48741# configure, is in config.log if it exists.
48742
48743debug=false
48744ac_cs_recheck=false
48745ac_cs_silent=false
48746
48747SHELL=\${CONFIG_SHELL-$SHELL}
48748export SHELL
48749_ASEOF
48750cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48751## -------------------- ##
48752## M4sh Initialization. ##
48753## -------------------- ##
48754
48755# Be more Bourne compatible
48756DUALCASE=1; export DUALCASE # for MKS sh
48757if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48758  emulate sh
48759  NULLCMD=:
48760  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48761  # is contrary to our usage.  Disable this feature.
48762  alias -g '${1+"$@"}'='"$@"'
48763  setopt NO_GLOB_SUBST
48764else
48765  case `(set -o) 2>/dev/null` in #(
48766  *posix*) :
48767    set -o posix ;; #(
48768  *) :
48769     ;;
48770esac
48771fi
48772
48773
48774as_nl='
48775'
48776export as_nl
48777# Printing a long string crashes Solaris 7 /usr/bin/printf.
48778as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48779as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48780as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48781# Prefer a ksh shell builtin over an external printf program on Solaris,
48782# but without wasting forks for bash or zsh.
48783if test -z "$BASH_VERSION$ZSH_VERSION" \
48784    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48785  as_echo='print -r --'
48786  as_echo_n='print -rn --'
48787elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48788  as_echo='printf %s\n'
48789  as_echo_n='printf %s'
48790else
48791  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48792    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48793    as_echo_n='/usr/ucb/echo -n'
48794  else
48795    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48796    as_echo_n_body='eval
48797      arg=$1;
48798      case $arg in #(
48799      *"$as_nl"*)
48800	expr "X$arg" : "X\\(.*\\)$as_nl";
48801	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48802      esac;
48803      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48804    '
48805    export as_echo_n_body
48806    as_echo_n='sh -c $as_echo_n_body as_echo'
48807  fi
48808  export as_echo_body
48809  as_echo='sh -c $as_echo_body as_echo'
48810fi
48811
48812# The user is always right.
48813if test "${PATH_SEPARATOR+set}" != set; then
48814  PATH_SEPARATOR=:
48815  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48816    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48817      PATH_SEPARATOR=';'
48818  }
48819fi
48820
48821
48822# IFS
48823# We need space, tab and new line, in precisely that order.  Quoting is
48824# there to prevent editors from complaining about space-tab.
48825# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48826# splitting by setting IFS to empty value.)
48827IFS=" ""	$as_nl"
48828
48829# Find who we are.  Look in the path if we contain no directory separator.
48830as_myself=
48831case $0 in #((
48832  *[\\/]* ) as_myself=$0 ;;
48833  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48834for as_dir in $PATH
48835do
48836  IFS=$as_save_IFS
48837  test -z "$as_dir" && as_dir=.
48838    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48839  done
48840IFS=$as_save_IFS
48841
48842     ;;
48843esac
48844# We did not find ourselves, most probably we were run as `sh COMMAND'
48845# in which case we are not to be found in the path.
48846if test "x$as_myself" = x; then
48847  as_myself=$0
48848fi
48849if test ! -f "$as_myself"; then
48850  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48851  exit 1
48852fi
48853
48854# Unset variables that we do not need and which cause bugs (e.g. in
48855# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48856# suppresses any "Segmentation fault" message there.  '((' could
48857# trigger a bug in pdksh 5.2.14.
48858for as_var in BASH_ENV ENV MAIL MAILPATH
48859do eval test x\${$as_var+set} = xset \
48860  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48861done
48862PS1='$ '
48863PS2='> '
48864PS4='+ '
48865
48866# NLS nuisances.
48867LC_ALL=C
48868export LC_ALL
48869LANGUAGE=C
48870export LANGUAGE
48871
48872# CDPATH.
48873(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48874
48875
48876# as_fn_error STATUS ERROR [LINENO LOG_FD]
48877# ----------------------------------------
48878# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48879# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48880# script with STATUS, using 1 if that was 0.
48881as_fn_error ()
48882{
48883  as_status=$1; test $as_status -eq 0 && as_status=1
48884  if test "$4"; then
48885    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48886    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48887  fi
48888  $as_echo "$as_me: error: $2" >&2
48889  as_fn_exit $as_status
48890} # as_fn_error
48891
48892
48893# as_fn_set_status STATUS
48894# -----------------------
48895# Set $? to STATUS, without forking.
48896as_fn_set_status ()
48897{
48898  return $1
48899} # as_fn_set_status
48900
48901# as_fn_exit STATUS
48902# -----------------
48903# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48904as_fn_exit ()
48905{
48906  set +e
48907  as_fn_set_status $1
48908  exit $1
48909} # as_fn_exit
48910
48911# as_fn_unset VAR
48912# ---------------
48913# Portably unset VAR.
48914as_fn_unset ()
48915{
48916  { eval $1=; unset $1;}
48917}
48918as_unset=as_fn_unset
48919# as_fn_append VAR VALUE
48920# ----------------------
48921# Append the text in VALUE to the end of the definition contained in VAR. Take
48922# advantage of any shell optimizations that allow amortized linear growth over
48923# repeated appends, instead of the typical quadratic growth present in naive
48924# implementations.
48925if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48926  eval 'as_fn_append ()
48927  {
48928    eval $1+=\$2
48929  }'
48930else
48931  as_fn_append ()
48932  {
48933    eval $1=\$$1\$2
48934  }
48935fi # as_fn_append
48936
48937# as_fn_arith ARG...
48938# ------------------
48939# Perform arithmetic evaluation on the ARGs, and store the result in the
48940# global $as_val. Take advantage of shells that can avoid forks. The arguments
48941# must be portable across $(()) and expr.
48942if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48943  eval 'as_fn_arith ()
48944  {
48945    as_val=$(( $* ))
48946  }'
48947else
48948  as_fn_arith ()
48949  {
48950    as_val=`expr "$@" || test $? -eq 1`
48951  }
48952fi # as_fn_arith
48953
48954
48955if expr a : '\(a\)' >/dev/null 2>&1 &&
48956   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48957  as_expr=expr
48958else
48959  as_expr=false
48960fi
48961
48962if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48963  as_basename=basename
48964else
48965  as_basename=false
48966fi
48967
48968if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48969  as_dirname=dirname
48970else
48971  as_dirname=false
48972fi
48973
48974as_me=`$as_basename -- "$0" ||
48975$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48976	 X"$0" : 'X\(//\)$' \| \
48977	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48978$as_echo X/"$0" |
48979    sed '/^.*\/\([^/][^/]*\)\/*$/{
48980	    s//\1/
48981	    q
48982	  }
48983	  /^X\/\(\/\/\)$/{
48984	    s//\1/
48985	    q
48986	  }
48987	  /^X\/\(\/\).*/{
48988	    s//\1/
48989	    q
48990	  }
48991	  s/.*/./; q'`
48992
48993# Avoid depending upon Character Ranges.
48994as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48995as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48996as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48997as_cr_digits='0123456789'
48998as_cr_alnum=$as_cr_Letters$as_cr_digits
48999
49000ECHO_C= ECHO_N= ECHO_T=
49001case `echo -n x` in #(((((
49002-n*)
49003  case `echo 'xy\c'` in
49004  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49005  xy)  ECHO_C='\c';;
49006  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49007       ECHO_T='	';;
49008  esac;;
49009*)
49010  ECHO_N='-n';;
49011esac
49012
49013rm -f conf$$ conf$$.exe conf$$.file
49014if test -d conf$$.dir; then
49015  rm -f conf$$.dir/conf$$.file
49016else
49017  rm -f conf$$.dir
49018  mkdir conf$$.dir 2>/dev/null
49019fi
49020if (echo >conf$$.file) 2>/dev/null; then
49021  if ln -s conf$$.file conf$$ 2>/dev/null; then
49022    as_ln_s='ln -s'
49023    # ... but there are two gotchas:
49024    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49025    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49026    # In both cases, we have to default to `cp -pR'.
49027    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49028      as_ln_s='cp -pR'
49029  elif ln conf$$.file conf$$ 2>/dev/null; then
49030    as_ln_s=ln
49031  else
49032    as_ln_s='cp -pR'
49033  fi
49034else
49035  as_ln_s='cp -pR'
49036fi
49037rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49038rmdir conf$$.dir 2>/dev/null
49039
49040
49041# as_fn_mkdir_p
49042# -------------
49043# Create "$as_dir" as a directory, including parents if necessary.
49044as_fn_mkdir_p ()
49045{
49046
49047  case $as_dir in #(
49048  -*) as_dir=./$as_dir;;
49049  esac
49050  test -d "$as_dir" || eval $as_mkdir_p || {
49051    as_dirs=
49052    while :; do
49053      case $as_dir in #(
49054      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49055      *) as_qdir=$as_dir;;
49056      esac
49057      as_dirs="'$as_qdir' $as_dirs"
49058      as_dir=`$as_dirname -- "$as_dir" ||
49059$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49060	 X"$as_dir" : 'X\(//\)[^/]' \| \
49061	 X"$as_dir" : 'X\(//\)$' \| \
49062	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49063$as_echo X"$as_dir" |
49064    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49065	    s//\1/
49066	    q
49067	  }
49068	  /^X\(\/\/\)[^/].*/{
49069	    s//\1/
49070	    q
49071	  }
49072	  /^X\(\/\/\)$/{
49073	    s//\1/
49074	    q
49075	  }
49076	  /^X\(\/\).*/{
49077	    s//\1/
49078	    q
49079	  }
49080	  s/.*/./; q'`
49081      test -d "$as_dir" && break
49082    done
49083    test -z "$as_dirs" || eval "mkdir $as_dirs"
49084  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49085
49086
49087} # as_fn_mkdir_p
49088if mkdir -p . 2>/dev/null; then
49089  as_mkdir_p='mkdir -p "$as_dir"'
49090else
49091  test -d ./-p && rmdir ./-p
49092  as_mkdir_p=false
49093fi
49094
49095
49096# as_fn_executable_p FILE
49097# -----------------------
49098# Test if FILE is an executable regular file.
49099as_fn_executable_p ()
49100{
49101  test -f "$1" && test -x "$1"
49102} # as_fn_executable_p
49103as_test_x='test -x'
49104as_executable_p=as_fn_executable_p
49105
49106# Sed expression to map a string onto a valid CPP name.
49107as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49108
49109# Sed expression to map a string onto a valid variable name.
49110as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49111
49112
49113exec 6>&1
49114## ----------------------------------- ##
49115## Main body of $CONFIG_STATUS script. ##
49116## ----------------------------------- ##
49117_ASEOF
49118test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49119
49120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49121# Save the log message, to keep $0 and so on meaningful, and to
49122# report actual input values of CONFIG_FILES etc. instead of their
49123# values after options handling.
49124ac_log="
49125This file was extended by OpenJDK $as_me jdk8, which was
49126generated by GNU Autoconf 2.69.  Invocation command line was
49127
49128  CONFIG_FILES    = $CONFIG_FILES
49129  CONFIG_HEADERS  = $CONFIG_HEADERS
49130  CONFIG_LINKS    = $CONFIG_LINKS
49131  CONFIG_COMMANDS = $CONFIG_COMMANDS
49132  $ $0 $@
49133
49134on `(hostname || uname -n) 2>/dev/null | sed 1q`
49135"
49136
49137_ACEOF
49138
49139case $ac_config_files in *"
49140"*) set x $ac_config_files; shift; ac_config_files=$*;;
49141esac
49142
49143case $ac_config_headers in *"
49144"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49145esac
49146
49147
49148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49149# Files that config.status was made for.
49150config_files="$ac_config_files"
49151config_headers="$ac_config_headers"
49152
49153_ACEOF
49154
49155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49156ac_cs_usage="\
49157\`$as_me' instantiates files and other configuration actions
49158from templates according to the current configuration.  Unless the files
49159and actions are specified as TAGs, all are instantiated by default.
49160
49161Usage: $0 [OPTION]... [TAG]...
49162
49163  -h, --help       print this help, then exit
49164  -V, --version    print version number and configuration settings, then exit
49165      --config     print configuration, then exit
49166  -q, --quiet, --silent
49167                   do not print progress messages
49168  -d, --debug      don't remove temporary files
49169      --recheck    update $as_me by reconfiguring in the same conditions
49170      --file=FILE[:TEMPLATE]
49171                   instantiate the configuration file FILE
49172      --header=FILE[:TEMPLATE]
49173                   instantiate the configuration header FILE
49174
49175Configuration files:
49176$config_files
49177
49178Configuration headers:
49179$config_headers
49180
49181Report bugs to <build-dev@openjdk.java.net>.
49182OpenJDK home page: <http://openjdk.java.net>."
49183
49184_ACEOF
49185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49186ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49187ac_cs_version="\\
49188OpenJDK config.status jdk8
49189configured by $0, generated by GNU Autoconf 2.69,
49190  with options \\"\$ac_cs_config\\"
49191
49192Copyright (C) 2012 Free Software Foundation, Inc.
49193This config.status script is free software; the Free Software Foundation
49194gives unlimited permission to copy, distribute and modify it."
49195
49196ac_pwd='$ac_pwd'
49197srcdir='$srcdir'
49198AWK='$AWK'
49199test -n "\$AWK" || AWK=awk
49200_ACEOF
49201
49202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49203# The default lists apply if the user does not specify any file.
49204ac_need_defaults=:
49205while test $# != 0
49206do
49207  case $1 in
49208  --*=?*)
49209    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49210    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49211    ac_shift=:
49212    ;;
49213  --*=)
49214    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49215    ac_optarg=
49216    ac_shift=:
49217    ;;
49218  *)
49219    ac_option=$1
49220    ac_optarg=$2
49221    ac_shift=shift
49222    ;;
49223  esac
49224
49225  case $ac_option in
49226  # Handling of the options.
49227  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49228    ac_cs_recheck=: ;;
49229  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49230    $as_echo "$ac_cs_version"; exit ;;
49231  --config | --confi | --conf | --con | --co | --c )
49232    $as_echo "$ac_cs_config"; exit ;;
49233  --debug | --debu | --deb | --de | --d | -d )
49234    debug=: ;;
49235  --file | --fil | --fi | --f )
49236    $ac_shift
49237    case $ac_optarg in
49238    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49239    '') as_fn_error $? "missing file argument" ;;
49240    esac
49241    as_fn_append CONFIG_FILES " '$ac_optarg'"
49242    ac_need_defaults=false;;
49243  --header | --heade | --head | --hea )
49244    $ac_shift
49245    case $ac_optarg in
49246    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49247    esac
49248    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49249    ac_need_defaults=false;;
49250  --he | --h)
49251    # Conflict between --help and --header
49252    as_fn_error $? "ambiguous option: \`$1'
49253Try \`$0 --help' for more information.";;
49254  --help | --hel | -h )
49255    $as_echo "$ac_cs_usage"; exit ;;
49256  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49257  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49258    ac_cs_silent=: ;;
49259
49260  # This is an error.
49261  -*) as_fn_error $? "unrecognized option: \`$1'
49262Try \`$0 --help' for more information." ;;
49263
49264  *) as_fn_append ac_config_targets " $1"
49265     ac_need_defaults=false ;;
49266
49267  esac
49268  shift
49269done
49270
49271ac_configure_extra_args=
49272
49273if $ac_cs_silent; then
49274  exec 6>/dev/null
49275  ac_configure_extra_args="$ac_configure_extra_args --silent"
49276fi
49277
49278_ACEOF
49279cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49280if \$ac_cs_recheck; then
49281  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49282  shift
49283  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49284  CONFIG_SHELL='$SHELL'
49285  export CONFIG_SHELL
49286  exec "\$@"
49287fi
49288
49289_ACEOF
49290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49291exec 5>>config.log
49292{
49293  echo
49294  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49295## Running $as_me. ##
49296_ASBOX
49297  $as_echo "$ac_log"
49298} >&5
49299
49300_ACEOF
49301cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49302_ACEOF
49303
49304cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49305
49306# Handling of arguments.
49307for ac_config_target in $ac_config_targets
49308do
49309  case $ac_config_target in
49310    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49311    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49312    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49313    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49314    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49315    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49316    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49317
49318  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49319  esac
49320done
49321
49322
49323# If the user did not use the arguments to specify the items to instantiate,
49324# then the envvar interface is used.  Set only those that are not.
49325# We use the long form for the default assignment because of an extremely
49326# bizarre bug on SunOS 4.1.3.
49327if $ac_need_defaults; then
49328  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49329  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49330fi
49331
49332# Have a temporary directory for convenience.  Make it in the build tree
49333# simply because there is no reason against having it here, and in addition,
49334# creating and moving files from /tmp can sometimes cause problems.
49335# Hook for its removal unless debugging.
49336# Note that there is a small window in which the directory will not be cleaned:
49337# after its creation but before its name has been assigned to `$tmp'.
49338$debug ||
49339{
49340  tmp= ac_tmp=
49341  trap 'exit_status=$?
49342  : "${ac_tmp:=$tmp}"
49343  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49344' 0
49345  trap 'as_fn_exit 1' 1 2 13 15
49346}
49347# Create a (secure) tmp directory for tmp files.
49348
49349{
49350  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49351  test -d "$tmp"
49352}  ||
49353{
49354  tmp=./conf$$-$RANDOM
49355  (umask 077 && mkdir "$tmp")
49356} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49357ac_tmp=$tmp
49358
49359# Set up the scripts for CONFIG_FILES section.
49360# No need to generate them if there are no CONFIG_FILES.
49361# This happens for instance with `./config.status config.h'.
49362if test -n "$CONFIG_FILES"; then
49363
49364
49365ac_cr=`echo X | tr X '\015'`
49366# On cygwin, bash can eat \r inside `` if the user requested igncr.
49367# But we know of no other shell where ac_cr would be empty at this
49368# point, so we can use a bashism as a fallback.
49369if test "x$ac_cr" = x; then
49370  eval ac_cr=\$\'\\r\'
49371fi
49372ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49373if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49374  ac_cs_awk_cr='\\r'
49375else
49376  ac_cs_awk_cr=$ac_cr
49377fi
49378
49379echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49380_ACEOF
49381
49382
49383{
49384  echo "cat >conf$$subs.awk <<_ACEOF" &&
49385  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49386  echo "_ACEOF"
49387} >conf$$subs.sh ||
49388  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49389ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49390ac_delim='%!_!# '
49391for ac_last_try in false false false false false :; do
49392  . ./conf$$subs.sh ||
49393    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49394
49395  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49396  if test $ac_delim_n = $ac_delim_num; then
49397    break
49398  elif $ac_last_try; then
49399    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49400  else
49401    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49402  fi
49403done
49404rm -f conf$$subs.sh
49405
49406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49407cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49408_ACEOF
49409sed -n '
49410h
49411s/^/S["/; s/!.*/"]=/
49412p
49413g
49414s/^[^!]*!//
49415:repl
49416t repl
49417s/'"$ac_delim"'$//
49418t delim
49419:nl
49420h
49421s/\(.\{148\}\)..*/\1/
49422t more1
49423s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49424p
49425n
49426b repl
49427:more1
49428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49429p
49430g
49431s/.\{148\}//
49432t nl
49433:delim
49434h
49435s/\(.\{148\}\)..*/\1/
49436t more2
49437s/["\\]/\\&/g; s/^/"/; s/$/"/
49438p
49439b
49440:more2
49441s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49442p
49443g
49444s/.\{148\}//
49445t delim
49446' <conf$$subs.awk | sed '
49447/^[^""]/{
49448  N
49449  s/\n//
49450}
49451' >>$CONFIG_STATUS || ac_write_fail=1
49452rm -f conf$$subs.awk
49453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49454_ACAWK
49455cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49456  for (key in S) S_is_set[key] = 1
49457  FS = ""
49458
49459}
49460{
49461  line = $ 0
49462  nfields = split(line, field, "@")
49463  substed = 0
49464  len = length(field[1])
49465  for (i = 2; i < nfields; i++) {
49466    key = field[i]
49467    keylen = length(key)
49468    if (S_is_set[key]) {
49469      value = S[key]
49470      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49471      len += length(value) + length(field[++i])
49472      substed = 1
49473    } else
49474      len += 1 + keylen
49475  }
49476
49477  print line
49478}
49479
49480_ACAWK
49481_ACEOF
49482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49483if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49484  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49485else
49486  cat
49487fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49488  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49489_ACEOF
49490
49491# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49492# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49493# trailing colons and then remove the whole line if VPATH becomes empty
49494# (actually we leave an empty line to preserve line numbers).
49495if test "x$srcdir" = x.; then
49496  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49497h
49498s///
49499s/^/:/
49500s/[	 ]*$/:/
49501s/:\$(srcdir):/:/g
49502s/:\${srcdir}:/:/g
49503s/:@srcdir@:/:/g
49504s/^:*//
49505s/:*$//
49506x
49507s/\(=[	 ]*\).*/\1/
49508G
49509s/\n//
49510s/^[^=]*=[	 ]*$//
49511}'
49512fi
49513
49514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49515fi # test -n "$CONFIG_FILES"
49516
49517# Set up the scripts for CONFIG_HEADERS section.
49518# No need to generate them if there are no CONFIG_HEADERS.
49519# This happens for instance with `./config.status Makefile'.
49520if test -n "$CONFIG_HEADERS"; then
49521cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49522BEGIN {
49523_ACEOF
49524
49525# Transform confdefs.h into an awk script `defines.awk', embedded as
49526# here-document in config.status, that substitutes the proper values into
49527# config.h.in to produce config.h.
49528
49529# Create a delimiter string that does not exist in confdefs.h, to ease
49530# handling of long lines.
49531ac_delim='%!_!# '
49532for ac_last_try in false false :; do
49533  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49534  if test -z "$ac_tt"; then
49535    break
49536  elif $ac_last_try; then
49537    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49538  else
49539    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49540  fi
49541done
49542
49543# For the awk script, D is an array of macro values keyed by name,
49544# likewise P contains macro parameters if any.  Preserve backslash
49545# newline sequences.
49546
49547ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49548sed -n '
49549s/.\{148\}/&'"$ac_delim"'/g
49550t rset
49551:rset
49552s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49553t def
49554d
49555:def
49556s/\\$//
49557t bsnl
49558s/["\\]/\\&/g
49559s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49560D["\1"]=" \3"/p
49561s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49562d
49563:bsnl
49564s/["\\]/\\&/g
49565s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49566D["\1"]=" \3\\\\\\n"\\/p
49567t cont
49568s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49569t cont
49570d
49571:cont
49572n
49573s/.\{148\}/&'"$ac_delim"'/g
49574t clear
49575:clear
49576s/\\$//
49577t bsnlc
49578s/["\\]/\\&/g; s/^/"/; s/$/"/p
49579d
49580:bsnlc
49581s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49582b cont
49583' <confdefs.h | sed '
49584s/'"$ac_delim"'/"\\\
49585"/g' >>$CONFIG_STATUS || ac_write_fail=1
49586
49587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49588  for (key in D) D_is_set[key] = 1
49589  FS = ""
49590}
49591/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49592  line = \$ 0
49593  split(line, arg, " ")
49594  if (arg[1] == "#") {
49595    defundef = arg[2]
49596    mac1 = arg[3]
49597  } else {
49598    defundef = substr(arg[1], 2)
49599    mac1 = arg[2]
49600  }
49601  split(mac1, mac2, "(") #)
49602  macro = mac2[1]
49603  prefix = substr(line, 1, index(line, defundef) - 1)
49604  if (D_is_set[macro]) {
49605    # Preserve the white space surrounding the "#".
49606    print prefix "define", macro P[macro] D[macro]
49607    next
49608  } else {
49609    # Replace #undef with comments.  This is necessary, for example,
49610    # in the case of _POSIX_SOURCE, which is predefined and required
49611    # on some systems where configure will not decide to define it.
49612    if (defundef == "undef") {
49613      print "/*", prefix defundef, macro, "*/"
49614      next
49615    }
49616  }
49617}
49618{ print }
49619_ACAWK
49620_ACEOF
49621cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49622  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49623fi # test -n "$CONFIG_HEADERS"
49624
49625
49626eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49627shift
49628for ac_tag
49629do
49630  case $ac_tag in
49631  :[FHLC]) ac_mode=$ac_tag; continue;;
49632  esac
49633  case $ac_mode$ac_tag in
49634  :[FHL]*:*);;
49635  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49636  :[FH]-) ac_tag=-:-;;
49637  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49638  esac
49639  ac_save_IFS=$IFS
49640  IFS=:
49641  set x $ac_tag
49642  IFS=$ac_save_IFS
49643  shift
49644  ac_file=$1
49645  shift
49646
49647  case $ac_mode in
49648  :L) ac_source=$1;;
49649  :[FH])
49650    ac_file_inputs=
49651    for ac_f
49652    do
49653      case $ac_f in
49654      -) ac_f="$ac_tmp/stdin";;
49655      *) # Look for the file first in the build tree, then in the source tree
49656	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49657	 # because $ac_f cannot contain `:'.
49658	 test -f "$ac_f" ||
49659	   case $ac_f in
49660	   [\\/$]*) false;;
49661	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49662	   esac ||
49663	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49664      esac
49665      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49666      as_fn_append ac_file_inputs " '$ac_f'"
49667    done
49668
49669    # Let's still pretend it is `configure' which instantiates (i.e., don't
49670    # use $as_me), people would be surprised to read:
49671    #    /* config.h.  Generated by config.status.  */
49672    configure_input='Generated from '`
49673	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49674	`' by configure.'
49675    if test x"$ac_file" != x-; then
49676      configure_input="$ac_file.  $configure_input"
49677      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49678$as_echo "$as_me: creating $ac_file" >&6;}
49679    fi
49680    # Neutralize special characters interpreted by sed in replacement strings.
49681    case $configure_input in #(
49682    *\&* | *\|* | *\\* )
49683       ac_sed_conf_input=`$as_echo "$configure_input" |
49684       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49685    *) ac_sed_conf_input=$configure_input;;
49686    esac
49687
49688    case $ac_tag in
49689    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49690      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49691    esac
49692    ;;
49693  esac
49694
49695  ac_dir=`$as_dirname -- "$ac_file" ||
49696$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49697	 X"$ac_file" : 'X\(//\)[^/]' \| \
49698	 X"$ac_file" : 'X\(//\)$' \| \
49699	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49700$as_echo X"$ac_file" |
49701    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49702	    s//\1/
49703	    q
49704	  }
49705	  /^X\(\/\/\)[^/].*/{
49706	    s//\1/
49707	    q
49708	  }
49709	  /^X\(\/\/\)$/{
49710	    s//\1/
49711	    q
49712	  }
49713	  /^X\(\/\).*/{
49714	    s//\1/
49715	    q
49716	  }
49717	  s/.*/./; q'`
49718  as_dir="$ac_dir"; as_fn_mkdir_p
49719  ac_builddir=.
49720
49721case "$ac_dir" in
49722.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49723*)
49724  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49725  # A ".." for each directory in $ac_dir_suffix.
49726  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49727  case $ac_top_builddir_sub in
49728  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49729  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49730  esac ;;
49731esac
49732ac_abs_top_builddir=$ac_pwd
49733ac_abs_builddir=$ac_pwd$ac_dir_suffix
49734# for backward compatibility:
49735ac_top_builddir=$ac_top_build_prefix
49736
49737case $srcdir in
49738  .)  # We are building in place.
49739    ac_srcdir=.
49740    ac_top_srcdir=$ac_top_builddir_sub
49741    ac_abs_top_srcdir=$ac_pwd ;;
49742  [\\/]* | ?:[\\/]* )  # Absolute name.
49743    ac_srcdir=$srcdir$ac_dir_suffix;
49744    ac_top_srcdir=$srcdir
49745    ac_abs_top_srcdir=$srcdir ;;
49746  *) # Relative name.
49747    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49748    ac_top_srcdir=$ac_top_build_prefix$srcdir
49749    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49750esac
49751ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49752
49753
49754  case $ac_mode in
49755  :F)
49756  #
49757  # CONFIG_FILE
49758  #
49759
49760_ACEOF
49761
49762cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49763# If the template does not know about datarootdir, expand it.
49764# FIXME: This hack should be removed a few years after 2.60.
49765ac_datarootdir_hack=; ac_datarootdir_seen=
49766ac_sed_dataroot='
49767/datarootdir/ {
49768  p
49769  q
49770}
49771/@datadir@/p
49772/@docdir@/p
49773/@infodir@/p
49774/@localedir@/p
49775/@mandir@/p'
49776case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49777*datarootdir*) ac_datarootdir_seen=yes;;
49778*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49779  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49780$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49781_ACEOF
49782cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49783  ac_datarootdir_hack='
49784  s&@datadir@&$datadir&g
49785  s&@docdir@&$docdir&g
49786  s&@infodir@&$infodir&g
49787  s&@localedir@&$localedir&g
49788  s&@mandir@&$mandir&g
49789  s&\\\${datarootdir}&$datarootdir&g' ;;
49790esac
49791_ACEOF
49792
49793# Neutralize VPATH when `$srcdir' = `.'.
49794# Shell code in configure.ac might set extrasub.
49795# FIXME: do we really want to maintain this feature?
49796cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49797ac_sed_extra="$ac_vpsub
49798$extrasub
49799_ACEOF
49800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49801:t
49802/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49803s|@configure_input@|$ac_sed_conf_input|;t t
49804s&@top_builddir@&$ac_top_builddir_sub&;t t
49805s&@top_build_prefix@&$ac_top_build_prefix&;t t
49806s&@srcdir@&$ac_srcdir&;t t
49807s&@abs_srcdir@&$ac_abs_srcdir&;t t
49808s&@top_srcdir@&$ac_top_srcdir&;t t
49809s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49810s&@builddir@&$ac_builddir&;t t
49811s&@abs_builddir@&$ac_abs_builddir&;t t
49812s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49813$ac_datarootdir_hack
49814"
49815eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49816  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49817
49818test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49819  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49820  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49821      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49822  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49823which seems to be undefined.  Please make sure it is defined" >&5
49824$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49825which seems to be undefined.  Please make sure it is defined" >&2;}
49826
49827  rm -f "$ac_tmp/stdin"
49828  case $ac_file in
49829  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49830  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49831  esac \
49832  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49833 ;;
49834  :H)
49835  #
49836  # CONFIG_HEADER
49837  #
49838  if test x"$ac_file" != x-; then
49839    {
49840      $as_echo "/* $configure_input  */" \
49841      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49842    } >"$ac_tmp/config.h" \
49843      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49844    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49845      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49846$as_echo "$as_me: $ac_file is unchanged" >&6;}
49847    else
49848      rm -f "$ac_file"
49849      mv "$ac_tmp/config.h" "$ac_file" \
49850	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49851    fi
49852  else
49853    $as_echo "/* $configure_input  */" \
49854      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49855      || as_fn_error $? "could not create -" "$LINENO" 5
49856  fi
49857 ;;
49858
49859
49860  esac
49861
49862done # for ac_tag
49863
49864
49865as_fn_exit 0
49866_ACEOF
49867ac_clean_files=$ac_clean_files_save
49868
49869test $ac_write_fail = 0 ||
49870  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49871
49872
49873# configure is writing to config.log, and then calls config.status.
49874# config.status does its own redirection, appending to config.log.
49875# Unfortunately, on DOS this fails, as config.log is still kept open
49876# by configure, so config.status won't be able to write to it; its
49877# output is simply discarded.  So we exec the FD to /dev/null,
49878# effectively closing config.log, so it can be properly (re)opened and
49879# appended to by config.status.  When coming back to configure, we
49880# need to make the FD available again.
49881if test "$no_create" != yes; then
49882  ac_cs_success=:
49883  ac_config_status_args=
49884  test "$silent" = yes &&
49885    ac_config_status_args="$ac_config_status_args --quiet"
49886  exec 5>/dev/null
49887  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49888  exec 5>>config.log
49889  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49890  # would make configure fail if this is the last instruction.
49891  $ac_cs_success || as_fn_exit 1
49892fi
49893if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49894  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49895$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49896fi
49897
49898
49899# Try to move the config.log file to the output directory.
49900if test -e ./config.log; then
49901  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49902fi
49903
49904# Make the compare script executable
49905$CHMOD +x $OUTPUT_ROOT/compare.sh
49906
49907# Finally output some useful information to the user
49908
49909  # Finally output some useful information to the user
49910
49911  printf "\n"
49912  printf "====================================================\n"
49913  printf "A new configuration has been successfully created in\n"
49914  printf "$OUTPUT_ROOT\n"
49915  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49916    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49917  else
49918    printf "using default settings.\n"
49919  fi
49920
49921  printf "\n"
49922  printf "Configuration summary:\n"
49923  printf "* Debug level:    $DEBUG_LEVEL\n"
49924  printf "* JDK variant:    $JDK_VARIANT\n"
49925  printf "* JVM variants:   $with_jvm_variants\n"
49926  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49927
49928  printf "\n"
49929  printf "Tools summary:\n"
49930  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49931    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49932  fi
49933  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49934  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
49935  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
49936
49937  printf "\n"
49938  printf "Build performance summary:\n"
49939  printf "* Cores to use:   $JOBS\n"
49940  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49941  if test "x$CCACHE_STATUS" != "x"; then
49942    printf "* ccache status:  $CCACHE_STATUS\n"
49943  fi
49944  printf "\n"
49945
49946  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49947    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49948    printf "will result in longer build times.\n"
49949    printf "\n"
49950  fi
49951
49952  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49953    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49954    printf "These are not respected, and will be ignored. It is recommended\n"
49955    printf "that you clean your environment. The following variables are set:\n"
49956    printf "$FOUND_ALT_VARIABLES\n"
49957    printf "\n"
49958  fi
49959
49960  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49961    printf "WARNING: Your build output directory is not on a local disk.\n"
49962    printf "This will severely degrade build performance!\n"
49963    printf "It is recommended that you create an output directory on a local disk,\n"
49964    printf "and run the configure script again from that directory.\n"
49965    printf "\n"
49966  fi
49967
49968  if test "x$IS_RECONFIGURE" = "xyes"; then
49969    printf "WARNING: The result of this configuration has overridden an older\n"
49970    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
49971    printf "proper build. Failure to do so might result in strange build problems.\n"
49972    printf "\n"
49973  fi
49974
49975