generated-configure.sh revision 969:3a5d5a168722
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=1392253412
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      # these options are used for both C and C++ compiles
41878      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41879      -pipe \
41880      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41881      case $OPENJDK_TARGET_CPU_ARCH in
41882        arm )
41883          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41884          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41885          ;;
41886        ppc )
41887          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41888          ;;
41889        * )
41890          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41891          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41892          ;;
41893      esac
41894      ;;
41895    ossc )
41896      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41897      case $OPENJDK_TARGET_CPU_ARCH in
41898        x86 )
41899          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41900          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41901          ;;
41902      esac
41903
41904      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41905      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41906
41907      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41908      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41909      ;;
41910    xlc )
41911      CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41912      CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41913
41914      LDFLAGS_JDK="$LDFLAGS_JDK"
41915      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
41916      ;;
41917    cl )
41918      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41919      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41920      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41921      -DWIN32 -DIAL"
41922      case $OPENJDK_TARGET_CPU in
41923        x86 )
41924          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41925          ;;
41926        x86_64 )
41927          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41928          ;;
41929      esac
41930      ;;
41931  esac
41932
41933  ###############################################################################
41934
41935  # Adjust flags according to debug level.
41936  case $DEBUG_LEVEL in
41937    fastdebug )
41938      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41939      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41940      C_O_FLAG_HI="$C_O_FLAG_NORM"
41941      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41942      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41943      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41944      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41945      ;;
41946    slowdebug )
41947      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41948      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41949      C_O_FLAG_HI="$C_O_FLAG_NONE"
41950      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41951      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41952      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41953      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41954      ;;
41955  esac
41956
41957  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41958
41959  # The package path is used only on macosx?
41960  PACKAGE_PATH=/opt/local
41961
41962
41963  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41964    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41965    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41966    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41967    #   Note: -Dmacro         is the same as    #define macro 1
41968    #         -Dmacro=        is the same as    #define macro
41969    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41970      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41971    else
41972      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41973    fi
41974  else
41975    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41976  fi
41977  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41978    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
41979  fi
41980  if test "x$OPENJDK_TARGET_OS" = xwindows; then
41981    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
41982  fi
41983  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41984    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
41985  fi
41986  if test "x$OPENJDK_TARGET_OS" = xaix; then
41987    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
41988  fi
41989  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41990    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41991    # Setting these parameters makes it an error to link to macosx APIs that are
41992    # newer than the given OS version and makes the linked binaries compatible even
41993    # if built on a newer version of the OS.
41994    # The expected format is X.Y.Z
41995    MACOSX_VERSION_MIN=10.7.0
41996
41997    # The macro takes the version with no dots, ex: 1070
41998    # Let the flags variables get resolved in make for easier override on make
41999    # command line.
42000    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42001    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42002  fi
42003  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42004    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
42005  fi
42006  if test "x$DEBUG_LEVEL" = xrelease; then
42007    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42008  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42009    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42010  fi
42011  else
42012    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42013  fi
42014
42015  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42016  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42017
42018  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42019      -I${JDK_OUTPUTDIR}/include \
42020      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42021      -I${JDK_TOPDIR}/src/share/javavm/export \
42022      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42023      -I${JDK_TOPDIR}/src/share/native/common \
42024      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42025
42026  # The shared libraries are compiled using the picflag.
42027  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42028  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42029
42030  # Executable flags
42031  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
42032  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
42033
42034  # Now this is odd. The JDK native libraries have to link against libjvm.so
42035  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42036  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42037  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42038  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42039  # libraries will link to whatever is in memory. Yuck.
42040  #
42041  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42042  if test "x$COMPILER_NAME" = xcl; then
42043    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42044    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42045      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42046    fi
42047    # TODO: make -debug optional "--disable-full-debug-symbols"
42048    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42049    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42050    LDFLAGS_JDKLIB_SUFFIX=""
42051    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42052      LDFLAGS_STACK_SIZE=1048576
42053    else
42054      LDFLAGS_STACK_SIZE=327680
42055    fi
42056    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42057  else
42058    if test "x$COMPILER_NAME" = xgcc; then
42059      # If this is a --hash-style=gnu system, use --hash-style=both, why?
42060      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
42061      if test -n "$HAS_GNU_HASH"; then
42062        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42063      fi
42064      if test "x$OPENJDK_TARGET_OS" = xlinux; then
42065        # And since we now know that the linker is gnu, then add -z defs, to forbid
42066        # undefined symbols in object files.
42067        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42068        if test "x$DEBUG_LEVEL" = "xrelease"; then
42069          # When building release libraries, tell the linker optimize them.
42070          # Should this be supplied to the OSS linker as well?
42071          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42072        fi
42073      fi
42074    fi
42075    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42076        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42077
42078    # On some platforms (mac) the linker warns about non existing -L dirs.
42079    # Add server first if available. Linking aginst client does not always produce the same results.
42080    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42081    # Default to server for other variants.
42082    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42083      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42084    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42085      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42086    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42087      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42088    else
42089      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42090    fi
42091
42092    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42093    if test "x$COMPILER_NAME" = xossc; then
42094      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42095    fi
42096
42097    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42098    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42099      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42100    fi
42101  fi
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117  # Some Zero and Shark settings.
42118  # ZERO_ARCHFLAG tells the compiler which mode to build for
42119  case "${OPENJDK_TARGET_CPU}" in
42120    s390)
42121      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42122      ;;
42123    *)
42124      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42125  esac
42126
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42128$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42129  supports=yes
42130
42131  saved_cflags="$CFLAGS"
42132  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42133  ac_ext=c
42134ac_cpp='$CPP $CPPFLAGS'
42135ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42136ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42137ac_compiler_gnu=$ac_cv_c_compiler_gnu
42138
42139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42140/* end confdefs.h.  */
42141int i;
42142_ACEOF
42143if ac_fn_c_try_compile "$LINENO"; then :
42144
42145else
42146  supports=no
42147fi
42148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42149  ac_ext=cpp
42150ac_cpp='$CXXCPP $CPPFLAGS'
42151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42154
42155  CFLAGS="$saved_cflags"
42156
42157  saved_cxxflags="$CXXFLAGS"
42158  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42159  ac_ext=cpp
42160ac_cpp='$CXXCPP $CPPFLAGS'
42161ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42162ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42163ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42164
42165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42166/* end confdefs.h.  */
42167int i;
42168_ACEOF
42169if ac_fn_cxx_try_compile "$LINENO"; then :
42170
42171else
42172  supports=no
42173fi
42174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42175  ac_ext=cpp
42176ac_cpp='$CXXCPP $CPPFLAGS'
42177ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42178ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42179ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42180
42181  CXXFLAGS="$saved_cxxflags"
42182
42183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42184$as_echo "$supports" >&6; }
42185  if test "x$supports" = "xyes" ; then
42186    :
42187  else
42188    ZERO_ARCHFLAG=""
42189  fi
42190
42191
42192
42193  # Check that the compiler supports -mX (or -qX on AIX) flags
42194  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42195
42196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42197$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42198  supports=yes
42199
42200  saved_cflags="$CFLAGS"
42201  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42202  ac_ext=c
42203ac_cpp='$CPP $CPPFLAGS'
42204ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42206ac_compiler_gnu=$ac_cv_c_compiler_gnu
42207
42208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42209/* end confdefs.h.  */
42210int i;
42211_ACEOF
42212if ac_fn_c_try_compile "$LINENO"; then :
42213
42214else
42215  supports=no
42216fi
42217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42218  ac_ext=cpp
42219ac_cpp='$CXXCPP $CPPFLAGS'
42220ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42221ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42222ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42223
42224  CFLAGS="$saved_cflags"
42225
42226  saved_cxxflags="$CXXFLAGS"
42227  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42228  ac_ext=cpp
42229ac_cpp='$CXXCPP $CPPFLAGS'
42230ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42231ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42232ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42233
42234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42235/* end confdefs.h.  */
42236int i;
42237_ACEOF
42238if ac_fn_cxx_try_compile "$LINENO"; then :
42239
42240else
42241  supports=no
42242fi
42243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42244  ac_ext=cpp
42245ac_cpp='$CXXCPP $CPPFLAGS'
42246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42249
42250  CXXFLAGS="$saved_cxxflags"
42251
42252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42253$as_echo "$supports" >&6; }
42254  if test "x$supports" = "xyes" ; then
42255    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42256  else
42257    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42258  fi
42259
42260
42261
42262
42263  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
42264  USING_BROKEN_SUSE_LD=no
42265  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
42266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
42267$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
42268    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
42269    echo "int main() { }" > main.c
42270    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
42271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42272$as_echo "no" >&6; }
42273      USING_BROKEN_SUSE_LD=no
42274    else
42275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42276$as_echo "yes" >&6; }
42277      USING_BROKEN_SUSE_LD=yes
42278    fi
42279    rm -rf version-script.map main.c a.out
42280  fi
42281
42282
42283
42284# Setup debug symbols (need objcopy from the toolchain for that)
42285
42286  #
42287  # ENABLE_DEBUG_SYMBOLS
42288  # This must be done after the toolchain is setup, since we're looking at objcopy.
42289  #
42290  # Check whether --enable-debug-symbols was given.
42291if test "${enable_debug_symbols+set}" = set; then :
42292  enableval=$enable_debug_symbols;
42293fi
42294
42295
42296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42297$as_echo_n "checking if we should generate debug symbols... " >&6; }
42298
42299  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42300    # explicit enabling of enable-debug-symbols and can't find objcopy
42301    #   this is an error
42302    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42303  fi
42304
42305  if test "x$enable_debug_symbols" = "xyes"; then
42306    ENABLE_DEBUG_SYMBOLS=true
42307  elif test "x$enable_debug_symbols" = "xno"; then
42308    ENABLE_DEBUG_SYMBOLS=false
42309  else
42310    # Default is on if objcopy is found
42311    if test "x$OBJCOPY" != x; then
42312      ENABLE_DEBUG_SYMBOLS=true
42313    # MacOS X and Windows don't use objcopy but default is on for those OSes
42314    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42315      ENABLE_DEBUG_SYMBOLS=true
42316    else
42317      ENABLE_DEBUG_SYMBOLS=false
42318    fi
42319  fi
42320
42321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42322$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42323
42324  #
42325  # ZIP_DEBUGINFO_FILES
42326  #
42327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42328$as_echo_n "checking if we should zip debug-info files... " >&6; }
42329  # Check whether --enable-zip-debug-info was given.
42330if test "${enable_zip_debug_info+set}" = set; then :
42331  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42332else
42333  enable_zip_debug_info="yes"
42334fi
42335
42336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42337$as_echo "${enable_zip_debug_info}" >&6; }
42338
42339  if test "x${enable_zip_debug_info}" = "xno"; then
42340    ZIP_DEBUGINFO_FILES=false
42341  else
42342    ZIP_DEBUGINFO_FILES=true
42343  fi
42344
42345
42346
42347
42348
42349
42350
42351###############################################################################
42352#
42353# Check dependencies for external and internal libraries.
42354#
42355###############################################################################
42356
42357# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42358
42359  # When using cygwin or msys, we need a wrapper binary that renames
42360  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42361  # @files and rewrites these too! This wrapper binary is
42362  # called fixpath.
42363  FIXPATH=
42364  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42366$as_echo_n "checking if fixpath can be created... " >&6; }
42367    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42368    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42369    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42370      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42371      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42372      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42373      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42374    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42375      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42376      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42377
42378      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42379      # @ was chosen as separator to minimize risk of other tools messing around with it
42380      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42381      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42382
42383      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42384    fi
42385    rm -f $OUTPUT_ROOT/fixpath*
42386    cd $OUTPUT_ROOT
42387    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42388    cd $CURDIR
42389
42390    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42392$as_echo "no" >&6; }
42393      cat $OUTPUT_ROOT/fixpath1.log
42394      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42395    fi
42396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42397$as_echo "yes" >&6; }
42398    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42399$as_echo_n "checking if fixpath.exe works... " >&6; }
42400    cd $OUTPUT_ROOT
42401    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42402    cd $CURDIR
42403    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42405$as_echo "no" >&6; }
42406      cat $OUTPUT_ROOT/fixpath2.log
42407      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42408    fi
42409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42410$as_echo "yes" >&6; }
42411    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42412  fi
42413
42414
42415
42416
42417
42418
42419  ###############################################################################
42420  #
42421  # OS specific settings that we never will need to probe.
42422  #
42423  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42425$as_echo_n "checking what is not needed on Linux?... " >&6; }
42426    PULSE_NOT_NEEDED=yes
42427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42428$as_echo "pulse" >&6; }
42429  fi
42430
42431  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42433$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42434    ALSA_NOT_NEEDED=yes
42435    PULSE_NOT_NEEDED=yes
42436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42437$as_echo "alsa pulse" >&6; }
42438  fi
42439
42440  if test "x$OPENJDK_TARGET_OS" = xaix; then
42441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42442$as_echo_n "checking what is not needed on AIX?... " >&6; }
42443    ALSA_NOT_NEEDED=yes
42444    PULSE_NOT_NEEDED=yes
42445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42446$as_echo "alsa pulse" >&6; }
42447  fi
42448
42449
42450  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42451    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42452$as_echo_n "checking what is not needed on Windows?... " >&6; }
42453    CUPS_NOT_NEEDED=yes
42454    ALSA_NOT_NEEDED=yes
42455    PULSE_NOT_NEEDED=yes
42456    X11_NOT_NEEDED=yes
42457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42458$as_echo "alsa cups pulse x11" >&6; }
42459  fi
42460
42461  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42463$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42464    ALSA_NOT_NEEDED=yes
42465    PULSE_NOT_NEEDED=yes
42466    X11_NOT_NEEDED=yes
42467    # If the java runtime framework is disabled, then we need X11.
42468    # This will be adjusted below.
42469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42470$as_echo "alsa pulse x11" >&6; }
42471  fi
42472
42473  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42475$as_echo_n "checking what is not needed on bsd?... " >&6; }
42476    ALSA_NOT_NEEDED=yes
42477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42478$as_echo "alsa" >&6; }
42479  fi
42480
42481  if test "x$OPENJDK" = "xfalse"; then
42482    FREETYPE_NOT_NEEDED=yes
42483  fi
42484
42485  if test "x$SUPPORT_HEADFUL" = xno; then
42486    X11_NOT_NEEDED=yes
42487  fi
42488
42489  ###############################################################################
42490  #
42491  # Check for MacOSX support for OpenJDK.
42492  #
42493
42494
42495  # Check whether --enable-macosx-runtime-support was given.
42496if test "${enable_macosx_runtime_support+set}" = set; then :
42497  enableval=$enable_macosx_runtime_support;
42498fi
42499
42500  if test "x$enable_macosx_runtime_support" != x; then
42501    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42502$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42503  fi
42504
42505
42506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42507$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42508  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42510$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42511  else
42512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42513$as_echo "no" >&6; }
42514  fi
42515
42516
42517
42518  ###############################################################################
42519  #
42520  # Check for X Windows
42521  #
42522
42523  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42524  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42525  # --x-libraries for the sysroot, if that seems to be correct.
42526  if test "x$SYS_ROOT" != "x/"; then
42527    if test "x$x_includes" = xNONE; then
42528      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42529        x_includes="$SYS_ROOT/usr/X11R6/include"
42530      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42531        x_includes="$SYS_ROOT/usr/include"
42532      fi
42533    fi
42534    if test "x$x_libraries" = xNONE; then
42535      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42536        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42537      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42538        x_libraries="$SYS_ROOT/usr/lib64"
42539      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42540        x_libraries="$SYS_ROOT/usr/lib"
42541      fi
42542    fi
42543  fi
42544
42545  # Now let autoconf do it's magic
42546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42547$as_echo_n "checking for X... " >&6; }
42548
42549
42550# Check whether --with-x was given.
42551if test "${with_x+set}" = set; then :
42552  withval=$with_x;
42553fi
42554
42555# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42556if test "x$with_x" = xno; then
42557  # The user explicitly disabled X.
42558  have_x=disabled
42559else
42560  case $x_includes,$x_libraries in #(
42561    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42562    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42563  $as_echo_n "(cached) " >&6
42564else
42565  # One or both of the vars are not set, and there is no cached value.
42566ac_x_includes=no ac_x_libraries=no
42567rm -f -r conftest.dir
42568if mkdir conftest.dir; then
42569  cd conftest.dir
42570  cat >Imakefile <<'_ACEOF'
42571incroot:
42572	@echo incroot='${INCROOT}'
42573usrlibdir:
42574	@echo usrlibdir='${USRLIBDIR}'
42575libdir:
42576	@echo libdir='${LIBDIR}'
42577_ACEOF
42578  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42579    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42580    for ac_var in incroot usrlibdir libdir; do
42581      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42582    done
42583    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42584    for ac_extension in a so sl dylib la dll; do
42585      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42586	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42587	ac_im_usrlibdir=$ac_im_libdir; break
42588      fi
42589    done
42590    # Screen out bogus values from the imake configuration.  They are
42591    # bogus both because they are the default anyway, and because
42592    # using them would break gcc on systems where it needs fixed includes.
42593    case $ac_im_incroot in
42594	/usr/include) ac_x_includes= ;;
42595	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42596    esac
42597    case $ac_im_usrlibdir in
42598	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42599	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42600    esac
42601  fi
42602  cd ..
42603  rm -f -r conftest.dir
42604fi
42605
42606# Standard set of common directories for X headers.
42607# Check X11 before X11Rn because it is often a symlink to the current release.
42608ac_x_header_dirs='
42609/usr/X11/include
42610/usr/X11R7/include
42611/usr/X11R6/include
42612/usr/X11R5/include
42613/usr/X11R4/include
42614
42615/usr/include/X11
42616/usr/include/X11R7
42617/usr/include/X11R6
42618/usr/include/X11R5
42619/usr/include/X11R4
42620
42621/usr/local/X11/include
42622/usr/local/X11R7/include
42623/usr/local/X11R6/include
42624/usr/local/X11R5/include
42625/usr/local/X11R4/include
42626
42627/usr/local/include/X11
42628/usr/local/include/X11R7
42629/usr/local/include/X11R6
42630/usr/local/include/X11R5
42631/usr/local/include/X11R4
42632
42633/usr/X386/include
42634/usr/x386/include
42635/usr/XFree86/include/X11
42636
42637/usr/include
42638/usr/local/include
42639/usr/unsupported/include
42640/usr/athena/include
42641/usr/local/x11r5/include
42642/usr/lpp/Xamples/include
42643
42644/usr/openwin/include
42645/usr/openwin/share/include'
42646
42647if test "$ac_x_includes" = no; then
42648  # Guess where to find include files, by looking for Xlib.h.
42649  # First, try using that file with no special directory specified.
42650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42651/* end confdefs.h.  */
42652#include <X11/Xlib.h>
42653_ACEOF
42654if ac_fn_cxx_try_cpp "$LINENO"; then :
42655  # We can compile using X headers with no special include directory.
42656ac_x_includes=
42657else
42658  for ac_dir in $ac_x_header_dirs; do
42659  if test -r "$ac_dir/X11/Xlib.h"; then
42660    ac_x_includes=$ac_dir
42661    break
42662  fi
42663done
42664fi
42665rm -f conftest.err conftest.i conftest.$ac_ext
42666fi # $ac_x_includes = no
42667
42668if test "$ac_x_libraries" = no; then
42669  # Check for the libraries.
42670  # See if we find them without any special options.
42671  # Don't add to $LIBS permanently.
42672  ac_save_LIBS=$LIBS
42673  LIBS="-lX11 $LIBS"
42674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42675/* end confdefs.h.  */
42676#include <X11/Xlib.h>
42677int
42678main ()
42679{
42680XrmInitialize ()
42681  ;
42682  return 0;
42683}
42684_ACEOF
42685if ac_fn_cxx_try_link "$LINENO"; then :
42686  LIBS=$ac_save_LIBS
42687# We can link X programs with no special library path.
42688ac_x_libraries=
42689else
42690  LIBS=$ac_save_LIBS
42691for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42692do
42693  # Don't even attempt the hair of trying to link an X program!
42694  for ac_extension in a so sl dylib la dll; do
42695    if test -r "$ac_dir/libX11.$ac_extension"; then
42696      ac_x_libraries=$ac_dir
42697      break 2
42698    fi
42699  done
42700done
42701fi
42702rm -f core conftest.err conftest.$ac_objext \
42703    conftest$ac_exeext conftest.$ac_ext
42704fi # $ac_x_libraries = no
42705
42706case $ac_x_includes,$ac_x_libraries in #(
42707  no,* | *,no | *\'*)
42708    # Didn't find X, or a directory has "'" in its name.
42709    ac_cv_have_x="have_x=no";; #(
42710  *)
42711    # Record where we found X for the cache.
42712    ac_cv_have_x="have_x=yes\
42713	ac_x_includes='$ac_x_includes'\
42714	ac_x_libraries='$ac_x_libraries'"
42715esac
42716fi
42717;; #(
42718    *) have_x=yes;;
42719  esac
42720  eval "$ac_cv_have_x"
42721fi # $with_x != no
42722
42723if test "$have_x" != yes; then
42724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42725$as_echo "$have_x" >&6; }
42726  no_x=yes
42727else
42728  # If each of the values was on the command line, it overrides each guess.
42729  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42730  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42731  # Update the cache value to reflect the command line values.
42732  ac_cv_have_x="have_x=yes\
42733	ac_x_includes='$x_includes'\
42734	ac_x_libraries='$x_libraries'"
42735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42736$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42737fi
42738
42739  if test "$no_x" = yes; then
42740  # Not all programs may use this symbol, but it does not hurt to define it.
42741
42742$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42743
42744  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42745else
42746  if test -n "$x_includes"; then
42747    X_CFLAGS="$X_CFLAGS -I$x_includes"
42748  fi
42749
42750  # It would also be nice to do this for all -L options, not just this one.
42751  if test -n "$x_libraries"; then
42752    X_LIBS="$X_LIBS -L$x_libraries"
42753    # For Solaris; some versions of Sun CC require a space after -R and
42754    # others require no space.  Words are not sufficient . . . .
42755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42756$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42757    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42758    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42759    ac_cxx_werror_flag=yes
42760    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42761/* end confdefs.h.  */
42762
42763int
42764main ()
42765{
42766
42767  ;
42768  return 0;
42769}
42770_ACEOF
42771if ac_fn_cxx_try_link "$LINENO"; then :
42772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42773$as_echo "no" >&6; }
42774       X_LIBS="$X_LIBS -R$x_libraries"
42775else
42776  LIBS="$ac_xsave_LIBS -R $x_libraries"
42777       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42778/* end confdefs.h.  */
42779
42780int
42781main ()
42782{
42783
42784  ;
42785  return 0;
42786}
42787_ACEOF
42788if ac_fn_cxx_try_link "$LINENO"; then :
42789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42790$as_echo "yes" >&6; }
42791	  X_LIBS="$X_LIBS -R $x_libraries"
42792else
42793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42794$as_echo "neither works" >&6; }
42795fi
42796rm -f core conftest.err conftest.$ac_objext \
42797    conftest$ac_exeext conftest.$ac_ext
42798fi
42799rm -f core conftest.err conftest.$ac_objext \
42800    conftest$ac_exeext conftest.$ac_ext
42801    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42802    LIBS=$ac_xsave_LIBS
42803  fi
42804
42805  # Check for system-dependent libraries X programs must link with.
42806  # Do this before checking for the system-independent R6 libraries
42807  # (-lICE), since we may need -lsocket or whatever for X linking.
42808
42809  if test "$ISC" = yes; then
42810    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42811  else
42812    # Martyn Johnson says this is needed for Ultrix, if the X
42813    # libraries were built with DECnet support.  And Karl Berry says
42814    # the Alpha needs dnet_stub (dnet does not exist).
42815    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42816    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42817/* end confdefs.h.  */
42818
42819/* Override any GCC internal prototype to avoid an error.
42820   Use char because int might match the return type of a GCC
42821   builtin and then its argument prototype would still apply.  */
42822#ifdef __cplusplus
42823extern "C"
42824#endif
42825char XOpenDisplay ();
42826int
42827main ()
42828{
42829return XOpenDisplay ();
42830  ;
42831  return 0;
42832}
42833_ACEOF
42834if ac_fn_cxx_try_link "$LINENO"; then :
42835
42836else
42837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42838$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42839if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42840  $as_echo_n "(cached) " >&6
42841else
42842  ac_check_lib_save_LIBS=$LIBS
42843LIBS="-ldnet  $LIBS"
42844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42845/* end confdefs.h.  */
42846
42847/* Override any GCC internal prototype to avoid an error.
42848   Use char because int might match the return type of a GCC
42849   builtin and then its argument prototype would still apply.  */
42850#ifdef __cplusplus
42851extern "C"
42852#endif
42853char dnet_ntoa ();
42854int
42855main ()
42856{
42857return dnet_ntoa ();
42858  ;
42859  return 0;
42860}
42861_ACEOF
42862if ac_fn_cxx_try_link "$LINENO"; then :
42863  ac_cv_lib_dnet_dnet_ntoa=yes
42864else
42865  ac_cv_lib_dnet_dnet_ntoa=no
42866fi
42867rm -f core conftest.err conftest.$ac_objext \
42868    conftest$ac_exeext conftest.$ac_ext
42869LIBS=$ac_check_lib_save_LIBS
42870fi
42871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42872$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42873if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42874  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42875fi
42876
42877    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42879$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42880if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42881  $as_echo_n "(cached) " >&6
42882else
42883  ac_check_lib_save_LIBS=$LIBS
42884LIBS="-ldnet_stub  $LIBS"
42885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42886/* end confdefs.h.  */
42887
42888/* Override any GCC internal prototype to avoid an error.
42889   Use char because int might match the return type of a GCC
42890   builtin and then its argument prototype would still apply.  */
42891#ifdef __cplusplus
42892extern "C"
42893#endif
42894char dnet_ntoa ();
42895int
42896main ()
42897{
42898return dnet_ntoa ();
42899  ;
42900  return 0;
42901}
42902_ACEOF
42903if ac_fn_cxx_try_link "$LINENO"; then :
42904  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42905else
42906  ac_cv_lib_dnet_stub_dnet_ntoa=no
42907fi
42908rm -f core conftest.err conftest.$ac_objext \
42909    conftest$ac_exeext conftest.$ac_ext
42910LIBS=$ac_check_lib_save_LIBS
42911fi
42912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42913$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42914if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42915  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42916fi
42917
42918    fi
42919fi
42920rm -f core conftest.err conftest.$ac_objext \
42921    conftest$ac_exeext conftest.$ac_ext
42922    LIBS="$ac_xsave_LIBS"
42923
42924    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42925    # to get the SysV transport functions.
42926    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42927    # needs -lnsl.
42928    # The nsl library prevents programs from opening the X display
42929    # on Irix 5.2, according to T.E. Dickey.
42930    # The functions gethostbyname, getservbyname, and inet_addr are
42931    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42932    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42933if test "x$ac_cv_func_gethostbyname" = xyes; then :
42934
42935fi
42936
42937    if test $ac_cv_func_gethostbyname = no; then
42938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42939$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42940if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42941  $as_echo_n "(cached) " >&6
42942else
42943  ac_check_lib_save_LIBS=$LIBS
42944LIBS="-lnsl  $LIBS"
42945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42946/* end confdefs.h.  */
42947
42948/* Override any GCC internal prototype to avoid an error.
42949   Use char because int might match the return type of a GCC
42950   builtin and then its argument prototype would still apply.  */
42951#ifdef __cplusplus
42952extern "C"
42953#endif
42954char gethostbyname ();
42955int
42956main ()
42957{
42958return gethostbyname ();
42959  ;
42960  return 0;
42961}
42962_ACEOF
42963if ac_fn_cxx_try_link "$LINENO"; then :
42964  ac_cv_lib_nsl_gethostbyname=yes
42965else
42966  ac_cv_lib_nsl_gethostbyname=no
42967fi
42968rm -f core conftest.err conftest.$ac_objext \
42969    conftest$ac_exeext conftest.$ac_ext
42970LIBS=$ac_check_lib_save_LIBS
42971fi
42972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42973$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42974if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42975  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42976fi
42977
42978      if test $ac_cv_lib_nsl_gethostbyname = no; then
42979	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42980$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42981if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42982  $as_echo_n "(cached) " >&6
42983else
42984  ac_check_lib_save_LIBS=$LIBS
42985LIBS="-lbsd  $LIBS"
42986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42987/* end confdefs.h.  */
42988
42989/* Override any GCC internal prototype to avoid an error.
42990   Use char because int might match the return type of a GCC
42991   builtin and then its argument prototype would still apply.  */
42992#ifdef __cplusplus
42993extern "C"
42994#endif
42995char gethostbyname ();
42996int
42997main ()
42998{
42999return gethostbyname ();
43000  ;
43001  return 0;
43002}
43003_ACEOF
43004if ac_fn_cxx_try_link "$LINENO"; then :
43005  ac_cv_lib_bsd_gethostbyname=yes
43006else
43007  ac_cv_lib_bsd_gethostbyname=no
43008fi
43009rm -f core conftest.err conftest.$ac_objext \
43010    conftest$ac_exeext conftest.$ac_ext
43011LIBS=$ac_check_lib_save_LIBS
43012fi
43013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43014$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43015if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43016  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43017fi
43018
43019      fi
43020    fi
43021
43022    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43023    # socket/setsockopt and other routines are undefined under SCO ODT
43024    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43025    # on later versions), says Simon Leinen: it contains gethostby*
43026    # variants that don't use the name server (or something).  -lsocket
43027    # must be given before -lnsl if both are needed.  We assume that
43028    # if connect needs -lnsl, so does gethostbyname.
43029    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43030if test "x$ac_cv_func_connect" = xyes; then :
43031
43032fi
43033
43034    if test $ac_cv_func_connect = no; then
43035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43036$as_echo_n "checking for connect in -lsocket... " >&6; }
43037if ${ac_cv_lib_socket_connect+:} false; then :
43038  $as_echo_n "(cached) " >&6
43039else
43040  ac_check_lib_save_LIBS=$LIBS
43041LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43043/* end confdefs.h.  */
43044
43045/* Override any GCC internal prototype to avoid an error.
43046   Use char because int might match the return type of a GCC
43047   builtin and then its argument prototype would still apply.  */
43048#ifdef __cplusplus
43049extern "C"
43050#endif
43051char connect ();
43052int
43053main ()
43054{
43055return connect ();
43056  ;
43057  return 0;
43058}
43059_ACEOF
43060if ac_fn_cxx_try_link "$LINENO"; then :
43061  ac_cv_lib_socket_connect=yes
43062else
43063  ac_cv_lib_socket_connect=no
43064fi
43065rm -f core conftest.err conftest.$ac_objext \
43066    conftest$ac_exeext conftest.$ac_ext
43067LIBS=$ac_check_lib_save_LIBS
43068fi
43069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43070$as_echo "$ac_cv_lib_socket_connect" >&6; }
43071if test "x$ac_cv_lib_socket_connect" = xyes; then :
43072  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43073fi
43074
43075    fi
43076
43077    # Guillermo Gomez says -lposix is necessary on A/UX.
43078    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43079if test "x$ac_cv_func_remove" = xyes; then :
43080
43081fi
43082
43083    if test $ac_cv_func_remove = no; then
43084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43085$as_echo_n "checking for remove in -lposix... " >&6; }
43086if ${ac_cv_lib_posix_remove+:} false; then :
43087  $as_echo_n "(cached) " >&6
43088else
43089  ac_check_lib_save_LIBS=$LIBS
43090LIBS="-lposix  $LIBS"
43091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43092/* end confdefs.h.  */
43093
43094/* Override any GCC internal prototype to avoid an error.
43095   Use char because int might match the return type of a GCC
43096   builtin and then its argument prototype would still apply.  */
43097#ifdef __cplusplus
43098extern "C"
43099#endif
43100char remove ();
43101int
43102main ()
43103{
43104return remove ();
43105  ;
43106  return 0;
43107}
43108_ACEOF
43109if ac_fn_cxx_try_link "$LINENO"; then :
43110  ac_cv_lib_posix_remove=yes
43111else
43112  ac_cv_lib_posix_remove=no
43113fi
43114rm -f core conftest.err conftest.$ac_objext \
43115    conftest$ac_exeext conftest.$ac_ext
43116LIBS=$ac_check_lib_save_LIBS
43117fi
43118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43119$as_echo "$ac_cv_lib_posix_remove" >&6; }
43120if test "x$ac_cv_lib_posix_remove" = xyes; then :
43121  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43122fi
43123
43124    fi
43125
43126    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43127    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43128if test "x$ac_cv_func_shmat" = xyes; then :
43129
43130fi
43131
43132    if test $ac_cv_func_shmat = no; then
43133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43134$as_echo_n "checking for shmat in -lipc... " >&6; }
43135if ${ac_cv_lib_ipc_shmat+:} false; then :
43136  $as_echo_n "(cached) " >&6
43137else
43138  ac_check_lib_save_LIBS=$LIBS
43139LIBS="-lipc  $LIBS"
43140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43141/* end confdefs.h.  */
43142
43143/* Override any GCC internal prototype to avoid an error.
43144   Use char because int might match the return type of a GCC
43145   builtin and then its argument prototype would still apply.  */
43146#ifdef __cplusplus
43147extern "C"
43148#endif
43149char shmat ();
43150int
43151main ()
43152{
43153return shmat ();
43154  ;
43155  return 0;
43156}
43157_ACEOF
43158if ac_fn_cxx_try_link "$LINENO"; then :
43159  ac_cv_lib_ipc_shmat=yes
43160else
43161  ac_cv_lib_ipc_shmat=no
43162fi
43163rm -f core conftest.err conftest.$ac_objext \
43164    conftest$ac_exeext conftest.$ac_ext
43165LIBS=$ac_check_lib_save_LIBS
43166fi
43167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43168$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43169if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43170  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43171fi
43172
43173    fi
43174  fi
43175
43176  # Check for libraries that X11R6 Xt/Xaw programs need.
43177  ac_save_LDFLAGS=$LDFLAGS
43178  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43179  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43180  # check for ICE first), but we must link in the order -lSM -lICE or
43181  # we get undefined symbols.  So assume we have SM if we have ICE.
43182  # These have to be linked with before -lX11, unlike the other
43183  # libraries we check for below, so use a different variable.
43184  # John Interrante, Karl Berry
43185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43186$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43187if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43188  $as_echo_n "(cached) " >&6
43189else
43190  ac_check_lib_save_LIBS=$LIBS
43191LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43193/* end confdefs.h.  */
43194
43195/* Override any GCC internal prototype to avoid an error.
43196   Use char because int might match the return type of a GCC
43197   builtin and then its argument prototype would still apply.  */
43198#ifdef __cplusplus
43199extern "C"
43200#endif
43201char IceConnectionNumber ();
43202int
43203main ()
43204{
43205return IceConnectionNumber ();
43206  ;
43207  return 0;
43208}
43209_ACEOF
43210if ac_fn_cxx_try_link "$LINENO"; then :
43211  ac_cv_lib_ICE_IceConnectionNumber=yes
43212else
43213  ac_cv_lib_ICE_IceConnectionNumber=no
43214fi
43215rm -f core conftest.err conftest.$ac_objext \
43216    conftest$ac_exeext conftest.$ac_ext
43217LIBS=$ac_check_lib_save_LIBS
43218fi
43219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43220$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43221if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43222  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43223fi
43224
43225  LDFLAGS=$ac_save_LDFLAGS
43226
43227fi
43228
43229
43230  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43231  # this doesn't make sense so we remove it.
43232  if test "x$COMPILE_TYPE" = xcross; then
43233    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43234  fi
43235
43236  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43237
43238  # Print a helpful message on how to acquire the necessary build dependency.
43239  # x11 is the help tag: freetype, cups, pulse, alsa etc
43240  MISSING_DEPENDENCY=x11
43241
43242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43243    cygwin_help $MISSING_DEPENDENCY
43244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43245    msys_help $MISSING_DEPENDENCY
43246  else
43247    PKGHANDLER_COMMAND=
43248
43249    case $PKGHANDLER in
43250      apt-get)
43251        apt_help     $MISSING_DEPENDENCY ;;
43252      yum)
43253        yum_help     $MISSING_DEPENDENCY ;;
43254      port)
43255        port_help    $MISSING_DEPENDENCY ;;
43256      pkgutil)
43257        pkgutil_help $MISSING_DEPENDENCY ;;
43258      pkgadd)
43259        pkgadd_help  $MISSING_DEPENDENCY ;;
43260    esac
43261
43262    if test "x$PKGHANDLER_COMMAND" != x; then
43263      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43264    fi
43265  fi
43266
43267    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43268  fi
43269
43270  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43271    OPENWIN_HOME="/usr/openwin"
43272  fi
43273
43274
43275
43276  #
43277  # Weird Sol10 something check...TODO change to try compile
43278  #
43279  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43280    if test "`uname -r`" = "5.10"; then
43281      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43282        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43283      fi
43284    fi
43285  fi
43286
43287  ac_ext=c
43288ac_cpp='$CPP $CPPFLAGS'
43289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43291ac_compiler_gnu=$ac_cv_c_compiler_gnu
43292
43293  OLD_CFLAGS="$CFLAGS"
43294  CFLAGS="$CFLAGS $X_CFLAGS"
43295
43296  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43297  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43298do :
43299  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43300ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43301        # include <X11/Xlib.h>
43302        # include <X11/Xutil.h>
43303
43304
43305"
43306if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43307  cat >>confdefs.h <<_ACEOF
43308#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43309_ACEOF
43310 X11_A_OK=yes
43311else
43312  X11_A_OK=no; break
43313fi
43314
43315done
43316
43317
43318  CFLAGS="$OLD_CFLAGS"
43319  ac_ext=cpp
43320ac_cpp='$CXXCPP $CPPFLAGS'
43321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43324
43325
43326  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43327
43328  # Print a helpful message on how to acquire the necessary build dependency.
43329  # x11 is the help tag: freetype, cups, pulse, alsa etc
43330  MISSING_DEPENDENCY=x11
43331
43332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43333    cygwin_help $MISSING_DEPENDENCY
43334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43335    msys_help $MISSING_DEPENDENCY
43336  else
43337    PKGHANDLER_COMMAND=
43338
43339    case $PKGHANDLER in
43340      apt-get)
43341        apt_help     $MISSING_DEPENDENCY ;;
43342      yum)
43343        yum_help     $MISSING_DEPENDENCY ;;
43344      port)
43345        port_help    $MISSING_DEPENDENCY ;;
43346      pkgutil)
43347        pkgutil_help $MISSING_DEPENDENCY ;;
43348      pkgadd)
43349        pkgadd_help  $MISSING_DEPENDENCY ;;
43350    esac
43351
43352    if test "x$PKGHANDLER_COMMAND" != x; then
43353      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43354    fi
43355  fi
43356
43357    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43358  fi
43359
43360
43361
43362
43363
43364
43365  ###############################################################################
43366  #
43367  # The common unix printing system cups is used to print from java.
43368  #
43369
43370# Check whether --with-cups was given.
43371if test "${with_cups+set}" = set; then :
43372  withval=$with_cups;
43373fi
43374
43375
43376# Check whether --with-cups-include was given.
43377if test "${with_cups_include+set}" = set; then :
43378  withval=$with_cups_include;
43379fi
43380
43381
43382  if test "x$CUPS_NOT_NEEDED" = xyes; then
43383    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43384      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43385$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43386    fi
43387    CUPS_CFLAGS=
43388  else
43389    CUPS_FOUND=no
43390
43391    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43392      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43393    fi
43394
43395    if test "x${with_cups}" != x; then
43396      CUPS_CFLAGS="-I${with_cups}/include"
43397      CUPS_FOUND=yes
43398    fi
43399    if test "x${with_cups_include}" != x; then
43400      CUPS_CFLAGS="-I${with_cups_include}"
43401      CUPS_FOUND=yes
43402    fi
43403    if test "x$CUPS_FOUND" = xno; then
43404
43405
43406  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43407    # Source the builddeps file again, to make sure it uses the latest variables!
43408    . $builddepsfile
43409    # Look for a target and build machine specific resource!
43410    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43411    if test "x$resource" = x; then
43412      # Ok, lets instead look for a target specific resource
43413      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43414    fi
43415    if test "x$resource" = x; then
43416      # Ok, lets instead look for a build specific resource
43417      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43418    fi
43419    if test "x$resource" = x; then
43420      # Ok, lets instead look for a generic resource
43421      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43422      resource=${builddep_cups}
43423    fi
43424    if test "x$resource" != x; then
43425      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43426$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43427      # If the resource in the builddeps.conf file is an existing directory,
43428      # for example /java/linux/cups
43429      if test -d ${resource}; then
43430        depdir=${resource}
43431      else
43432
43433  # cups is for example mymodule
43434  # $resource is for example libs/general/libmymod_1_2_3.zip
43435  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43436  # $with_builddeps_dir is for example /localhome/builddeps
43437  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43438  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43439  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43440  filename=`basename $resource`
43441  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43442  filebase=${filename%%.*}
43443  extension=${filename#*.}
43444  installdir=$with_builddeps_dir/$filebase
43445  if test ! -f $installdir/$filename.unpacked; then
43446    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43447$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43448    if test ! -d $installdir; then
43449      mkdir -p $installdir
43450    fi
43451    if test ! -d $installdir; then
43452      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43453    fi
43454    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43455    touch $tmpfile
43456    if test ! -f $tmpfile; then
43457      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43458    fi
43459
43460  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43461  # $tmpfile is the local file name for the downloaded file.
43462  VALID_TOOL=no
43463  if test "x$BDEPS_FTP" = xwget; then
43464    VALID_TOOL=yes
43465    wget -O $tmpfile $with_builddeps_server/$resource
43466  fi
43467  if test "x$BDEPS_FTP" = xlftp; then
43468    VALID_TOOL=yes
43469    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43470  fi
43471  if test "x$BDEPS_FTP" = xftp; then
43472    VALID_TOOL=yes
43473    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43474    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43475    FTPUSERPWD=${FTPSERVER%%@*}
43476    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43477      FTPUSER=${userpwd%%:*}
43478      FTPPWD=${userpwd#*@}
43479      FTPSERVER=${FTPSERVER#*@}
43480    else
43481      FTPUSER=ftp
43482      FTPPWD=ftp
43483    fi
43484    # the "pass" command does not work on some
43485    # ftp clients (read ftp.exe) but if it works,
43486    # passive mode is better!
43487    ( \
43488        echo "user $FTPUSER $FTPPWD"        ; \
43489        echo "pass"                         ; \
43490        echo "bin"                          ; \
43491        echo "get $FTPPATH $tmpfile"              ; \
43492    ) | ftp -in $FTPSERVER
43493  fi
43494  if test "x$VALID_TOOL" != xyes; then
43495    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43496  fi
43497
43498    mv $tmpfile $installdir/$filename
43499    if test ! -s $installdir/$filename; then
43500      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43501    fi
43502    case "$extension" in
43503      zip)  echo "Unzipping $installdir/$filename..."
43504        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43505        ;;
43506      tar.gz) echo "Untaring $installdir/$filename..."
43507        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43508        ;;
43509      tgz) echo "Untaring $installdir/$filename..."
43510        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43511        ;;
43512      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43513        ;;
43514    esac
43515  fi
43516  if test -f $installdir/$filename.unpacked; then
43517    depdir=$installdir
43518  fi
43519
43520      fi
43521      # Source the builddeps file again, because in the previous command, the depdir
43522      # was updated to point at the current build dependency install directory.
43523      . $builddepsfile
43524      # Now extract variables from the builddeps.conf files.
43525      theroot=${builddep_cups_ROOT}
43526      thecflags=${builddep_cups_CFLAGS}
43527      thelibs=${builddep_cups_LIBS}
43528      if test "x$depdir" = x; then
43529        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43530      fi
43531      CUPS=$depdir
43532      if test "x$theroot" != x; then
43533        CUPS="$theroot"
43534      fi
43535      if test "x$thecflags" != x; then
43536        CUPS_CFLAGS="$thecflags"
43537      fi
43538      if test "x$thelibs" != x; then
43539        CUPS_LIBS="$thelibs"
43540      fi
43541      CUPS_FOUND=yes
43542
43543    fi
43544
43545  fi
43546
43547    fi
43548    if test "x$CUPS_FOUND" = xno; then
43549      # Are the cups headers installed in the default /usr/include location?
43550      for ac_header in cups/cups.h cups/ppd.h
43551do :
43552  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43553ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43554if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43555  cat >>confdefs.h <<_ACEOF
43556#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43557_ACEOF
43558
43559            CUPS_FOUND=yes
43560            CUPS_CFLAGS=
43561            DEFAULT_CUPS=yes
43562
43563
43564fi
43565
43566done
43567
43568    fi
43569    if test "x$CUPS_FOUND" = xno; then
43570      # Getting nervous now? Lets poke around for standard Solaris third-party
43571      # package installation locations.
43572      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43573$as_echo_n "checking for cups headers... " >&6; }
43574      if test -s /opt/sfw/cups/include/cups/cups.h; then
43575        # An SFW package seems to be installed!
43576        CUPS_FOUND=yes
43577        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43578      elif test -s /opt/csw/include/cups/cups.h; then
43579        # A CSW package seems to be installed!
43580        CUPS_FOUND=yes
43581        CUPS_CFLAGS="-I/opt/csw/include"
43582      fi
43583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43584$as_echo "$CUPS_FOUND" >&6; }
43585    fi
43586    if test "x$CUPS_FOUND" = xno; then
43587
43588  # Print a helpful message on how to acquire the necessary build dependency.
43589  # cups is the help tag: freetype, cups, pulse, alsa etc
43590  MISSING_DEPENDENCY=cups
43591
43592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43593    cygwin_help $MISSING_DEPENDENCY
43594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43595    msys_help $MISSING_DEPENDENCY
43596  else
43597    PKGHANDLER_COMMAND=
43598
43599    case $PKGHANDLER in
43600      apt-get)
43601        apt_help     $MISSING_DEPENDENCY ;;
43602      yum)
43603        yum_help     $MISSING_DEPENDENCY ;;
43604      port)
43605        port_help    $MISSING_DEPENDENCY ;;
43606      pkgutil)
43607        pkgutil_help $MISSING_DEPENDENCY ;;
43608      pkgadd)
43609        pkgadd_help  $MISSING_DEPENDENCY ;;
43610    esac
43611
43612    if test "x$PKGHANDLER_COMMAND" != x; then
43613      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43614    fi
43615  fi
43616
43617      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43618    fi
43619  fi
43620
43621
43622
43623
43624
43625
43626  ###############################################################################
43627  #
43628  # The ubiquitous freetype library is used to render fonts.
43629  #
43630
43631# Check whether --with-freetype was given.
43632if test "${with_freetype+set}" = set; then :
43633  withval=$with_freetype;
43634fi
43635
43636
43637# Check whether --with-freetype-include was given.
43638if test "${with_freetype_include+set}" = set; then :
43639  withval=$with_freetype_include;
43640fi
43641
43642
43643# Check whether --with-freetype-lib was given.
43644if test "${with_freetype_lib+set}" = set; then :
43645  withval=$with_freetype_lib;
43646fi
43647
43648  # Check whether --enable-freetype-bundling was given.
43649if test "${enable_freetype_bundling+set}" = set; then :
43650  enableval=$enable_freetype_bundling;
43651fi
43652
43653
43654  FREETYPE_CFLAGS=
43655  FREETYPE_LIBS=
43656  FREETYPE_BUNDLE_LIB_PATH=
43657
43658  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43659    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43660      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43661$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43662    fi
43663    if test "x$enable_freetype_bundling" != x; then
43664      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43665$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43666    fi
43667  else
43668    # freetype is needed to build; go get it!
43669
43670    BUNDLE_FREETYPE="$enable_freetype_bundling"
43671
43672    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43673      # User has specified settings
43674
43675      if test "x$BUNDLE_FREETYPE" = x; then
43676        # If not specified, default is to bundle freetype
43677        BUNDLE_FREETYPE=yes
43678      fi
43679
43680      if test "x$with_freetype" != x; then
43681        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43682        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43683      fi
43684
43685      # Allow --with-freetype-lib and --with-freetype-include to override
43686      if test "x$with_freetype_include" != x; then
43687        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43688      fi
43689      if test "x$with_freetype_lib" != x; then
43690        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43691      fi
43692
43693      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43694        # Okay, we got it. Check that it works.
43695
43696  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43697  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43698  METHOD="--with-freetype"
43699
43700  # First check if the files exists.
43701  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43702    # We found an arbitrary include file. That's a good sign.
43703    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43704$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43705    FOUND_FREETYPE=yes
43706
43707    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43708    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43709      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43711      FOUND_FREETYPE=no
43712    else
43713      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43714        # On Windows, we will need both .lib and .dll file.
43715        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43716          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43718          FOUND_FREETYPE=no
43719        fi
43720      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
43721        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43722        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43723      fi
43724    fi
43725  fi
43726
43727  if test "x$FOUND_FREETYPE" = xyes; then
43728
43729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43730
43731  # Input might be given as Windows format, start by converting to
43732  # unix format.
43733  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43734  new_path=`$CYGPATH -u "$path"`
43735
43736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43739  # "foo.exe" is OK but "foo" is an error.
43740  #
43741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43742  # It is also a way to make sure we got the proper file name for the real test later on.
43743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43744  if test "x$test_shortpath" = x; then
43745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43747    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43748  fi
43749
43750  # Call helper function which possibly converts this using DOS-style short mode.
43751  # If so, the updated path is stored in $new_path.
43752
43753  input_path="$new_path"
43754  # Check if we need to convert this using DOS-style short mode. If the path
43755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43756  # take no chances and rewrite it.
43757  # Note: m4 eats our [], so we need to use [ and ] instead.
43758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43759  if test "x$has_forbidden_chars" != x; then
43760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43764      # Going to short mode and back again did indeed matter. Since short mode is
43765      # case insensitive, let's make it lowercase to improve readability.
43766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43767      # Now convert it back to Unix-stile (cygpath)
43768      input_path=`$CYGPATH -u "$shortmode_path"`
43769      new_path="$input_path"
43770    fi
43771  fi
43772
43773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43774  if test "x$test_cygdrive_prefix" = x; then
43775    # As a simple fix, exclude /usr/bin since it's not a real path.
43776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43778      # a path prefixed by /cygdrive for fixpath to work.
43779      new_path="$CYGWIN_ROOT_PATH$input_path"
43780    fi
43781  fi
43782
43783
43784  if test "x$path" != "x$new_path"; then
43785    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43788  fi
43789
43790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43791
43792  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43793  has_colon=`$ECHO $path | $GREP ^.:`
43794  new_path="$path"
43795  if test "x$has_colon" = x; then
43796    # Not in mixed or Windows style, start by that.
43797    new_path=`cmd //c echo $path`
43798  fi
43799
43800
43801  input_path="$new_path"
43802  # Check if we need to convert this using DOS-style short mode. If the path
43803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43804  # take no chances and rewrite it.
43805  # Note: m4 eats our [], so we need to use [ and ] instead.
43806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43807  if test "x$has_forbidden_chars" != x; then
43808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43810  fi
43811
43812
43813  windows_path="$new_path"
43814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43815    unix_path=`$CYGPATH -u "$windows_path"`
43816    new_path="$unix_path"
43817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43819    new_path="$unix_path"
43820  fi
43821
43822  if test "x$path" != "x$new_path"; then
43823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43826  fi
43827
43828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43830
43831  else
43832    # We're on a posix platform. Hooray! :)
43833    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43834    has_space=`$ECHO "$path" | $GREP " "`
43835    if test "x$has_space" != x; then
43836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43838      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43839    fi
43840
43841    # Use eval to expand a potential ~
43842    eval path="$path"
43843    if test ! -f "$path" && test ! -d "$path"; then
43844      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43845    fi
43846
43847    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43848  fi
43849
43850
43851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43852
43853  # Input might be given as Windows format, start by converting to
43854  # unix format.
43855  path="$POTENTIAL_FREETYPE_LIB_PATH"
43856  new_path=`$CYGPATH -u "$path"`
43857
43858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43861  # "foo.exe" is OK but "foo" is an error.
43862  #
43863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43864  # It is also a way to make sure we got the proper file name for the real test later on.
43865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43866  if test "x$test_shortpath" = x; then
43867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43870  fi
43871
43872  # Call helper function which possibly converts this using DOS-style short mode.
43873  # If so, the updated path is stored in $new_path.
43874
43875  input_path="$new_path"
43876  # Check if we need to convert this using DOS-style short mode. If the path
43877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43878  # take no chances and rewrite it.
43879  # Note: m4 eats our [], so we need to use [ and ] instead.
43880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43881  if test "x$has_forbidden_chars" != x; then
43882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43886      # Going to short mode and back again did indeed matter. Since short mode is
43887      # case insensitive, let's make it lowercase to improve readability.
43888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43889      # Now convert it back to Unix-stile (cygpath)
43890      input_path=`$CYGPATH -u "$shortmode_path"`
43891      new_path="$input_path"
43892    fi
43893  fi
43894
43895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43896  if test "x$test_cygdrive_prefix" = x; then
43897    # As a simple fix, exclude /usr/bin since it's not a real path.
43898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43900      # a path prefixed by /cygdrive for fixpath to work.
43901      new_path="$CYGWIN_ROOT_PATH$input_path"
43902    fi
43903  fi
43904
43905
43906  if test "x$path" != "x$new_path"; then
43907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43910  fi
43911
43912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43913
43914  path="$POTENTIAL_FREETYPE_LIB_PATH"
43915  has_colon=`$ECHO $path | $GREP ^.:`
43916  new_path="$path"
43917  if test "x$has_colon" = x; then
43918    # Not in mixed or Windows style, start by that.
43919    new_path=`cmd //c echo $path`
43920  fi
43921
43922
43923  input_path="$new_path"
43924  # Check if we need to convert this using DOS-style short mode. If the path
43925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43926  # take no chances and rewrite it.
43927  # Note: m4 eats our [], so we need to use [ and ] instead.
43928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43929  if test "x$has_forbidden_chars" != x; then
43930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43932  fi
43933
43934
43935  windows_path="$new_path"
43936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43937    unix_path=`$CYGPATH -u "$windows_path"`
43938    new_path="$unix_path"
43939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43941    new_path="$unix_path"
43942  fi
43943
43944  if test "x$path" != "x$new_path"; then
43945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43948  fi
43949
43950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43952
43953  else
43954    # We're on a posix platform. Hooray! :)
43955    path="$POTENTIAL_FREETYPE_LIB_PATH"
43956    has_space=`$ECHO "$path" | $GREP " "`
43957    if test "x$has_space" != x; then
43958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43961    fi
43962
43963    # Use eval to expand a potential ~
43964    eval path="$path"
43965    if test ! -f "$path" && test ! -d "$path"; then
43966      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43967    fi
43968
43969    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43970  fi
43971
43972
43973    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43975$as_echo_n "checking for freetype includes... " >&6; }
43976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43977$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43978    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43980$as_echo_n "checking for freetype libraries... " >&6; }
43981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43982$as_echo "$FREETYPE_LIB_PATH" >&6; }
43983  fi
43984
43985        if test "x$FOUND_FREETYPE" != xyes; then
43986          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43987        fi
43988      else
43989        # User specified only one of lib or include. This is an error.
43990        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43991          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43992$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43993          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43994        else
43995          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43996$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43997          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43998        fi
43999      fi
44000    else
44001      # User did not specify settings, but we need freetype. Try to locate it.
44002
44003      if test "x$BUNDLE_FREETYPE" = x; then
44004        # If not specified, default is to bundle freetype only on windows
44005        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44006          BUNDLE_FREETYPE=yes
44007        else
44008          BUNDLE_FREETYPE=no
44009        fi
44010      fi
44011
44012      if test "x$FOUND_FREETYPE" != xyes; then
44013        # Check builddeps
44014
44015
44016  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44017    # Source the builddeps file again, to make sure it uses the latest variables!
44018    . $builddepsfile
44019    # Look for a target and build machine specific resource!
44020    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44021    if test "x$resource" = x; then
44022      # Ok, lets instead look for a target specific resource
44023      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44024    fi
44025    if test "x$resource" = x; then
44026      # Ok, lets instead look for a build specific resource
44027      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44028    fi
44029    if test "x$resource" = x; then
44030      # Ok, lets instead look for a generic resource
44031      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44032      resource=${builddep_freetype2}
44033    fi
44034    if test "x$resource" != x; then
44035      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44036$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44037      # If the resource in the builddeps.conf file is an existing directory,
44038      # for example /java/linux/cups
44039      if test -d ${resource}; then
44040        depdir=${resource}
44041      else
44042
44043  # freetype2 is for example mymodule
44044  # $resource is for example libs/general/libmymod_1_2_3.zip
44045  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44046  # $with_builddeps_dir is for example /localhome/builddeps
44047  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44048  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44049  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44050  filename=`basename $resource`
44051  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44052  filebase=${filename%%.*}
44053  extension=${filename#*.}
44054  installdir=$with_builddeps_dir/$filebase
44055  if test ! -f $installdir/$filename.unpacked; then
44056    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44057$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44058    if test ! -d $installdir; then
44059      mkdir -p $installdir
44060    fi
44061    if test ! -d $installdir; then
44062      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44063    fi
44064    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44065    touch $tmpfile
44066    if test ! -f $tmpfile; then
44067      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44068    fi
44069
44070  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44071  # $tmpfile is the local file name for the downloaded file.
44072  VALID_TOOL=no
44073  if test "x$BDEPS_FTP" = xwget; then
44074    VALID_TOOL=yes
44075    wget -O $tmpfile $with_builddeps_server/$resource
44076  fi
44077  if test "x$BDEPS_FTP" = xlftp; then
44078    VALID_TOOL=yes
44079    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44080  fi
44081  if test "x$BDEPS_FTP" = xftp; then
44082    VALID_TOOL=yes
44083    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44084    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44085    FTPUSERPWD=${FTPSERVER%%@*}
44086    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44087      FTPUSER=${userpwd%%:*}
44088      FTPPWD=${userpwd#*@}
44089      FTPSERVER=${FTPSERVER#*@}
44090    else
44091      FTPUSER=ftp
44092      FTPPWD=ftp
44093    fi
44094    # the "pass" command does not work on some
44095    # ftp clients (read ftp.exe) but if it works,
44096    # passive mode is better!
44097    ( \
44098        echo "user $FTPUSER $FTPPWD"        ; \
44099        echo "pass"                         ; \
44100        echo "bin"                          ; \
44101        echo "get $FTPPATH $tmpfile"              ; \
44102    ) | ftp -in $FTPSERVER
44103  fi
44104  if test "x$VALID_TOOL" != xyes; then
44105    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44106  fi
44107
44108    mv $tmpfile $installdir/$filename
44109    if test ! -s $installdir/$filename; then
44110      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44111    fi
44112    case "$extension" in
44113      zip)  echo "Unzipping $installdir/$filename..."
44114        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44115        ;;
44116      tar.gz) echo "Untaring $installdir/$filename..."
44117        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44118        ;;
44119      tgz) echo "Untaring $installdir/$filename..."
44120        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44121        ;;
44122      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44123        ;;
44124    esac
44125  fi
44126  if test -f $installdir/$filename.unpacked; then
44127    depdir=$installdir
44128  fi
44129
44130      fi
44131      # Source the builddeps file again, because in the previous command, the depdir
44132      # was updated to point at the current build dependency install directory.
44133      . $builddepsfile
44134      # Now extract variables from the builddeps.conf files.
44135      theroot=${builddep_freetype2_ROOT}
44136      thecflags=${builddep_freetype2_CFLAGS}
44137      thelibs=${builddep_freetype2_LIBS}
44138      if test "x$depdir" = x; then
44139        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44140      fi
44141      FREETYPE=$depdir
44142      if test "x$theroot" != x; then
44143        FREETYPE="$theroot"
44144      fi
44145      if test "x$thecflags" != x; then
44146        FREETYPE_CFLAGS="$thecflags"
44147      fi
44148      if test "x$thelibs" != x; then
44149        FREETYPE_LIBS="$thelibs"
44150      fi
44151      FOUND_FREETYPE=yes
44152      else FOUND_FREETYPE=no
44153
44154    fi
44155    else FOUND_FREETYPE=no
44156
44157  fi
44158
44159        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44160        if test "x$FOUND_FREETYPE" = xyes; then
44161          if test "x$BUNDLE_FREETYPE" = xyes; then
44162            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44163$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44164            FOUND_FREETYPE=no
44165          else
44166            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44167$as_echo_n "checking for freetype... " >&6; }
44168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44169$as_echo "yes (using builddeps)" >&6; }
44170          fi
44171        fi
44172      fi
44173
44174      if test "x$FOUND_FREETYPE" != xyes; then
44175        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44176        if test "x$PKG_CONFIG" != x; then
44177
44178pkg_failed=no
44179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44180$as_echo_n "checking for FREETYPE... " >&6; }
44181
44182if test -n "$FREETYPE_CFLAGS"; then
44183    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44184 elif test -n "$PKG_CONFIG"; then
44185    if test -n "$PKG_CONFIG" && \
44186    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44187  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44188  ac_status=$?
44189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44190  test $ac_status = 0; }; then
44191  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44192else
44193  pkg_failed=yes
44194fi
44195 else
44196    pkg_failed=untried
44197fi
44198if test -n "$FREETYPE_LIBS"; then
44199    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44200 elif test -n "$PKG_CONFIG"; then
44201    if test -n "$PKG_CONFIG" && \
44202    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44203  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44204  ac_status=$?
44205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44206  test $ac_status = 0; }; then
44207  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44208else
44209  pkg_failed=yes
44210fi
44211 else
44212    pkg_failed=untried
44213fi
44214
44215
44216
44217if test $pkg_failed = yes; then
44218
44219if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44220        _pkg_short_errors_supported=yes
44221else
44222        _pkg_short_errors_supported=no
44223fi
44224        if test $_pkg_short_errors_supported = yes; then
44225	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44226        else
44227	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44228        fi
44229	# Put the nasty error message in config.log where it belongs
44230	echo "$FREETYPE_PKG_ERRORS" >&5
44231
44232	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44233$as_echo "no" >&6; }
44234                FOUND_FREETYPE=no
44235elif test $pkg_failed = untried; then
44236	FOUND_FREETYPE=no
44237else
44238	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44239	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44241$as_echo "yes" >&6; }
44242	FOUND_FREETYPE=yes
44243fi
44244          if test "x$FOUND_FREETYPE" = xyes; then
44245            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44246            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44247            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44248            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44249              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44250            fi
44251            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44252            if test "x$BUNDLE_FREETYPE" = xyes; then
44253              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44254$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44255              FOUND_FREETYPE=no
44256            else
44257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44258$as_echo_n "checking for freetype... " >&6; }
44259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44260$as_echo "yes (using pkg-config)" >&6; }
44261            fi
44262          fi
44263        fi
44264      fi
44265
44266      if test "x$FOUND_FREETYPE" != xyes; then
44267        # Check in well-known locations
44268        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44269          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44270
44271  windows_path="$FREETYPE_BASE_DIR"
44272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44273    unix_path=`$CYGPATH -u "$windows_path"`
44274    FREETYPE_BASE_DIR="$unix_path"
44275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44277    FREETYPE_BASE_DIR="$unix_path"
44278  fi
44279
44280
44281  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44282  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44283  METHOD="well-known location"
44284
44285  # First check if the files exists.
44286  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44287    # We found an arbitrary include file. That's a good sign.
44288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44289$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44290    FOUND_FREETYPE=yes
44291
44292    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44293    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44294      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44295$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44296      FOUND_FREETYPE=no
44297    else
44298      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44299        # On Windows, we will need both .lib and .dll file.
44300        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44301          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44302$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44303          FOUND_FREETYPE=no
44304        fi
44305      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
44306        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44307        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44308      fi
44309    fi
44310  fi
44311
44312  if test "x$FOUND_FREETYPE" = xyes; then
44313
44314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44315
44316  # Input might be given as Windows format, start by converting to
44317  # unix format.
44318  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44319  new_path=`$CYGPATH -u "$path"`
44320
44321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44324  # "foo.exe" is OK but "foo" is an error.
44325  #
44326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44327  # It is also a way to make sure we got the proper file name for the real test later on.
44328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44329  if test "x$test_shortpath" = x; then
44330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44333  fi
44334
44335  # Call helper function which possibly converts this using DOS-style short mode.
44336  # If so, the updated path is stored in $new_path.
44337
44338  input_path="$new_path"
44339  # Check if we need to convert this using DOS-style short mode. If the path
44340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44341  # take no chances and rewrite it.
44342  # Note: m4 eats our [], so we need to use [ and ] instead.
44343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44344  if test "x$has_forbidden_chars" != x; then
44345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44349      # Going to short mode and back again did indeed matter. Since short mode is
44350      # case insensitive, let's make it lowercase to improve readability.
44351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44352      # Now convert it back to Unix-stile (cygpath)
44353      input_path=`$CYGPATH -u "$shortmode_path"`
44354      new_path="$input_path"
44355    fi
44356  fi
44357
44358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44359  if test "x$test_cygdrive_prefix" = x; then
44360    # As a simple fix, exclude /usr/bin since it's not a real path.
44361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44363      # a path prefixed by /cygdrive for fixpath to work.
44364      new_path="$CYGWIN_ROOT_PATH$input_path"
44365    fi
44366  fi
44367
44368
44369  if test "x$path" != "x$new_path"; then
44370    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44373  fi
44374
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376
44377  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44378  has_colon=`$ECHO $path | $GREP ^.:`
44379  new_path="$path"
44380  if test "x$has_colon" = x; then
44381    # Not in mixed or Windows style, start by that.
44382    new_path=`cmd //c echo $path`
44383  fi
44384
44385
44386  input_path="$new_path"
44387  # Check if we need to convert this using DOS-style short mode. If the path
44388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44389  # take no chances and rewrite it.
44390  # Note: m4 eats our [], so we need to use [ and ] instead.
44391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44392  if test "x$has_forbidden_chars" != x; then
44393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44395  fi
44396
44397
44398  windows_path="$new_path"
44399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44400    unix_path=`$CYGPATH -u "$windows_path"`
44401    new_path="$unix_path"
44402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44404    new_path="$unix_path"
44405  fi
44406
44407  if test "x$path" != "x$new_path"; then
44408    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44411  fi
44412
44413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44415
44416  else
44417    # We're on a posix platform. Hooray! :)
44418    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44419    has_space=`$ECHO "$path" | $GREP " "`
44420    if test "x$has_space" != x; then
44421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44423      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44424    fi
44425
44426    # Use eval to expand a potential ~
44427    eval path="$path"
44428    if test ! -f "$path" && test ! -d "$path"; then
44429      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44430    fi
44431
44432    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44433  fi
44434
44435
44436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44437
44438  # Input might be given as Windows format, start by converting to
44439  # unix format.
44440  path="$POTENTIAL_FREETYPE_LIB_PATH"
44441  new_path=`$CYGPATH -u "$path"`
44442
44443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44446  # "foo.exe" is OK but "foo" is an error.
44447  #
44448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44449  # It is also a way to make sure we got the proper file name for the real test later on.
44450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44451  if test "x$test_shortpath" = x; then
44452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44454    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44455  fi
44456
44457  # Call helper function which possibly converts this using DOS-style short mode.
44458  # If so, the updated path is stored in $new_path.
44459
44460  input_path="$new_path"
44461  # Check if we need to convert this using DOS-style short mode. If the path
44462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44463  # take no chances and rewrite it.
44464  # Note: m4 eats our [], so we need to use [ and ] instead.
44465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44466  if test "x$has_forbidden_chars" != x; then
44467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44471      # Going to short mode and back again did indeed matter. Since short mode is
44472      # case insensitive, let's make it lowercase to improve readability.
44473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44474      # Now convert it back to Unix-stile (cygpath)
44475      input_path=`$CYGPATH -u "$shortmode_path"`
44476      new_path="$input_path"
44477    fi
44478  fi
44479
44480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44481  if test "x$test_cygdrive_prefix" = x; then
44482    # As a simple fix, exclude /usr/bin since it's not a real path.
44483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44485      # a path prefixed by /cygdrive for fixpath to work.
44486      new_path="$CYGWIN_ROOT_PATH$input_path"
44487    fi
44488  fi
44489
44490
44491  if test "x$path" != "x$new_path"; then
44492    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44494$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44495  fi
44496
44497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44498
44499  path="$POTENTIAL_FREETYPE_LIB_PATH"
44500  has_colon=`$ECHO $path | $GREP ^.:`
44501  new_path="$path"
44502  if test "x$has_colon" = x; then
44503    # Not in mixed or Windows style, start by that.
44504    new_path=`cmd //c echo $path`
44505  fi
44506
44507
44508  input_path="$new_path"
44509  # Check if we need to convert this using DOS-style short mode. If the path
44510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44511  # take no chances and rewrite it.
44512  # Note: m4 eats our [], so we need to use [ and ] instead.
44513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44514  if test "x$has_forbidden_chars" != x; then
44515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44517  fi
44518
44519
44520  windows_path="$new_path"
44521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44522    unix_path=`$CYGPATH -u "$windows_path"`
44523    new_path="$unix_path"
44524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44526    new_path="$unix_path"
44527  fi
44528
44529  if test "x$path" != "x$new_path"; then
44530    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44532$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44533  fi
44534
44535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44537
44538  else
44539    # We're on a posix platform. Hooray! :)
44540    path="$POTENTIAL_FREETYPE_LIB_PATH"
44541    has_space=`$ECHO "$path" | $GREP " "`
44542    if test "x$has_space" != x; then
44543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44546    fi
44547
44548    # Use eval to expand a potential ~
44549    eval path="$path"
44550    if test ! -f "$path" && test ! -d "$path"; then
44551      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44552    fi
44553
44554    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44555  fi
44556
44557
44558    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44560$as_echo_n "checking for freetype includes... " >&6; }
44561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44562$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44563    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44565$as_echo_n "checking for freetype libraries... " >&6; }
44566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44567$as_echo "$FREETYPE_LIB_PATH" >&6; }
44568  fi
44569
44570          if test "x$FOUND_FREETYPE" != xyes; then
44571            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44572
44573  windows_path="$FREETYPE_BASE_DIR"
44574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44575    unix_path=`$CYGPATH -u "$windows_path"`
44576    FREETYPE_BASE_DIR="$unix_path"
44577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44579    FREETYPE_BASE_DIR="$unix_path"
44580  fi
44581
44582
44583  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44584  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44585  METHOD="well-known location"
44586
44587  # First check if the files exists.
44588  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44589    # We found an arbitrary include file. That's a good sign.
44590    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44591$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44592    FOUND_FREETYPE=yes
44593
44594    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44595    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44596      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44597$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44598      FOUND_FREETYPE=no
44599    else
44600      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44601        # On Windows, we will need both .lib and .dll file.
44602        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44603          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44604$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44605          FOUND_FREETYPE=no
44606        fi
44607      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
44608        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44609        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44610      fi
44611    fi
44612  fi
44613
44614  if test "x$FOUND_FREETYPE" = xyes; then
44615
44616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44617
44618  # Input might be given as Windows format, start by converting to
44619  # unix format.
44620  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44621  new_path=`$CYGPATH -u "$path"`
44622
44623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44626  # "foo.exe" is OK but "foo" is an error.
44627  #
44628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44629  # It is also a way to make sure we got the proper file name for the real test later on.
44630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44631  if test "x$test_shortpath" = x; then
44632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44634    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44635  fi
44636
44637  # Call helper function which possibly converts this using DOS-style short mode.
44638  # If so, the updated path is stored in $new_path.
44639
44640  input_path="$new_path"
44641  # Check if we need to convert this using DOS-style short mode. If the path
44642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44643  # take no chances and rewrite it.
44644  # Note: m4 eats our [], so we need to use [ and ] instead.
44645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44646  if test "x$has_forbidden_chars" != x; then
44647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44651      # Going to short mode and back again did indeed matter. Since short mode is
44652      # case insensitive, let's make it lowercase to improve readability.
44653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44654      # Now convert it back to Unix-stile (cygpath)
44655      input_path=`$CYGPATH -u "$shortmode_path"`
44656      new_path="$input_path"
44657    fi
44658  fi
44659
44660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44661  if test "x$test_cygdrive_prefix" = x; then
44662    # As a simple fix, exclude /usr/bin since it's not a real path.
44663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44665      # a path prefixed by /cygdrive for fixpath to work.
44666      new_path="$CYGWIN_ROOT_PATH$input_path"
44667    fi
44668  fi
44669
44670
44671  if test "x$path" != "x$new_path"; then
44672    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44675  fi
44676
44677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44678
44679  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44680  has_colon=`$ECHO $path | $GREP ^.:`
44681  new_path="$path"
44682  if test "x$has_colon" = x; then
44683    # Not in mixed or Windows style, start by that.
44684    new_path=`cmd //c echo $path`
44685  fi
44686
44687
44688  input_path="$new_path"
44689  # Check if we need to convert this using DOS-style short mode. If the path
44690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44691  # take no chances and rewrite it.
44692  # Note: m4 eats our [], so we need to use [ and ] instead.
44693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44694  if test "x$has_forbidden_chars" != x; then
44695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44697  fi
44698
44699
44700  windows_path="$new_path"
44701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44702    unix_path=`$CYGPATH -u "$windows_path"`
44703    new_path="$unix_path"
44704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44706    new_path="$unix_path"
44707  fi
44708
44709  if test "x$path" != "x$new_path"; then
44710    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44713  fi
44714
44715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44717
44718  else
44719    # We're on a posix platform. Hooray! :)
44720    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44721    has_space=`$ECHO "$path" | $GREP " "`
44722    if test "x$has_space" != x; then
44723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44725      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44726    fi
44727
44728    # Use eval to expand a potential ~
44729    eval path="$path"
44730    if test ! -f "$path" && test ! -d "$path"; then
44731      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44732    fi
44733
44734    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44735  fi
44736
44737
44738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44739
44740  # Input might be given as Windows format, start by converting to
44741  # unix format.
44742  path="$POTENTIAL_FREETYPE_LIB_PATH"
44743  new_path=`$CYGPATH -u "$path"`
44744
44745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44748  # "foo.exe" is OK but "foo" is an error.
44749  #
44750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44751  # It is also a way to make sure we got the proper file name for the real test later on.
44752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44753  if test "x$test_shortpath" = x; then
44754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44755$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44756    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44757  fi
44758
44759  # Call helper function which possibly converts this using DOS-style short mode.
44760  # If so, the updated path is stored in $new_path.
44761
44762  input_path="$new_path"
44763  # Check if we need to convert this using DOS-style short mode. If the path
44764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44765  # take no chances and rewrite it.
44766  # Note: m4 eats our [], so we need to use [ and ] instead.
44767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44768  if test "x$has_forbidden_chars" != x; then
44769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44773      # Going to short mode and back again did indeed matter. Since short mode is
44774      # case insensitive, let's make it lowercase to improve readability.
44775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44776      # Now convert it back to Unix-stile (cygpath)
44777      input_path=`$CYGPATH -u "$shortmode_path"`
44778      new_path="$input_path"
44779    fi
44780  fi
44781
44782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44783  if test "x$test_cygdrive_prefix" = x; then
44784    # As a simple fix, exclude /usr/bin since it's not a real path.
44785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44787      # a path prefixed by /cygdrive for fixpath to work.
44788      new_path="$CYGWIN_ROOT_PATH$input_path"
44789    fi
44790  fi
44791
44792
44793  if test "x$path" != "x$new_path"; then
44794    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44797  fi
44798
44799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44800
44801  path="$POTENTIAL_FREETYPE_LIB_PATH"
44802  has_colon=`$ECHO $path | $GREP ^.:`
44803  new_path="$path"
44804  if test "x$has_colon" = x; then
44805    # Not in mixed or Windows style, start by that.
44806    new_path=`cmd //c echo $path`
44807  fi
44808
44809
44810  input_path="$new_path"
44811  # Check if we need to convert this using DOS-style short mode. If the path
44812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44813  # take no chances and rewrite it.
44814  # Note: m4 eats our [], so we need to use [ and ] instead.
44815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44816  if test "x$has_forbidden_chars" != x; then
44817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44819  fi
44820
44821
44822  windows_path="$new_path"
44823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44824    unix_path=`$CYGPATH -u "$windows_path"`
44825    new_path="$unix_path"
44826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44828    new_path="$unix_path"
44829  fi
44830
44831  if test "x$path" != "x$new_path"; then
44832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44835  fi
44836
44837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44839
44840  else
44841    # We're on a posix platform. Hooray! :)
44842    path="$POTENTIAL_FREETYPE_LIB_PATH"
44843    has_space=`$ECHO "$path" | $GREP " "`
44844    if test "x$has_space" != x; then
44845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44846$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44847      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44848    fi
44849
44850    # Use eval to expand a potential ~
44851    eval path="$path"
44852    if test ! -f "$path" && test ! -d "$path"; then
44853      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44854    fi
44855
44856    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44857  fi
44858
44859
44860    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44862$as_echo_n "checking for freetype includes... " >&6; }
44863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44864$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44865    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44867$as_echo_n "checking for freetype libraries... " >&6; }
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44869$as_echo "$FREETYPE_LIB_PATH" >&6; }
44870  fi
44871
44872          fi
44873        else
44874          if test "x$SYS_ROOT" = "x/"; then
44875            FREETYPE_ROOT=
44876          else
44877            FREETYPE_ROOT="$SYS_ROOT"
44878          fi
44879          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44880
44881  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44882  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44883  METHOD="well-known location"
44884
44885  # First check if the files exists.
44886  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44887    # We found an arbitrary include file. That's a good sign.
44888    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44889$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44890    FOUND_FREETYPE=yes
44891
44892    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44893    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44894      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44895$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44896      FOUND_FREETYPE=no
44897    else
44898      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44899        # On Windows, we will need both .lib and .dll file.
44900        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44901          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44902$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44903          FOUND_FREETYPE=no
44904        fi
44905      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
44906        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44907        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44908      fi
44909    fi
44910  fi
44911
44912  if test "x$FOUND_FREETYPE" = xyes; then
44913
44914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44915
44916  # Input might be given as Windows format, start by converting to
44917  # unix format.
44918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44919  new_path=`$CYGPATH -u "$path"`
44920
44921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44924  # "foo.exe" is OK but "foo" is an error.
44925  #
44926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44927  # It is also a way to make sure we got the proper file name for the real test later on.
44928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44929  if test "x$test_shortpath" = x; then
44930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44931$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44932    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44933  fi
44934
44935  # Call helper function which possibly converts this using DOS-style short mode.
44936  # If so, the updated path is stored in $new_path.
44937
44938  input_path="$new_path"
44939  # Check if we need to convert this using DOS-style short mode. If the path
44940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44941  # take no chances and rewrite it.
44942  # Note: m4 eats our [], so we need to use [ and ] instead.
44943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44944  if test "x$has_forbidden_chars" != x; then
44945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44949      # Going to short mode and back again did indeed matter. Since short mode is
44950      # case insensitive, let's make it lowercase to improve readability.
44951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952      # Now convert it back to Unix-stile (cygpath)
44953      input_path=`$CYGPATH -u "$shortmode_path"`
44954      new_path="$input_path"
44955    fi
44956  fi
44957
44958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44959  if test "x$test_cygdrive_prefix" = x; then
44960    # As a simple fix, exclude /usr/bin since it's not a real path.
44961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44963      # a path prefixed by /cygdrive for fixpath to work.
44964      new_path="$CYGWIN_ROOT_PATH$input_path"
44965    fi
44966  fi
44967
44968
44969  if test "x$path" != "x$new_path"; then
44970    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44973  fi
44974
44975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44976
44977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44978  has_colon=`$ECHO $path | $GREP ^.:`
44979  new_path="$path"
44980  if test "x$has_colon" = x; then
44981    # Not in mixed or Windows style, start by that.
44982    new_path=`cmd //c echo $path`
44983  fi
44984
44985
44986  input_path="$new_path"
44987  # Check if we need to convert this using DOS-style short mode. If the path
44988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44989  # take no chances and rewrite it.
44990  # Note: m4 eats our [], so we need to use [ and ] instead.
44991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44992  if test "x$has_forbidden_chars" != x; then
44993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44995  fi
44996
44997
44998  windows_path="$new_path"
44999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45000    unix_path=`$CYGPATH -u "$windows_path"`
45001    new_path="$unix_path"
45002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45004    new_path="$unix_path"
45005  fi
45006
45007  if test "x$path" != "x$new_path"; then
45008    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45011  fi
45012
45013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45015
45016  else
45017    # We're on a posix platform. Hooray! :)
45018    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45019    has_space=`$ECHO "$path" | $GREP " "`
45020    if test "x$has_space" != x; then
45021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45023      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45024    fi
45025
45026    # Use eval to expand a potential ~
45027    eval path="$path"
45028    if test ! -f "$path" && test ! -d "$path"; then
45029      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45030    fi
45031
45032    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45033  fi
45034
45035
45036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45037
45038  # Input might be given as Windows format, start by converting to
45039  # unix format.
45040  path="$POTENTIAL_FREETYPE_LIB_PATH"
45041  new_path=`$CYGPATH -u "$path"`
45042
45043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45046  # "foo.exe" is OK but "foo" is an error.
45047  #
45048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45049  # It is also a way to make sure we got the proper file name for the real test later on.
45050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45051  if test "x$test_shortpath" = x; then
45052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45053$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45054    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45055  fi
45056
45057  # Call helper function which possibly converts this using DOS-style short mode.
45058  # If so, the updated path is stored in $new_path.
45059
45060  input_path="$new_path"
45061  # Check if we need to convert this using DOS-style short mode. If the path
45062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45063  # take no chances and rewrite it.
45064  # Note: m4 eats our [], so we need to use [ and ] instead.
45065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45066  if test "x$has_forbidden_chars" != x; then
45067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45071      # Going to short mode and back again did indeed matter. Since short mode is
45072      # case insensitive, let's make it lowercase to improve readability.
45073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45074      # Now convert it back to Unix-stile (cygpath)
45075      input_path=`$CYGPATH -u "$shortmode_path"`
45076      new_path="$input_path"
45077    fi
45078  fi
45079
45080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45081  if test "x$test_cygdrive_prefix" = x; then
45082    # As a simple fix, exclude /usr/bin since it's not a real path.
45083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45085      # a path prefixed by /cygdrive for fixpath to work.
45086      new_path="$CYGWIN_ROOT_PATH$input_path"
45087    fi
45088  fi
45089
45090
45091  if test "x$path" != "x$new_path"; then
45092    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45094$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45095  fi
45096
45097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45098
45099  path="$POTENTIAL_FREETYPE_LIB_PATH"
45100  has_colon=`$ECHO $path | $GREP ^.:`
45101  new_path="$path"
45102  if test "x$has_colon" = x; then
45103    # Not in mixed or Windows style, start by that.
45104    new_path=`cmd //c echo $path`
45105  fi
45106
45107
45108  input_path="$new_path"
45109  # Check if we need to convert this using DOS-style short mode. If the path
45110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45111  # take no chances and rewrite it.
45112  # Note: m4 eats our [], so we need to use [ and ] instead.
45113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45114  if test "x$has_forbidden_chars" != x; then
45115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45117  fi
45118
45119
45120  windows_path="$new_path"
45121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45122    unix_path=`$CYGPATH -u "$windows_path"`
45123    new_path="$unix_path"
45124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45126    new_path="$unix_path"
45127  fi
45128
45129  if test "x$path" != "x$new_path"; then
45130    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45133  fi
45134
45135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45137
45138  else
45139    # We're on a posix platform. Hooray! :)
45140    path="$POTENTIAL_FREETYPE_LIB_PATH"
45141    has_space=`$ECHO "$path" | $GREP " "`
45142    if test "x$has_space" != x; then
45143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45144$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45145      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45146    fi
45147
45148    # Use eval to expand a potential ~
45149    eval path="$path"
45150    if test ! -f "$path" && test ! -d "$path"; then
45151      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45152    fi
45153
45154    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45155  fi
45156
45157
45158    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45160$as_echo_n "checking for freetype includes... " >&6; }
45161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45162$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45163    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45165$as_echo_n "checking for freetype libraries... " >&6; }
45166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45167$as_echo "$FREETYPE_LIB_PATH" >&6; }
45168  fi
45169
45170
45171          if test "x$FOUND_FREETYPE" != xyes; then
45172            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
45173
45174  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45175  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45176  METHOD="well-known location"
45177
45178  # First check if the files exists.
45179  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45180    # We found an arbitrary include file. That's a good sign.
45181    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45182$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45183    FOUND_FREETYPE=yes
45184
45185    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45186    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45187      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45188$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45189      FOUND_FREETYPE=no
45190    else
45191      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45192        # On Windows, we will need both .lib and .dll file.
45193        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45194          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45196          FOUND_FREETYPE=no
45197        fi
45198      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
45199        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45200        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45201      fi
45202    fi
45203  fi
45204
45205  if test "x$FOUND_FREETYPE" = xyes; then
45206
45207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45208
45209  # Input might be given as Windows format, start by converting to
45210  # unix format.
45211  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45212  new_path=`$CYGPATH -u "$path"`
45213
45214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45217  # "foo.exe" is OK but "foo" is an error.
45218  #
45219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45220  # It is also a way to make sure we got the proper file name for the real test later on.
45221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45222  if test "x$test_shortpath" = x; then
45223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45225    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45226  fi
45227
45228  # Call helper function which possibly converts this using DOS-style short mode.
45229  # If so, the updated path is stored in $new_path.
45230
45231  input_path="$new_path"
45232  # Check if we need to convert this using DOS-style short mode. If the path
45233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45234  # take no chances and rewrite it.
45235  # Note: m4 eats our [], so we need to use [ and ] instead.
45236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45237  if test "x$has_forbidden_chars" != x; then
45238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45242      # Going to short mode and back again did indeed matter. Since short mode is
45243      # case insensitive, let's make it lowercase to improve readability.
45244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45245      # Now convert it back to Unix-stile (cygpath)
45246      input_path=`$CYGPATH -u "$shortmode_path"`
45247      new_path="$input_path"
45248    fi
45249  fi
45250
45251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45252  if test "x$test_cygdrive_prefix" = x; then
45253    # As a simple fix, exclude /usr/bin since it's not a real path.
45254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45256      # a path prefixed by /cygdrive for fixpath to work.
45257      new_path="$CYGWIN_ROOT_PATH$input_path"
45258    fi
45259  fi
45260
45261
45262  if test "x$path" != "x$new_path"; then
45263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45266  fi
45267
45268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45269
45270  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45271  has_colon=`$ECHO $path | $GREP ^.:`
45272  new_path="$path"
45273  if test "x$has_colon" = x; then
45274    # Not in mixed or Windows style, start by that.
45275    new_path=`cmd //c echo $path`
45276  fi
45277
45278
45279  input_path="$new_path"
45280  # Check if we need to convert this using DOS-style short mode. If the path
45281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45282  # take no chances and rewrite it.
45283  # Note: m4 eats our [], so we need to use [ and ] instead.
45284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45285  if test "x$has_forbidden_chars" != x; then
45286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45288  fi
45289
45290
45291  windows_path="$new_path"
45292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45293    unix_path=`$CYGPATH -u "$windows_path"`
45294    new_path="$unix_path"
45295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45297    new_path="$unix_path"
45298  fi
45299
45300  if test "x$path" != "x$new_path"; then
45301    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45303$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45304  fi
45305
45306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45308
45309  else
45310    # We're on a posix platform. Hooray! :)
45311    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45312    has_space=`$ECHO "$path" | $GREP " "`
45313    if test "x$has_space" != x; then
45314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45315$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45316      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45317    fi
45318
45319    # Use eval to expand a potential ~
45320    eval path="$path"
45321    if test ! -f "$path" && test ! -d "$path"; then
45322      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45323    fi
45324
45325    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45326  fi
45327
45328
45329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45330
45331  # Input might be given as Windows format, start by converting to
45332  # unix format.
45333  path="$POTENTIAL_FREETYPE_LIB_PATH"
45334  new_path=`$CYGPATH -u "$path"`
45335
45336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45339  # "foo.exe" is OK but "foo" is an error.
45340  #
45341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45342  # It is also a way to make sure we got the proper file name for the real test later on.
45343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45344  if test "x$test_shortpath" = x; then
45345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45346$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45347    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45348  fi
45349
45350  # Call helper function which possibly converts this using DOS-style short mode.
45351  # If so, the updated path is stored in $new_path.
45352
45353  input_path="$new_path"
45354  # Check if we need to convert this using DOS-style short mode. If the path
45355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45356  # take no chances and rewrite it.
45357  # Note: m4 eats our [], so we need to use [ and ] instead.
45358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45359  if test "x$has_forbidden_chars" != x; then
45360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45364      # Going to short mode and back again did indeed matter. Since short mode is
45365      # case insensitive, let's make it lowercase to improve readability.
45366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45367      # Now convert it back to Unix-stile (cygpath)
45368      input_path=`$CYGPATH -u "$shortmode_path"`
45369      new_path="$input_path"
45370    fi
45371  fi
45372
45373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45374  if test "x$test_cygdrive_prefix" = x; then
45375    # As a simple fix, exclude /usr/bin since it's not a real path.
45376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45378      # a path prefixed by /cygdrive for fixpath to work.
45379      new_path="$CYGWIN_ROOT_PATH$input_path"
45380    fi
45381  fi
45382
45383
45384  if test "x$path" != "x$new_path"; then
45385    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45387$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45388  fi
45389
45390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45391
45392  path="$POTENTIAL_FREETYPE_LIB_PATH"
45393  has_colon=`$ECHO $path | $GREP ^.:`
45394  new_path="$path"
45395  if test "x$has_colon" = x; then
45396    # Not in mixed or Windows style, start by that.
45397    new_path=`cmd //c echo $path`
45398  fi
45399
45400
45401  input_path="$new_path"
45402  # Check if we need to convert this using DOS-style short mode. If the path
45403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45404  # take no chances and rewrite it.
45405  # Note: m4 eats our [], so we need to use [ and ] instead.
45406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45407  if test "x$has_forbidden_chars" != x; then
45408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45410  fi
45411
45412
45413  windows_path="$new_path"
45414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45415    unix_path=`$CYGPATH -u "$windows_path"`
45416    new_path="$unix_path"
45417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45419    new_path="$unix_path"
45420  fi
45421
45422  if test "x$path" != "x$new_path"; then
45423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45426  fi
45427
45428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45430
45431  else
45432    # We're on a posix platform. Hooray! :)
45433    path="$POTENTIAL_FREETYPE_LIB_PATH"
45434    has_space=`$ECHO "$path" | $GREP " "`
45435    if test "x$has_space" != x; then
45436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45437$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45438      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45439    fi
45440
45441    # Use eval to expand a potential ~
45442    eval path="$path"
45443    if test ! -f "$path" && test ! -d "$path"; then
45444      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45445    fi
45446
45447    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45448  fi
45449
45450
45451    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45453$as_echo_n "checking for freetype includes... " >&6; }
45454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45455$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45456    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45458$as_echo_n "checking for freetype libraries... " >&6; }
45459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45460$as_echo "$FREETYPE_LIB_PATH" >&6; }
45461  fi
45462
45463          fi
45464
45465          if test "x$FOUND_FREETYPE" != xyes; then
45466            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45467            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45468
45469  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45470  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45471  METHOD="well-known location"
45472
45473  # First check if the files exists.
45474  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45475    # We found an arbitrary include file. That's a good sign.
45476    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45477$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45478    FOUND_FREETYPE=yes
45479
45480    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45481    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45482      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45484      FOUND_FREETYPE=no
45485    else
45486      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45487        # On Windows, we will need both .lib and .dll file.
45488        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45489          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45490$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45491          FOUND_FREETYPE=no
45492        fi
45493      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
45494        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45495        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45496      fi
45497    fi
45498  fi
45499
45500  if test "x$FOUND_FREETYPE" = xyes; then
45501
45502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45503
45504  # Input might be given as Windows format, start by converting to
45505  # unix format.
45506  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45507  new_path=`$CYGPATH -u "$path"`
45508
45509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45512  # "foo.exe" is OK but "foo" is an error.
45513  #
45514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45515  # It is also a way to make sure we got the proper file name for the real test later on.
45516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45517  if test "x$test_shortpath" = x; then
45518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45520    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45521  fi
45522
45523  # Call helper function which possibly converts this using DOS-style short mode.
45524  # If so, the updated path is stored in $new_path.
45525
45526  input_path="$new_path"
45527  # Check if we need to convert this using DOS-style short mode. If the path
45528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45529  # take no chances and rewrite it.
45530  # Note: m4 eats our [], so we need to use [ and ] instead.
45531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45532  if test "x$has_forbidden_chars" != x; then
45533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45537      # Going to short mode and back again did indeed matter. Since short mode is
45538      # case insensitive, let's make it lowercase to improve readability.
45539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45540      # Now convert it back to Unix-stile (cygpath)
45541      input_path=`$CYGPATH -u "$shortmode_path"`
45542      new_path="$input_path"
45543    fi
45544  fi
45545
45546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45547  if test "x$test_cygdrive_prefix" = x; then
45548    # As a simple fix, exclude /usr/bin since it's not a real path.
45549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45551      # a path prefixed by /cygdrive for fixpath to work.
45552      new_path="$CYGWIN_ROOT_PATH$input_path"
45553    fi
45554  fi
45555
45556
45557  if test "x$path" != "x$new_path"; then
45558    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45561  fi
45562
45563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45564
45565  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45566  has_colon=`$ECHO $path | $GREP ^.:`
45567  new_path="$path"
45568  if test "x$has_colon" = x; then
45569    # Not in mixed or Windows style, start by that.
45570    new_path=`cmd //c echo $path`
45571  fi
45572
45573
45574  input_path="$new_path"
45575  # Check if we need to convert this using DOS-style short mode. If the path
45576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45577  # take no chances and rewrite it.
45578  # Note: m4 eats our [], so we need to use [ and ] instead.
45579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45580  if test "x$has_forbidden_chars" != x; then
45581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45583  fi
45584
45585
45586  windows_path="$new_path"
45587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45588    unix_path=`$CYGPATH -u "$windows_path"`
45589    new_path="$unix_path"
45590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45592    new_path="$unix_path"
45593  fi
45594
45595  if test "x$path" != "x$new_path"; then
45596    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45599  fi
45600
45601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45603
45604  else
45605    # We're on a posix platform. Hooray! :)
45606    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45607    has_space=`$ECHO "$path" | $GREP " "`
45608    if test "x$has_space" != x; then
45609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45612    fi
45613
45614    # Use eval to expand a potential ~
45615    eval path="$path"
45616    if test ! -f "$path" && test ! -d "$path"; then
45617      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45618    fi
45619
45620    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45621  fi
45622
45623
45624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45625
45626  # Input might be given as Windows format, start by converting to
45627  # unix format.
45628  path="$POTENTIAL_FREETYPE_LIB_PATH"
45629  new_path=`$CYGPATH -u "$path"`
45630
45631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45634  # "foo.exe" is OK but "foo" is an error.
45635  #
45636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45637  # It is also a way to make sure we got the proper file name for the real test later on.
45638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45639  if test "x$test_shortpath" = x; then
45640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45641$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45642    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45643  fi
45644
45645  # Call helper function which possibly converts this using DOS-style short mode.
45646  # If so, the updated path is stored in $new_path.
45647
45648  input_path="$new_path"
45649  # Check if we need to convert this using DOS-style short mode. If the path
45650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45651  # take no chances and rewrite it.
45652  # Note: m4 eats our [], so we need to use [ and ] instead.
45653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45654  if test "x$has_forbidden_chars" != x; then
45655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45659      # Going to short mode and back again did indeed matter. Since short mode is
45660      # case insensitive, let's make it lowercase to improve readability.
45661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45662      # Now convert it back to Unix-stile (cygpath)
45663      input_path=`$CYGPATH -u "$shortmode_path"`
45664      new_path="$input_path"
45665    fi
45666  fi
45667
45668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45669  if test "x$test_cygdrive_prefix" = x; then
45670    # As a simple fix, exclude /usr/bin since it's not a real path.
45671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45673      # a path prefixed by /cygdrive for fixpath to work.
45674      new_path="$CYGWIN_ROOT_PATH$input_path"
45675    fi
45676  fi
45677
45678
45679  if test "x$path" != "x$new_path"; then
45680    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45683  fi
45684
45685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45686
45687  path="$POTENTIAL_FREETYPE_LIB_PATH"
45688  has_colon=`$ECHO $path | $GREP ^.:`
45689  new_path="$path"
45690  if test "x$has_colon" = x; then
45691    # Not in mixed or Windows style, start by that.
45692    new_path=`cmd //c echo $path`
45693  fi
45694
45695
45696  input_path="$new_path"
45697  # Check if we need to convert this using DOS-style short mode. If the path
45698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45699  # take no chances and rewrite it.
45700  # Note: m4 eats our [], so we need to use [ and ] instead.
45701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45702  if test "x$has_forbidden_chars" != x; then
45703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45705  fi
45706
45707
45708  windows_path="$new_path"
45709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45710    unix_path=`$CYGPATH -u "$windows_path"`
45711    new_path="$unix_path"
45712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45714    new_path="$unix_path"
45715  fi
45716
45717  if test "x$path" != "x$new_path"; then
45718    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45720$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45721  fi
45722
45723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45725
45726  else
45727    # We're on a posix platform. Hooray! :)
45728    path="$POTENTIAL_FREETYPE_LIB_PATH"
45729    has_space=`$ECHO "$path" | $GREP " "`
45730    if test "x$has_space" != x; then
45731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45732$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45733      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45734    fi
45735
45736    # Use eval to expand a potential ~
45737    eval path="$path"
45738    if test ! -f "$path" && test ! -d "$path"; then
45739      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45740    fi
45741
45742    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45743  fi
45744
45745
45746    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45748$as_echo_n "checking for freetype includes... " >&6; }
45749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45750$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45751    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45753$as_echo_n "checking for freetype libraries... " >&6; }
45754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45755$as_echo "$FREETYPE_LIB_PATH" >&6; }
45756  fi
45757
45758            else
45759
45760  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45761  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45762  METHOD="well-known location"
45763
45764  # First check if the files exists.
45765  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45766    # We found an arbitrary include file. That's a good sign.
45767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45768$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45769    FOUND_FREETYPE=yes
45770
45771    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45772    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45773      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45774$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45775      FOUND_FREETYPE=no
45776    else
45777      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45778        # On Windows, we will need both .lib and .dll file.
45779        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45780          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45782          FOUND_FREETYPE=no
45783        fi
45784      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
45785        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45786        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45787      fi
45788    fi
45789  fi
45790
45791  if test "x$FOUND_FREETYPE" = xyes; then
45792
45793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45794
45795  # Input might be given as Windows format, start by converting to
45796  # unix format.
45797  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45798  new_path=`$CYGPATH -u "$path"`
45799
45800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45803  # "foo.exe" is OK but "foo" is an error.
45804  #
45805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45806  # It is also a way to make sure we got the proper file name for the real test later on.
45807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45808  if test "x$test_shortpath" = x; then
45809    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45811    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45812  fi
45813
45814  # Call helper function which possibly converts this using DOS-style short mode.
45815  # If so, the updated path is stored in $new_path.
45816
45817  input_path="$new_path"
45818  # Check if we need to convert this using DOS-style short mode. If the path
45819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45820  # take no chances and rewrite it.
45821  # Note: m4 eats our [], so we need to use [ and ] instead.
45822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45823  if test "x$has_forbidden_chars" != x; then
45824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45825    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45826    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45827    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45828      # Going to short mode and back again did indeed matter. Since short mode is
45829      # case insensitive, let's make it lowercase to improve readability.
45830      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45831      # Now convert it back to Unix-stile (cygpath)
45832      input_path=`$CYGPATH -u "$shortmode_path"`
45833      new_path="$input_path"
45834    fi
45835  fi
45836
45837  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45838  if test "x$test_cygdrive_prefix" = x; then
45839    # As a simple fix, exclude /usr/bin since it's not a real path.
45840    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45841      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45842      # a path prefixed by /cygdrive for fixpath to work.
45843      new_path="$CYGWIN_ROOT_PATH$input_path"
45844    fi
45845  fi
45846
45847
45848  if test "x$path" != "x$new_path"; then
45849    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45851$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45852  fi
45853
45854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45855
45856  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45857  has_colon=`$ECHO $path | $GREP ^.:`
45858  new_path="$path"
45859  if test "x$has_colon" = x; then
45860    # Not in mixed or Windows style, start by that.
45861    new_path=`cmd //c echo $path`
45862  fi
45863
45864
45865  input_path="$new_path"
45866  # Check if we need to convert this using DOS-style short mode. If the path
45867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45868  # take no chances and rewrite it.
45869  # Note: m4 eats our [], so we need to use [ and ] instead.
45870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45871  if test "x$has_forbidden_chars" != x; then
45872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45874  fi
45875
45876
45877  windows_path="$new_path"
45878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45879    unix_path=`$CYGPATH -u "$windows_path"`
45880    new_path="$unix_path"
45881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45883    new_path="$unix_path"
45884  fi
45885
45886  if test "x$path" != "x$new_path"; then
45887    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45890  fi
45891
45892  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45893  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45894
45895  else
45896    # We're on a posix platform. Hooray! :)
45897    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45898    has_space=`$ECHO "$path" | $GREP " "`
45899    if test "x$has_space" != x; then
45900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45902      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45903    fi
45904
45905    # Use eval to expand a potential ~
45906    eval path="$path"
45907    if test ! -f "$path" && test ! -d "$path"; then
45908      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45909    fi
45910
45911    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45912  fi
45913
45914
45915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45916
45917  # Input might be given as Windows format, start by converting to
45918  # unix format.
45919  path="$POTENTIAL_FREETYPE_LIB_PATH"
45920  new_path=`$CYGPATH -u "$path"`
45921
45922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45925  # "foo.exe" is OK but "foo" is an error.
45926  #
45927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45928  # It is also a way to make sure we got the proper file name for the real test later on.
45929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45930  if test "x$test_shortpath" = x; then
45931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45932$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45933    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45934  fi
45935
45936  # Call helper function which possibly converts this using DOS-style short mode.
45937  # If so, the updated path is stored in $new_path.
45938
45939  input_path="$new_path"
45940  # Check if we need to convert this using DOS-style short mode. If the path
45941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45942  # take no chances and rewrite it.
45943  # Note: m4 eats our [], so we need to use [ and ] instead.
45944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45945  if test "x$has_forbidden_chars" != x; then
45946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45950      # Going to short mode and back again did indeed matter. Since short mode is
45951      # case insensitive, let's make it lowercase to improve readability.
45952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45953      # Now convert it back to Unix-stile (cygpath)
45954      input_path=`$CYGPATH -u "$shortmode_path"`
45955      new_path="$input_path"
45956    fi
45957  fi
45958
45959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45960  if test "x$test_cygdrive_prefix" = x; then
45961    # As a simple fix, exclude /usr/bin since it's not a real path.
45962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45964      # a path prefixed by /cygdrive for fixpath to work.
45965      new_path="$CYGWIN_ROOT_PATH$input_path"
45966    fi
45967  fi
45968
45969
45970  if test "x$path" != "x$new_path"; then
45971    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45974  fi
45975
45976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45977
45978  path="$POTENTIAL_FREETYPE_LIB_PATH"
45979  has_colon=`$ECHO $path | $GREP ^.:`
45980  new_path="$path"
45981  if test "x$has_colon" = x; then
45982    # Not in mixed or Windows style, start by that.
45983    new_path=`cmd //c echo $path`
45984  fi
45985
45986
45987  input_path="$new_path"
45988  # Check if we need to convert this using DOS-style short mode. If the path
45989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45990  # take no chances and rewrite it.
45991  # Note: m4 eats our [], so we need to use [ and ] instead.
45992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45993  if test "x$has_forbidden_chars" != x; then
45994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45996  fi
45997
45998
45999  windows_path="$new_path"
46000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46001    unix_path=`$CYGPATH -u "$windows_path"`
46002    new_path="$unix_path"
46003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46005    new_path="$unix_path"
46006  fi
46007
46008  if test "x$path" != "x$new_path"; then
46009    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46012  fi
46013
46014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46016
46017  else
46018    # We're on a posix platform. Hooray! :)
46019    path="$POTENTIAL_FREETYPE_LIB_PATH"
46020    has_space=`$ECHO "$path" | $GREP " "`
46021    if test "x$has_space" != x; then
46022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46024      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46025    fi
46026
46027    # Use eval to expand a potential ~
46028    eval path="$path"
46029    if test ! -f "$path" && test ! -d "$path"; then
46030      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46031    fi
46032
46033    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46034  fi
46035
46036
46037    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46039$as_echo_n "checking for freetype includes... " >&6; }
46040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46041$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46042    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46044$as_echo_n "checking for freetype libraries... " >&6; }
46045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46046$as_echo "$FREETYPE_LIB_PATH" >&6; }
46047  fi
46048
46049              if test "x$FOUND_FREETYPE" != xyes; then
46050
46051  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46052  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46053  METHOD="well-known location"
46054
46055  # First check if the files exists.
46056  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46057    # We found an arbitrary include file. That's a good sign.
46058    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46059$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46060    FOUND_FREETYPE=yes
46061
46062    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46063    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46064      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46065$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46066      FOUND_FREETYPE=no
46067    else
46068      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46069        # On Windows, we will need both .lib and .dll file.
46070        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46071          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46072$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46073          FOUND_FREETYPE=no
46074        fi
46075      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
46076        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46077        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46078      fi
46079    fi
46080  fi
46081
46082  if test "x$FOUND_FREETYPE" = xyes; then
46083
46084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46085
46086  # Input might be given as Windows format, start by converting to
46087  # unix format.
46088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46089  new_path=`$CYGPATH -u "$path"`
46090
46091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46094  # "foo.exe" is OK but "foo" is an error.
46095  #
46096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46097  # It is also a way to make sure we got the proper file name for the real test later on.
46098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46099  if test "x$test_shortpath" = x; then
46100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46102    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46103  fi
46104
46105  # Call helper function which possibly converts this using DOS-style short mode.
46106  # If so, the updated path is stored in $new_path.
46107
46108  input_path="$new_path"
46109  # Check if we need to convert this using DOS-style short mode. If the path
46110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46111  # take no chances and rewrite it.
46112  # Note: m4 eats our [], so we need to use [ and ] instead.
46113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46114  if test "x$has_forbidden_chars" != x; then
46115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46119      # Going to short mode and back again did indeed matter. Since short mode is
46120      # case insensitive, let's make it lowercase to improve readability.
46121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46122      # Now convert it back to Unix-stile (cygpath)
46123      input_path=`$CYGPATH -u "$shortmode_path"`
46124      new_path="$input_path"
46125    fi
46126  fi
46127
46128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46129  if test "x$test_cygdrive_prefix" = x; then
46130    # As a simple fix, exclude /usr/bin since it's not a real path.
46131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46133      # a path prefixed by /cygdrive for fixpath to work.
46134      new_path="$CYGWIN_ROOT_PATH$input_path"
46135    fi
46136  fi
46137
46138
46139  if test "x$path" != "x$new_path"; then
46140    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46142$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46143  fi
46144
46145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46146
46147  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46148  has_colon=`$ECHO $path | $GREP ^.:`
46149  new_path="$path"
46150  if test "x$has_colon" = x; then
46151    # Not in mixed or Windows style, start by that.
46152    new_path=`cmd //c echo $path`
46153  fi
46154
46155
46156  input_path="$new_path"
46157  # Check if we need to convert this using DOS-style short mode. If the path
46158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46159  # take no chances and rewrite it.
46160  # Note: m4 eats our [], so we need to use [ and ] instead.
46161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46162  if test "x$has_forbidden_chars" != x; then
46163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46165  fi
46166
46167
46168  windows_path="$new_path"
46169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46170    unix_path=`$CYGPATH -u "$windows_path"`
46171    new_path="$unix_path"
46172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46174    new_path="$unix_path"
46175  fi
46176
46177  if test "x$path" != "x$new_path"; then
46178    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46181  fi
46182
46183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46185
46186  else
46187    # We're on a posix platform. Hooray! :)
46188    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46189    has_space=`$ECHO "$path" | $GREP " "`
46190    if test "x$has_space" != x; then
46191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46194    fi
46195
46196    # Use eval to expand a potential ~
46197    eval path="$path"
46198    if test ! -f "$path" && test ! -d "$path"; then
46199      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46200    fi
46201
46202    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46203  fi
46204
46205
46206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46207
46208  # Input might be given as Windows format, start by converting to
46209  # unix format.
46210  path="$POTENTIAL_FREETYPE_LIB_PATH"
46211  new_path=`$CYGPATH -u "$path"`
46212
46213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46216  # "foo.exe" is OK but "foo" is an error.
46217  #
46218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46219  # It is also a way to make sure we got the proper file name for the real test later on.
46220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46221  if test "x$test_shortpath" = x; then
46222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46225  fi
46226
46227  # Call helper function which possibly converts this using DOS-style short mode.
46228  # If so, the updated path is stored in $new_path.
46229
46230  input_path="$new_path"
46231  # Check if we need to convert this using DOS-style short mode. If the path
46232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46233  # take no chances and rewrite it.
46234  # Note: m4 eats our [], so we need to use [ and ] instead.
46235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46236  if test "x$has_forbidden_chars" != x; then
46237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46241      # Going to short mode and back again did indeed matter. Since short mode is
46242      # case insensitive, let's make it lowercase to improve readability.
46243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46244      # Now convert it back to Unix-stile (cygpath)
46245      input_path=`$CYGPATH -u "$shortmode_path"`
46246      new_path="$input_path"
46247    fi
46248  fi
46249
46250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46251  if test "x$test_cygdrive_prefix" = x; then
46252    # As a simple fix, exclude /usr/bin since it's not a real path.
46253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46255      # a path prefixed by /cygdrive for fixpath to work.
46256      new_path="$CYGWIN_ROOT_PATH$input_path"
46257    fi
46258  fi
46259
46260
46261  if test "x$path" != "x$new_path"; then
46262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46265  fi
46266
46267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46268
46269  path="$POTENTIAL_FREETYPE_LIB_PATH"
46270  has_colon=`$ECHO $path | $GREP ^.:`
46271  new_path="$path"
46272  if test "x$has_colon" = x; then
46273    # Not in mixed or Windows style, start by that.
46274    new_path=`cmd //c echo $path`
46275  fi
46276
46277
46278  input_path="$new_path"
46279  # Check if we need to convert this using DOS-style short mode. If the path
46280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46281  # take no chances and rewrite it.
46282  # Note: m4 eats our [], so we need to use [ and ] instead.
46283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46284  if test "x$has_forbidden_chars" != x; then
46285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46287  fi
46288
46289
46290  windows_path="$new_path"
46291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46292    unix_path=`$CYGPATH -u "$windows_path"`
46293    new_path="$unix_path"
46294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46296    new_path="$unix_path"
46297  fi
46298
46299  if test "x$path" != "x$new_path"; then
46300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46303  fi
46304
46305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46307
46308  else
46309    # We're on a posix platform. Hooray! :)
46310    path="$POTENTIAL_FREETYPE_LIB_PATH"
46311    has_space=`$ECHO "$path" | $GREP " "`
46312    if test "x$has_space" != x; then
46313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46315      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46316    fi
46317
46318    # Use eval to expand a potential ~
46319    eval path="$path"
46320    if test ! -f "$path" && test ! -d "$path"; then
46321      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46322    fi
46323
46324    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46325  fi
46326
46327
46328    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46330$as_echo_n "checking for freetype includes... " >&6; }
46331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46332$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46333    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46335$as_echo_n "checking for freetype libraries... " >&6; }
46336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46337$as_echo "$FREETYPE_LIB_PATH" >&6; }
46338  fi
46339
46340              fi
46341            fi
46342          fi
46343        fi
46344      fi # end check in well-known locations
46345
46346      if test "x$FOUND_FREETYPE" != xyes; then
46347
46348  # Print a helpful message on how to acquire the necessary build dependency.
46349  # freetype is the help tag: freetype, cups, pulse, alsa etc
46350  MISSING_DEPENDENCY=freetype
46351
46352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46353    cygwin_help $MISSING_DEPENDENCY
46354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46355    msys_help $MISSING_DEPENDENCY
46356  else
46357    PKGHANDLER_COMMAND=
46358
46359    case $PKGHANDLER in
46360      apt-get)
46361        apt_help     $MISSING_DEPENDENCY ;;
46362      yum)
46363        yum_help     $MISSING_DEPENDENCY ;;
46364      port)
46365        port_help    $MISSING_DEPENDENCY ;;
46366      pkgutil)
46367        pkgutil_help $MISSING_DEPENDENCY ;;
46368      pkgadd)
46369        pkgadd_help  $MISSING_DEPENDENCY ;;
46370    esac
46371
46372    if test "x$PKGHANDLER_COMMAND" != x; then
46373      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46374    fi
46375  fi
46376
46377        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46378      fi
46379    fi # end user specified settings
46380
46381    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46382    if test "x$FREETYPE_CFLAGS" = x; then
46383
46384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46385
46386  # Input might be given as Windows format, start by converting to
46387  # unix format.
46388  path="$FREETYPE_INCLUDE_PATH"
46389  new_path=`$CYGPATH -u "$path"`
46390
46391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46394  # "foo.exe" is OK but "foo" is an error.
46395  #
46396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46397  # It is also a way to make sure we got the proper file name for the real test later on.
46398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46399  if test "x$test_shortpath" = x; then
46400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46401$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46402    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46403  fi
46404
46405  # Call helper function which possibly converts this using DOS-style short mode.
46406  # If so, the updated path is stored in $new_path.
46407
46408  input_path="$new_path"
46409  # Check if we need to convert this using DOS-style short mode. If the path
46410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46411  # take no chances and rewrite it.
46412  # Note: m4 eats our [], so we need to use [ and ] instead.
46413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46414  if test "x$has_forbidden_chars" != x; then
46415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46419      # Going to short mode and back again did indeed matter. Since short mode is
46420      # case insensitive, let's make it lowercase to improve readability.
46421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46422      # Now convert it back to Unix-stile (cygpath)
46423      input_path=`$CYGPATH -u "$shortmode_path"`
46424      new_path="$input_path"
46425    fi
46426  fi
46427
46428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46429  if test "x$test_cygdrive_prefix" = x; then
46430    # As a simple fix, exclude /usr/bin since it's not a real path.
46431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46433      # a path prefixed by /cygdrive for fixpath to work.
46434      new_path="$CYGWIN_ROOT_PATH$input_path"
46435    fi
46436  fi
46437
46438
46439  if test "x$path" != "x$new_path"; then
46440    FREETYPE_INCLUDE_PATH="$new_path"
46441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46442$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46443  fi
46444
46445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46446
46447  path="$FREETYPE_INCLUDE_PATH"
46448  has_colon=`$ECHO $path | $GREP ^.:`
46449  new_path="$path"
46450  if test "x$has_colon" = x; then
46451    # Not in mixed or Windows style, start by that.
46452    new_path=`cmd //c echo $path`
46453  fi
46454
46455
46456  input_path="$new_path"
46457  # Check if we need to convert this using DOS-style short mode. If the path
46458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46459  # take no chances and rewrite it.
46460  # Note: m4 eats our [], so we need to use [ and ] instead.
46461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46462  if test "x$has_forbidden_chars" != x; then
46463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46465  fi
46466
46467
46468  windows_path="$new_path"
46469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46470    unix_path=`$CYGPATH -u "$windows_path"`
46471    new_path="$unix_path"
46472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46474    new_path="$unix_path"
46475  fi
46476
46477  if test "x$path" != "x$new_path"; then
46478    FREETYPE_INCLUDE_PATH="$new_path"
46479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46480$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46481  fi
46482
46483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46485
46486  else
46487    # We're on a posix platform. Hooray! :)
46488    path="$FREETYPE_INCLUDE_PATH"
46489    has_space=`$ECHO "$path" | $GREP " "`
46490    if test "x$has_space" != x; then
46491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46492$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46493      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46494    fi
46495
46496    # Use eval to expand a potential ~
46497    eval path="$path"
46498    if test ! -f "$path" && test ! -d "$path"; then
46499      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46500    fi
46501
46502    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46503  fi
46504
46505      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46506        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46507      else
46508        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46509      fi
46510    fi
46511
46512    if test "x$FREETYPE_LIBS" = x; then
46513
46514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46515
46516  # Input might be given as Windows format, start by converting to
46517  # unix format.
46518  path="$FREETYPE_LIB_PATH"
46519  new_path=`$CYGPATH -u "$path"`
46520
46521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46524  # "foo.exe" is OK but "foo" is an error.
46525  #
46526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46527  # It is also a way to make sure we got the proper file name for the real test later on.
46528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46529  if test "x$test_shortpath" = x; then
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46531$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46532    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46533  fi
46534
46535  # Call helper function which possibly converts this using DOS-style short mode.
46536  # If so, the updated path is stored in $new_path.
46537
46538  input_path="$new_path"
46539  # Check if we need to convert this using DOS-style short mode. If the path
46540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46541  # take no chances and rewrite it.
46542  # Note: m4 eats our [], so we need to use [ and ] instead.
46543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46544  if test "x$has_forbidden_chars" != x; then
46545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46549      # Going to short mode and back again did indeed matter. Since short mode is
46550      # case insensitive, let's make it lowercase to improve readability.
46551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46552      # Now convert it back to Unix-stile (cygpath)
46553      input_path=`$CYGPATH -u "$shortmode_path"`
46554      new_path="$input_path"
46555    fi
46556  fi
46557
46558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46559  if test "x$test_cygdrive_prefix" = x; then
46560    # As a simple fix, exclude /usr/bin since it's not a real path.
46561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46563      # a path prefixed by /cygdrive for fixpath to work.
46564      new_path="$CYGWIN_ROOT_PATH$input_path"
46565    fi
46566  fi
46567
46568
46569  if test "x$path" != "x$new_path"; then
46570    FREETYPE_LIB_PATH="$new_path"
46571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46572$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46573  fi
46574
46575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46576
46577  path="$FREETYPE_LIB_PATH"
46578  has_colon=`$ECHO $path | $GREP ^.:`
46579  new_path="$path"
46580  if test "x$has_colon" = x; then
46581    # Not in mixed or Windows style, start by that.
46582    new_path=`cmd //c echo $path`
46583  fi
46584
46585
46586  input_path="$new_path"
46587  # Check if we need to convert this using DOS-style short mode. If the path
46588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46589  # take no chances and rewrite it.
46590  # Note: m4 eats our [], so we need to use [ and ] instead.
46591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46592  if test "x$has_forbidden_chars" != x; then
46593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46595  fi
46596
46597
46598  windows_path="$new_path"
46599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46600    unix_path=`$CYGPATH -u "$windows_path"`
46601    new_path="$unix_path"
46602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46604    new_path="$unix_path"
46605  fi
46606
46607  if test "x$path" != "x$new_path"; then
46608    FREETYPE_LIB_PATH="$new_path"
46609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46610$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46611  fi
46612
46613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46615
46616  else
46617    # We're on a posix platform. Hooray! :)
46618    path="$FREETYPE_LIB_PATH"
46619    has_space=`$ECHO "$path" | $GREP " "`
46620    if test "x$has_space" != x; then
46621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46622$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46624    fi
46625
46626    # Use eval to expand a potential ~
46627    eval path="$path"
46628    if test ! -f "$path" && test ! -d "$path"; then
46629      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46630    fi
46631
46632    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46633  fi
46634
46635      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46636        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46637      else
46638        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46639      fi
46640    fi
46641
46642    # Try to compile it
46643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46644$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46645    ac_ext=cpp
46646ac_cpp='$CXXCPP $CPPFLAGS'
46647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46650
46651    PREV_CXXCFLAGS="$CXXFLAGS"
46652    PREV_LIBS="$LIBS"
46653    PREV_CXX="$CXX"
46654    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46655    LIBS="$LIBS $FREETYPE_LIBS"
46656    CXX="$FIXPATH $CXX"
46657    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46658/* end confdefs.h.  */
46659
46660          #include<ft2build.h>
46661          #include FT_FREETYPE_H
46662          int main () {
46663            FT_Init_FreeType(NULL);
46664            return 0;
46665          }
46666
46667_ACEOF
46668if ac_fn_cxx_try_link "$LINENO"; then :
46669
46670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46671$as_echo "yes" >&6; }
46672
46673else
46674
46675          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46676$as_echo "no" >&6; }
46677          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46678$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46679          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46680$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46681
46682
46683  # Print a helpful message on how to acquire the necessary build dependency.
46684  # freetype is the help tag: freetype, cups, pulse, alsa etc
46685  MISSING_DEPENDENCY=freetype
46686
46687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46688    cygwin_help $MISSING_DEPENDENCY
46689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46690    msys_help $MISSING_DEPENDENCY
46691  else
46692    PKGHANDLER_COMMAND=
46693
46694    case $PKGHANDLER in
46695      apt-get)
46696        apt_help     $MISSING_DEPENDENCY ;;
46697      yum)
46698        yum_help     $MISSING_DEPENDENCY ;;
46699      port)
46700        port_help    $MISSING_DEPENDENCY ;;
46701      pkgutil)
46702        pkgutil_help $MISSING_DEPENDENCY ;;
46703      pkgadd)
46704        pkgadd_help  $MISSING_DEPENDENCY ;;
46705    esac
46706
46707    if test "x$PKGHANDLER_COMMAND" != x; then
46708      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46709    fi
46710  fi
46711
46712
46713          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46714
46715
46716fi
46717rm -f core conftest.err conftest.$ac_objext \
46718    conftest$ac_exeext conftest.$ac_ext
46719    CXXCFLAGS="$PREV_CXXFLAGS"
46720    LIBS="$PREV_LIBS"
46721    CXX="$PREV_CXX"
46722    ac_ext=cpp
46723ac_cpp='$CXXCPP $CPPFLAGS'
46724ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46725ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46726ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46727
46728
46729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46730$as_echo_n "checking if we should bundle freetype... " >&6; }
46731    if test "x$BUNDLE_FREETYPE" = xyes; then
46732      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46733    fi
46734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46735$as_echo "$BUNDLE_FREETYPE" >&6; }
46736
46737  fi # end freetype needed
46738
46739
46740
46741
46742
46743
46744
46745  ###############################################################################
46746  #
46747  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46748  #
46749
46750# Check whether --with-alsa was given.
46751if test "${with_alsa+set}" = set; then :
46752  withval=$with_alsa;
46753fi
46754
46755
46756# Check whether --with-alsa-include was given.
46757if test "${with_alsa_include+set}" = set; then :
46758  withval=$with_alsa_include;
46759fi
46760
46761
46762# Check whether --with-alsa-lib was given.
46763if test "${with_alsa_lib+set}" = set; then :
46764  withval=$with_alsa_lib;
46765fi
46766
46767
46768  if test "x$ALSA_NOT_NEEDED" = xyes; then
46769    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46770      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46771$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46772    fi
46773    ALSA_CFLAGS=
46774    ALSA_LIBS=
46775  else
46776    ALSA_FOUND=no
46777
46778    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46779      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46780    fi
46781
46782    if test "x${with_alsa}" != x; then
46783      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46784      ALSA_CFLAGS="-I${with_alsa}/include"
46785      ALSA_FOUND=yes
46786    fi
46787    if test "x${with_alsa_include}" != x; then
46788      ALSA_CFLAGS="-I${with_alsa_include}"
46789      ALSA_FOUND=yes
46790    fi
46791    if test "x${with_alsa_lib}" != x; then
46792      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46793      ALSA_FOUND=yes
46794    fi
46795    if test "x$ALSA_FOUND" = xno; then
46796
46797
46798  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46799    # Source the builddeps file again, to make sure it uses the latest variables!
46800    . $builddepsfile
46801    # Look for a target and build machine specific resource!
46802    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46803    if test "x$resource" = x; then
46804      # Ok, lets instead look for a target specific resource
46805      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46806    fi
46807    if test "x$resource" = x; then
46808      # Ok, lets instead look for a build specific resource
46809      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46810    fi
46811    if test "x$resource" = x; then
46812      # Ok, lets instead look for a generic resource
46813      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46814      resource=${builddep_alsa}
46815    fi
46816    if test "x$resource" != x; then
46817      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46818$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46819      # If the resource in the builddeps.conf file is an existing directory,
46820      # for example /java/linux/cups
46821      if test -d ${resource}; then
46822        depdir=${resource}
46823      else
46824
46825  # alsa is for example mymodule
46826  # $resource is for example libs/general/libmymod_1_2_3.zip
46827  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46828  # $with_builddeps_dir is for example /localhome/builddeps
46829  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46830  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46831  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46832  filename=`basename $resource`
46833  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46834  filebase=${filename%%.*}
46835  extension=${filename#*.}
46836  installdir=$with_builddeps_dir/$filebase
46837  if test ! -f $installdir/$filename.unpacked; then
46838    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46839$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46840    if test ! -d $installdir; then
46841      mkdir -p $installdir
46842    fi
46843    if test ! -d $installdir; then
46844      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46845    fi
46846    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46847    touch $tmpfile
46848    if test ! -f $tmpfile; then
46849      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46850    fi
46851
46852  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46853  # $tmpfile is the local file name for the downloaded file.
46854  VALID_TOOL=no
46855  if test "x$BDEPS_FTP" = xwget; then
46856    VALID_TOOL=yes
46857    wget -O $tmpfile $with_builddeps_server/$resource
46858  fi
46859  if test "x$BDEPS_FTP" = xlftp; then
46860    VALID_TOOL=yes
46861    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46862  fi
46863  if test "x$BDEPS_FTP" = xftp; then
46864    VALID_TOOL=yes
46865    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46866    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46867    FTPUSERPWD=${FTPSERVER%%@*}
46868    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46869      FTPUSER=${userpwd%%:*}
46870      FTPPWD=${userpwd#*@}
46871      FTPSERVER=${FTPSERVER#*@}
46872    else
46873      FTPUSER=ftp
46874      FTPPWD=ftp
46875    fi
46876    # the "pass" command does not work on some
46877    # ftp clients (read ftp.exe) but if it works,
46878    # passive mode is better!
46879    ( \
46880        echo "user $FTPUSER $FTPPWD"        ; \
46881        echo "pass"                         ; \
46882        echo "bin"                          ; \
46883        echo "get $FTPPATH $tmpfile"              ; \
46884    ) | ftp -in $FTPSERVER
46885  fi
46886  if test "x$VALID_TOOL" != xyes; then
46887    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46888  fi
46889
46890    mv $tmpfile $installdir/$filename
46891    if test ! -s $installdir/$filename; then
46892      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46893    fi
46894    case "$extension" in
46895      zip)  echo "Unzipping $installdir/$filename..."
46896        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46897        ;;
46898      tar.gz) echo "Untaring $installdir/$filename..."
46899        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46900        ;;
46901      tgz) echo "Untaring $installdir/$filename..."
46902        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46903        ;;
46904      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46905        ;;
46906    esac
46907  fi
46908  if test -f $installdir/$filename.unpacked; then
46909    depdir=$installdir
46910  fi
46911
46912      fi
46913      # Source the builddeps file again, because in the previous command, the depdir
46914      # was updated to point at the current build dependency install directory.
46915      . $builddepsfile
46916      # Now extract variables from the builddeps.conf files.
46917      theroot=${builddep_alsa_ROOT}
46918      thecflags=${builddep_alsa_CFLAGS}
46919      thelibs=${builddep_alsa_LIBS}
46920      if test "x$depdir" = x; then
46921        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46922      fi
46923      ALSA=$depdir
46924      if test "x$theroot" != x; then
46925        ALSA="$theroot"
46926      fi
46927      if test "x$thecflags" != x; then
46928        ALSA_CFLAGS="$thecflags"
46929      fi
46930      if test "x$thelibs" != x; then
46931        ALSA_LIBS="$thelibs"
46932      fi
46933      ALSA_FOUND=yes
46934      else ALSA_FOUND=no
46935
46936    fi
46937    else ALSA_FOUND=no
46938
46939  fi
46940
46941    fi
46942    if test "x$ALSA_FOUND" = xno; then
46943
46944pkg_failed=no
46945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46946$as_echo_n "checking for ALSA... " >&6; }
46947
46948if test -n "$ALSA_CFLAGS"; then
46949    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46950 elif test -n "$PKG_CONFIG"; then
46951    if test -n "$PKG_CONFIG" && \
46952    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46953  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46954  ac_status=$?
46955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46956  test $ac_status = 0; }; then
46957  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46958else
46959  pkg_failed=yes
46960fi
46961 else
46962    pkg_failed=untried
46963fi
46964if test -n "$ALSA_LIBS"; then
46965    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46966 elif test -n "$PKG_CONFIG"; then
46967    if test -n "$PKG_CONFIG" && \
46968    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46969  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46970  ac_status=$?
46971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46972  test $ac_status = 0; }; then
46973  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46974else
46975  pkg_failed=yes
46976fi
46977 else
46978    pkg_failed=untried
46979fi
46980
46981
46982
46983if test $pkg_failed = yes; then
46984
46985if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46986        _pkg_short_errors_supported=yes
46987else
46988        _pkg_short_errors_supported=no
46989fi
46990        if test $_pkg_short_errors_supported = yes; then
46991	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46992        else
46993	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46994        fi
46995	# Put the nasty error message in config.log where it belongs
46996	echo "$ALSA_PKG_ERRORS" >&5
46997
46998	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46999$as_echo "no" >&6; }
47000                ALSA_FOUND=no
47001elif test $pkg_failed = untried; then
47002	ALSA_FOUND=no
47003else
47004	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47005	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47007$as_echo "yes" >&6; }
47008	ALSA_FOUND=yes
47009fi
47010    fi
47011    if test "x$ALSA_FOUND" = xno; then
47012      for ac_header in alsa/asoundlib.h
47013do :
47014  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47015if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47016  cat >>confdefs.h <<_ACEOF
47017#define HAVE_ALSA_ASOUNDLIB_H 1
47018_ACEOF
47019
47020            ALSA_FOUND=yes
47021            ALSA_CFLAGS=-Iignoreme
47022            ALSA_LIBS=-lasound
47023            DEFAULT_ALSA=yes
47024
47025else
47026  ALSA_FOUND=no
47027fi
47028
47029done
47030
47031    fi
47032    if test "x$ALSA_FOUND" = xno; then
47033
47034  # Print a helpful message on how to acquire the necessary build dependency.
47035  # alsa is the help tag: freetype, cups, pulse, alsa etc
47036  MISSING_DEPENDENCY=alsa
47037
47038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47039    cygwin_help $MISSING_DEPENDENCY
47040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47041    msys_help $MISSING_DEPENDENCY
47042  else
47043    PKGHANDLER_COMMAND=
47044
47045    case $PKGHANDLER in
47046      apt-get)
47047        apt_help     $MISSING_DEPENDENCY ;;
47048      yum)
47049        yum_help     $MISSING_DEPENDENCY ;;
47050      port)
47051        port_help    $MISSING_DEPENDENCY ;;
47052      pkgutil)
47053        pkgutil_help $MISSING_DEPENDENCY ;;
47054      pkgadd)
47055        pkgadd_help  $MISSING_DEPENDENCY ;;
47056    esac
47057
47058    if test "x$PKGHANDLER_COMMAND" != x; then
47059      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47060    fi
47061  fi
47062
47063      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47064    fi
47065  fi
47066
47067
47068
47069
47070
47071
47072  ###############################################################################
47073  #
47074  # Check for the jpeg library
47075  #
47076
47077  USE_EXTERNAL_LIBJPEG=true
47078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47079$as_echo_n "checking for main in -ljpeg... " >&6; }
47080if ${ac_cv_lib_jpeg_main+:} false; then :
47081  $as_echo_n "(cached) " >&6
47082else
47083  ac_check_lib_save_LIBS=$LIBS
47084LIBS="-ljpeg  $LIBS"
47085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47086/* end confdefs.h.  */
47087
47088
47089int
47090main ()
47091{
47092return main ();
47093  ;
47094  return 0;
47095}
47096_ACEOF
47097if ac_fn_cxx_try_link "$LINENO"; then :
47098  ac_cv_lib_jpeg_main=yes
47099else
47100  ac_cv_lib_jpeg_main=no
47101fi
47102rm -f core conftest.err conftest.$ac_objext \
47103    conftest$ac_exeext conftest.$ac_ext
47104LIBS=$ac_check_lib_save_LIBS
47105fi
47106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47107$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47108if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47109  cat >>confdefs.h <<_ACEOF
47110#define HAVE_LIBJPEG 1
47111_ACEOF
47112
47113  LIBS="-ljpeg $LIBS"
47114
47115else
47116   USE_EXTERNAL_LIBJPEG=false
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47118$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47119
47120fi
47121
47122
47123
47124  ###############################################################################
47125  #
47126  # Check for the gif library
47127  #
47128
47129
47130# Check whether --with-giflib was given.
47131if test "${with_giflib+set}" = set; then :
47132  withval=$with_giflib;
47133fi
47134
47135
47136
47137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47138$as_echo_n "checking for which giflib to use... " >&6; }
47139
47140  # default is bundled
47141  DEFAULT_GIFLIB=bundled
47142
47143  #
47144  # if user didn't specify, use DEFAULT_GIFLIB
47145  #
47146  if test "x${with_giflib}" = "x"; then
47147    with_giflib=${DEFAULT_GIFLIB}
47148  fi
47149
47150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47151$as_echo "${with_giflib}" >&6; }
47152
47153  if test "x${with_giflib}" = "xbundled"; then
47154    USE_EXTERNAL_LIBGIF=false
47155  elif test "x${with_giflib}" = "xsystem"; then
47156    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47157if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47158
47159else
47160   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47161fi
47162
47163
47164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47165$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47166if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47167  $as_echo_n "(cached) " >&6
47168else
47169  ac_check_lib_save_LIBS=$LIBS
47170LIBS="-lgif  $LIBS"
47171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47172/* end confdefs.h.  */
47173
47174/* Override any GCC internal prototype to avoid an error.
47175   Use char because int might match the return type of a GCC
47176   builtin and then its argument prototype would still apply.  */
47177#ifdef __cplusplus
47178extern "C"
47179#endif
47180char DGifGetCode ();
47181int
47182main ()
47183{
47184return DGifGetCode ();
47185  ;
47186  return 0;
47187}
47188_ACEOF
47189if ac_fn_cxx_try_link "$LINENO"; then :
47190  ac_cv_lib_gif_DGifGetCode=yes
47191else
47192  ac_cv_lib_gif_DGifGetCode=no
47193fi
47194rm -f core conftest.err conftest.$ac_objext \
47195    conftest$ac_exeext conftest.$ac_ext
47196LIBS=$ac_check_lib_save_LIBS
47197fi
47198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47199$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47200if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47201  cat >>confdefs.h <<_ACEOF
47202#define HAVE_LIBGIF 1
47203_ACEOF
47204
47205  LIBS="-lgif $LIBS"
47206
47207else
47208   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47209fi
47210
47211
47212    USE_EXTERNAL_LIBGIF=true
47213  else
47214    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47215  fi
47216
47217
47218  ###############################################################################
47219  #
47220  # Check for the zlib library
47221  #
47222
47223
47224# Check whether --with-zlib was given.
47225if test "${with_zlib+set}" = set; then :
47226  withval=$with_zlib;
47227fi
47228
47229
47230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47231$as_echo_n "checking for compress in -lz... " >&6; }
47232if ${ac_cv_lib_z_compress+:} false; then :
47233  $as_echo_n "(cached) " >&6
47234else
47235  ac_check_lib_save_LIBS=$LIBS
47236LIBS="-lz  $LIBS"
47237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47238/* end confdefs.h.  */
47239
47240/* Override any GCC internal prototype to avoid an error.
47241   Use char because int might match the return type of a GCC
47242   builtin and then its argument prototype would still apply.  */
47243#ifdef __cplusplus
47244extern "C"
47245#endif
47246char compress ();
47247int
47248main ()
47249{
47250return compress ();
47251  ;
47252  return 0;
47253}
47254_ACEOF
47255if ac_fn_cxx_try_link "$LINENO"; then :
47256  ac_cv_lib_z_compress=yes
47257else
47258  ac_cv_lib_z_compress=no
47259fi
47260rm -f core conftest.err conftest.$ac_objext \
47261    conftest$ac_exeext conftest.$ac_ext
47262LIBS=$ac_check_lib_save_LIBS
47263fi
47264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47265$as_echo "$ac_cv_lib_z_compress" >&6; }
47266if test "x$ac_cv_lib_z_compress" = xyes; then :
47267   ZLIB_FOUND=yes
47268else
47269   ZLIB_FOUND=no
47270fi
47271
47272
47273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47274$as_echo_n "checking for which zlib to use... " >&6; }
47275
47276  DEFAULT_ZLIB=bundled
47277  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47278    #
47279    # On macosx default is system...on others default is
47280    #
47281    DEFAULT_ZLIB=system
47282  fi
47283
47284  if test "x${ZLIB_FOUND}" != "xyes"; then
47285    #
47286    # If we don't find any system...set default to bundled
47287    #
47288    DEFAULT_ZLIB=bundled
47289  fi
47290
47291  #
47292  # If user didn't specify, use DEFAULT_ZLIB
47293  #
47294  if test "x${with_zlib}" = "x"; then
47295    with_zlib=${DEFAULT_ZLIB}
47296  fi
47297
47298  if test "x${with_zlib}" = "xbundled"; then
47299    USE_EXTERNAL_LIBZ=false
47300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47301$as_echo "bundled" >&6; }
47302  elif test "x${with_zlib}" = "xsystem"; then
47303    if test "x${ZLIB_FOUND}" = "xyes"; then
47304      USE_EXTERNAL_LIBZ=true
47305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47306$as_echo "system" >&6; }
47307    else
47308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47309$as_echo "system not found" >&6; }
47310      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47311    fi
47312  else
47313    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47314  fi
47315
47316
47317
47318  ###############################################################################
47319  LIBZIP_CAN_USE_MMAP=true
47320
47321
47322
47323  ###############################################################################
47324  #
47325  # Check if altzone exists in time.h
47326  #
47327
47328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47329/* end confdefs.h.  */
47330#include <time.h>
47331int
47332main ()
47333{
47334return (int)altzone;
47335  ;
47336  return 0;
47337}
47338_ACEOF
47339if ac_fn_cxx_try_link "$LINENO"; then :
47340  has_altzone=yes
47341else
47342  has_altzone=no
47343fi
47344rm -f core conftest.err conftest.$ac_objext \
47345    conftest$ac_exeext conftest.$ac_ext
47346  if test "x$has_altzone" = xyes; then
47347
47348$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47349
47350  fi
47351
47352  ###############################################################################
47353  #
47354  # Check the maths library
47355  #
47356
47357  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47358$as_echo_n "checking for cos in -lm... " >&6; }
47359if ${ac_cv_lib_m_cos+:} false; then :
47360  $as_echo_n "(cached) " >&6
47361else
47362  ac_check_lib_save_LIBS=$LIBS
47363LIBS="-lm  $LIBS"
47364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47365/* end confdefs.h.  */
47366
47367/* Override any GCC internal prototype to avoid an error.
47368   Use char because int might match the return type of a GCC
47369   builtin and then its argument prototype would still apply.  */
47370#ifdef __cplusplus
47371extern "C"
47372#endif
47373char cos ();
47374int
47375main ()
47376{
47377return cos ();
47378  ;
47379  return 0;
47380}
47381_ACEOF
47382if ac_fn_cxx_try_link "$LINENO"; then :
47383  ac_cv_lib_m_cos=yes
47384else
47385  ac_cv_lib_m_cos=no
47386fi
47387rm -f core conftest.err conftest.$ac_objext \
47388    conftest$ac_exeext conftest.$ac_ext
47389LIBS=$ac_check_lib_save_LIBS
47390fi
47391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47392$as_echo "$ac_cv_lib_m_cos" >&6; }
47393if test "x$ac_cv_lib_m_cos" = xyes; then :
47394  cat >>confdefs.h <<_ACEOF
47395#define HAVE_LIBM 1
47396_ACEOF
47397
47398  LIBS="-lm $LIBS"
47399
47400else
47401
47402        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47403$as_echo "$as_me: Maths library was not found" >&6;}
47404
47405
47406fi
47407
47408
47409
47410  ###############################################################################
47411  #
47412  # Check for libdl.so
47413
47414  save_LIBS="$LIBS"
47415  LIBS=""
47416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47417$as_echo_n "checking for dlopen in -ldl... " >&6; }
47418if ${ac_cv_lib_dl_dlopen+:} false; then :
47419  $as_echo_n "(cached) " >&6
47420else
47421  ac_check_lib_save_LIBS=$LIBS
47422LIBS="-ldl  $LIBS"
47423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47424/* end confdefs.h.  */
47425
47426/* Override any GCC internal prototype to avoid an error.
47427   Use char because int might match the return type of a GCC
47428   builtin and then its argument prototype would still apply.  */
47429#ifdef __cplusplus
47430extern "C"
47431#endif
47432char dlopen ();
47433int
47434main ()
47435{
47436return dlopen ();
47437  ;
47438  return 0;
47439}
47440_ACEOF
47441if ac_fn_cxx_try_link "$LINENO"; then :
47442  ac_cv_lib_dl_dlopen=yes
47443else
47444  ac_cv_lib_dl_dlopen=no
47445fi
47446rm -f core conftest.err conftest.$ac_objext \
47447    conftest$ac_exeext conftest.$ac_ext
47448LIBS=$ac_check_lib_save_LIBS
47449fi
47450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47451$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47452if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47453  cat >>confdefs.h <<_ACEOF
47454#define HAVE_LIBDL 1
47455_ACEOF
47456
47457  LIBS="-ldl $LIBS"
47458
47459fi
47460
47461  LIBDL="$LIBS"
47462
47463  LIBS="$save_LIBS"
47464
47465
47466  ###############################################################################
47467  #
47468  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47469  # dynamic build is configured on command line.
47470  #
47471
47472# Check whether --with-stdc++lib was given.
47473if test "${with_stdc__lib+set}" = set; then :
47474  withval=$with_stdc__lib;
47475        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47476                && test "x$with_stdc__lib" != xdefault; then
47477          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47478        fi
47479
47480else
47481  with_stdc__lib=default
47482
47483fi
47484
47485
47486  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47487    # Test if -lstdc++ works.
47488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47489$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47490    ac_ext=cpp
47491ac_cpp='$CXXCPP $CPPFLAGS'
47492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47495
47496    OLD_CXXFLAGS="$CXXFLAGS"
47497    CXXFLAGS="$CXXFLAGS -lstdc++"
47498    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47499/* end confdefs.h.  */
47500
47501int
47502main ()
47503{
47504return 0;
47505  ;
47506  return 0;
47507}
47508_ACEOF
47509if ac_fn_cxx_try_link "$LINENO"; then :
47510  has_dynamic_libstdcxx=yes
47511else
47512  has_dynamic_libstdcxx=no
47513fi
47514rm -f core conftest.err conftest.$ac_objext \
47515    conftest$ac_exeext conftest.$ac_ext
47516    CXXFLAGS="$OLD_CXXFLAGS"
47517    ac_ext=cpp
47518ac_cpp='$CXXCPP $CPPFLAGS'
47519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47522
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47524$as_echo "$has_dynamic_libstdcxx" >&6; }
47525
47526    # Test if stdc++ can be linked statically.
47527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47528$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47529    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47530    ac_ext=cpp
47531ac_cpp='$CXXCPP $CPPFLAGS'
47532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47535
47536    OLD_LIBS="$LIBS"
47537    OLD_CXX="$CXX"
47538    LIBS="$STATIC_STDCXX_FLAGS"
47539    CXX="$CC"
47540    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47541/* end confdefs.h.  */
47542
47543int
47544main ()
47545{
47546return 0;
47547  ;
47548  return 0;
47549}
47550_ACEOF
47551if ac_fn_cxx_try_link "$LINENO"; then :
47552  has_static_libstdcxx=yes
47553else
47554  has_static_libstdcxx=no
47555fi
47556rm -f core conftest.err conftest.$ac_objext \
47557    conftest$ac_exeext conftest.$ac_ext
47558    LIBS="$OLD_LIBS"
47559    CXX="$OLD_CXX"
47560    ac_ext=cpp
47561ac_cpp='$CXXCPP $CPPFLAGS'
47562ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47563ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47564ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47565
47566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47567$as_echo "$has_static_libstdcxx" >&6; }
47568
47569    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47570      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47571    fi
47572
47573    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47574      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47575    fi
47576
47577    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47578      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47579    fi
47580
47581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47582$as_echo_n "checking how to link with libstdc++... " >&6; }
47583    # If dynamic was requested, it's available since it would fail above otherwise.
47584    # If dynamic wasn't requested, go with static unless it isn't available.
47585    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47586      LIBCXX="$LIBCXX -lstdc++"
47587      LDCXX="$CXX"
47588      STATIC_CXX_SETTING="STATIC_CXX=false"
47589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47590$as_echo "dynamic" >&6; }
47591    else
47592      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47593      LDCXX="$CC"
47594      STATIC_CXX_SETTING="STATIC_CXX=true"
47595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47596$as_echo "static" >&6; }
47597    fi
47598  fi
47599
47600
47601  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47602    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47603
47604pkg_failed=no
47605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47606$as_echo_n "checking for LIBFFI... " >&6; }
47607
47608if test -n "$LIBFFI_CFLAGS"; then
47609    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47610 elif test -n "$PKG_CONFIG"; then
47611    if test -n "$PKG_CONFIG" && \
47612    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47613  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47614  ac_status=$?
47615  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47616  test $ac_status = 0; }; then
47617  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47618else
47619  pkg_failed=yes
47620fi
47621 else
47622    pkg_failed=untried
47623fi
47624if test -n "$LIBFFI_LIBS"; then
47625    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47626 elif test -n "$PKG_CONFIG"; then
47627    if test -n "$PKG_CONFIG" && \
47628    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47629  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47630  ac_status=$?
47631  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47632  test $ac_status = 0; }; then
47633  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47634else
47635  pkg_failed=yes
47636fi
47637 else
47638    pkg_failed=untried
47639fi
47640
47641
47642
47643if test $pkg_failed = yes; then
47644
47645if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47646        _pkg_short_errors_supported=yes
47647else
47648        _pkg_short_errors_supported=no
47649fi
47650        if test $_pkg_short_errors_supported = yes; then
47651	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47652        else
47653	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47654        fi
47655	# Put the nasty error message in config.log where it belongs
47656	echo "$LIBFFI_PKG_ERRORS" >&5
47657
47658	as_fn_error $? "Package requirements (libffi) were not met:
47659
47660$LIBFFI_PKG_ERRORS
47661
47662Consider adjusting the PKG_CONFIG_PATH environment variable if you
47663installed software in a non-standard prefix.
47664
47665Alternatively, you may set the environment variables LIBFFI_CFLAGS
47666and LIBFFI_LIBS to avoid the need to call pkg-config.
47667See the pkg-config man page for more details.
47668" "$LINENO" 5
47669elif test $pkg_failed = untried; then
47670	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47672as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47673is in your PATH or set the PKG_CONFIG environment variable to the full
47674path to pkg-config.
47675
47676Alternatively, you may set the environment variables LIBFFI_CFLAGS
47677and LIBFFI_LIBS to avoid the need to call pkg-config.
47678See the pkg-config man page for more details.
47679
47680To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47681See \`config.log' for more details" "$LINENO" 5; }
47682else
47683	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47684	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47686$as_echo "yes" >&6; }
47687	:
47688fi
47689
47690  fi
47691
47692  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47693    # Extract the first word of "llvm-config", so it can be a program name with args.
47694set dummy llvm-config; ac_word=$2
47695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47696$as_echo_n "checking for $ac_word... " >&6; }
47697if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47698  $as_echo_n "(cached) " >&6
47699else
47700  if test -n "$LLVM_CONFIG"; then
47701  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47702else
47703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47704for as_dir in $PATH
47705do
47706  IFS=$as_save_IFS
47707  test -z "$as_dir" && as_dir=.
47708    for ac_exec_ext in '' $ac_executable_extensions; do
47709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47710    ac_cv_prog_LLVM_CONFIG="llvm-config"
47711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47712    break 2
47713  fi
47714done
47715  done
47716IFS=$as_save_IFS
47717
47718fi
47719fi
47720LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47721if test -n "$LLVM_CONFIG"; then
47722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47723$as_echo "$LLVM_CONFIG" >&6; }
47724else
47725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47726$as_echo "no" >&6; }
47727fi
47728
47729
47730
47731    if test "x$LLVM_CONFIG" != xllvm-config; then
47732      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47733    fi
47734
47735    llvm_components="jit mcjit engine nativecodegen native"
47736    unset LLVM_CFLAGS
47737    for flag in $("$LLVM_CONFIG" --cxxflags); do
47738      if echo "${flag}" | grep -q '^-[ID]'; then
47739        if test "${flag}" != "-D_DEBUG" ; then
47740          if test "${LLVM_CFLAGS}" != "" ; then
47741            LLVM_CFLAGS="${LLVM_CFLAGS} "
47742          fi
47743          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47744        fi
47745      fi
47746    done
47747    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47748    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47749
47750    unset LLVM_LDFLAGS
47751    for flag in $("${LLVM_CONFIG}" --ldflags); do
47752      if echo "${flag}" | grep -q '^-L'; then
47753        if test "${LLVM_LDFLAGS}" != ""; then
47754          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47755        fi
47756        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47757      fi
47758    done
47759
47760    unset LLVM_LIBS
47761    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47762      if echo "${flag}" | grep -q '^-l'; then
47763        if test "${LLVM_LIBS}" != ""; then
47764          LLVM_LIBS="${LLVM_LIBS} "
47765        fi
47766        LLVM_LIBS="${LLVM_LIBS}${flag}"
47767      fi
47768    done
47769
47770
47771
47772
47773  fi
47774
47775  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47776  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
47777    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47778  fi
47779
47780  # TODO better (platform agnostic) test
47781  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
47782    LIBCXX="-lstdc++"
47783  fi
47784
47785
47786
47787
47788
47789###############################################################################
47790#
47791# We need to do some final tweaking, when everything else is done.
47792#
47793###############################################################################
47794
47795
47796  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47797
47798
47799  # The name of the Service Agent jar.
47800  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47801  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47802    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47803  fi
47804
47805
47806
47807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47808$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47809
47810    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47811      ENABLE_INTREE_EC=yes
47812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47813$as_echo "yes" >&6; }
47814    else
47815      ENABLE_INTREE_EC=no
47816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47817$as_echo "no" >&6; }
47818    fi
47819
47820
47821
47822
47823###############################################################################
47824#
47825# Configure parts of the build that only affect the build performance,
47826# not the result.
47827#
47828###############################################################################
47829
47830
47831  # How many cores do we have on this build system?
47832
47833# Check whether --with-num-cores was given.
47834if test "${with_num_cores+set}" = set; then :
47835  withval=$with_num_cores;
47836fi
47837
47838  if test "x$with_num_cores" = x; then
47839    # The number of cores were not specified, try to probe them.
47840
47841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47842$as_echo_n "checking for number of cores... " >&6; }
47843  NUM_CORES=1
47844  FOUND_CORES=no
47845
47846  if test -f /proc/cpuinfo; then
47847    # Looks like a Linux (or cygwin) system
47848    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47849    FOUND_CORES=yes
47850  elif test -x /usr/sbin/psrinfo; then
47851    # Looks like a Solaris system
47852    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47853    FOUND_CORES=yes
47854  elif test -x /usr/sbin/system_profiler; then
47855    # Looks like a MacOSX system
47856    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47857    FOUND_CORES=yes
47858  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47859    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47860    FOUND_CORES=yes
47861  elif test -n "$NUMBER_OF_PROCESSORS"; then
47862    # On windows, look in the env
47863    NUM_CORES=$NUMBER_OF_PROCESSORS
47864    FOUND_CORES=yes
47865  fi
47866
47867  if test "x$FOUND_CORES" = xyes; then
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47869$as_echo "$NUM_CORES" >&6; }
47870  else
47871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47872$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47873    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47874$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47875  fi
47876
47877  else
47878    NUM_CORES=$with_num_cores
47879  fi
47880
47881
47882
47883  # How much memory do we have on this build system?
47884
47885# Check whether --with-memory-size was given.
47886if test "${with_memory_size+set}" = set; then :
47887  withval=$with_memory_size;
47888fi
47889
47890  if test "x$with_memory_size" = x; then
47891    # The memory size was not specified, try to probe it.
47892
47893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47894$as_echo_n "checking for memory size... " >&6; }
47895  # Default to 1024 MB
47896  MEMORY_SIZE=1024
47897  FOUND_MEM=no
47898
47899  if test -f /proc/meminfo; then
47900    # Looks like a Linux (or cygwin) system
47901    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47902    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47903    FOUND_MEM=yes
47904  elif test -x /usr/sbin/prtconf; then
47905    # Looks like a Solaris or AIX system
47906    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47907    FOUND_MEM=yes
47908  elif test -x /usr/sbin/system_profiler; then
47909    # Looks like a MacOSX system
47910    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47911    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47912    FOUND_MEM=yes
47913  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47914    # Windows, but without cygwin
47915    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47916    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47917    FOUND_MEM=yes
47918  fi
47919
47920  if test "x$FOUND_MEM" = xyes; then
47921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47922$as_echo "$MEMORY_SIZE MB" >&6; }
47923  else
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47925$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47927$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47928  fi
47929
47930  else
47931    MEMORY_SIZE=$with_memory_size
47932  fi
47933
47934
47935
47936  # Provide a decent default number of parallel jobs for make depending on
47937  # number of cores, amount of memory and machine architecture.
47938
47939# Check whether --with-jobs was given.
47940if test "${with_jobs+set}" = set; then :
47941  withval=$with_jobs;
47942fi
47943
47944  if test "x$with_jobs" = x; then
47945    # Number of jobs was not specified, calculate.
47946    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47947$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47948    # Approximate memory in GB, rounding up a bit.
47949    memory_gb=`expr $MEMORY_SIZE / 1100`
47950    # Pick the lowest of memory in gb and number of cores.
47951    if test "$memory_gb" -lt "$NUM_CORES"; then
47952      JOBS="$memory_gb"
47953    else
47954      JOBS="$NUM_CORES"
47955      # On bigger machines, leave some room for other processes to run
47956      if test "$JOBS" -gt "4"; then
47957        JOBS=`expr $JOBS '*' 90 / 100`
47958      fi
47959    fi
47960    # Cap number of jobs to 16
47961    if test "$JOBS" -gt "16"; then
47962      JOBS=16
47963    fi
47964    if test "$JOBS" -eq "0"; then
47965      JOBS=1
47966    fi
47967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47968$as_echo "$JOBS" >&6; }
47969  else
47970    JOBS=$with_jobs
47971  fi
47972
47973
47974
47975# Setup smart javac (after cores and memory have been setup)
47976
47977
47978# Check whether --with-sjavac-server-java was given.
47979if test "${with_sjavac_server_java+set}" = set; then :
47980  withval=$with_sjavac_server_java;
47981fi
47982
47983
47984  if test "x$with_sjavac_server_java" != x; then
47985    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
47986    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
47987    if test "x$FOUND_VERSION" = x; then
47988      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
47989    fi
47990  else
47991    SJAVAC_SERVER_JAVA=""
47992    # Hotspot specific options.
47993
47994  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
47995  $ECHO "Command: $JAVA -verbosegc -version" >&5
47996  OUTPUT=`$JAVA -verbosegc -version 2>&1`
47997  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
47998  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
47999  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48000    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48001    JVM_ARG_OK=true
48002  else
48003    $ECHO "Arg failed:" >&5
48004    $ECHO "$OUTPUT" >&5
48005    JVM_ARG_OK=false
48006  fi
48007
48008    # JRockit specific options.
48009
48010  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48011  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48012  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48013  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48014  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48015  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48016    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48017    JVM_ARG_OK=true
48018  else
48019    $ECHO "Arg failed:" >&5
48020    $ECHO "$OUTPUT" >&5
48021    JVM_ARG_OK=false
48022  fi
48023
48024    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48025  fi
48026
48027
48028  if test "$MEMORY_SIZE" -gt "2500"; then
48029
48030  $ECHO "Check if jvm arg is ok: -d64" >&5
48031  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48032  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48033  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48034  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48035  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48036    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48037    JVM_ARG_OK=true
48038  else
48039    $ECHO "Arg failed:" >&5
48040    $ECHO "$OUTPUT" >&5
48041    JVM_ARG_OK=false
48042  fi
48043
48044    if test "$JVM_ARG_OK" = true; then
48045      JVM_64BIT=true
48046      JVM_ARG_OK=false
48047    fi
48048  fi
48049
48050  if test "$JVM_64BIT" = true; then
48051    if test "$MEMORY_SIZE" -gt "17000"; then
48052
48053  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48054  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48055  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48056  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48057  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48058  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48059    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48060    JVM_ARG_OK=true
48061  else
48062    $ECHO "Arg failed:" >&5
48063    $ECHO "$OUTPUT" >&5
48064    JVM_ARG_OK=false
48065  fi
48066
48067    fi
48068    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48069
48070  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48071  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48072  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48073  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48074  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48075  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48076    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48077    JVM_ARG_OK=true
48078  else
48079    $ECHO "Arg failed:" >&5
48080    $ECHO "$OUTPUT" >&5
48081    JVM_ARG_OK=false
48082  fi
48083
48084    fi
48085    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48086
48087  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48088  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48089  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48090  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48091  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48092  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48093    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48094    JVM_ARG_OK=true
48095  else
48096    $ECHO "Arg failed:" >&5
48097    $ECHO "$OUTPUT" >&5
48098    JVM_ARG_OK=false
48099  fi
48100
48101    fi
48102    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48103
48104  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48105  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48106  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48107  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48108  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48109  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48110    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48111    JVM_ARG_OK=true
48112  else
48113    $ECHO "Arg failed:" >&5
48114    $ECHO "$OUTPUT" >&5
48115    JVM_ARG_OK=false
48116  fi
48117
48118    fi
48119  fi
48120  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48121
48122  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48123  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48124  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48125  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48126  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48127  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48128    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48129    JVM_ARG_OK=true
48130  else
48131    $ECHO "Arg failed:" >&5
48132    $ECHO "$OUTPUT" >&5
48133    JVM_ARG_OK=false
48134  fi
48135
48136  fi
48137  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48138
48139  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48140  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48141  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48142  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48143  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48144  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48145    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48146    JVM_ARG_OK=true
48147  else
48148    $ECHO "Arg failed:" >&5
48149    $ECHO "$OUTPUT" >&5
48150    JVM_ARG_OK=false
48151  fi
48152
48153  fi
48154  if test "$JVM_ARG_OK" = false; then
48155
48156  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48157  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48158  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48159  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48160  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48161  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48162    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48163    JVM_ARG_OK=true
48164  else
48165    $ECHO "Arg failed:" >&5
48166    $ECHO "$OUTPUT" >&5
48167    JVM_ARG_OK=false
48168  fi
48169
48170  fi
48171
48172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48173$as_echo_n "checking whether to use sjavac... " >&6; }
48174  # Check whether --enable-sjavac was given.
48175if test "${enable_sjavac+set}" = set; then :
48176  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48177else
48178  ENABLE_SJAVAC='no'
48179fi
48180
48181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48182$as_echo "$ENABLE_SJAVAC" >&6; }
48183
48184
48185  if test "x$ENABLE_SJAVAC" = xyes; then
48186    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48187  else
48188    SJAVAC_SERVER_DIR=
48189  fi
48190
48191
48192
48193# Can the C/C++ compiler use precompiled headers?
48194
48195
48196  ###############################################################################
48197  #
48198  # Can the C/C++ compiler use precompiled headers?
48199  #
48200  # Check whether --enable-precompiled-headers was given.
48201if test "${enable_precompiled_headers+set}" = set; then :
48202  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48203else
48204  ENABLE_PRECOMPH=yes
48205fi
48206
48207
48208  USE_PRECOMPILED_HEADER=1
48209  if test "x$ENABLE_PRECOMPH" = xno; then
48210    USE_PRECOMPILED_HEADER=0
48211  fi
48212
48213  if test "x$ENABLE_PRECOMPH" = xyes; then
48214    # Check that the compiler actually supports precomp headers.
48215    if test "x$GCC" = xyes; then
48216      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48217$as_echo_n "checking that precompiled headers work... " >&6; }
48218      echo "int alfa();" > conftest.h
48219      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48220      if test ! -f conftest.hpp.gch; then
48221        USE_PRECOMPILED_HEADER=0
48222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48223$as_echo "no" >&6; }
48224      else
48225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48226$as_echo "yes" >&6; }
48227      fi
48228      rm -f conftest.h conftest.hpp.gch
48229    fi
48230  fi
48231
48232
48233
48234
48235# Setup use of ccache, if available
48236
48237  # Check whether --enable-ccache was given.
48238if test "${enable_ccache+set}" = set; then :
48239  enableval=$enable_ccache;
48240fi
48241
48242
48243  CCACHE=
48244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48245$as_echo_n "checking is ccache enabled... " >&6; }
48246  ENABLE_CCACHE=$enable_ccache
48247  if test "x$enable_ccache" = xyes; then
48248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48249$as_echo "yes" >&6; }
48250    OLD_PATH="$PATH"
48251    if test "x$TOOLS_DIR" != x; then
48252      PATH=$TOOLS_DIR:$PATH
48253    fi
48254
48255
48256
48257  # Publish this variable in the help.
48258
48259
48260  if test "x$CCACHE" = x; then
48261    # The variable is not set by user, try to locate tool using the code snippet
48262    for ac_prog in ccache
48263do
48264  # Extract the first word of "$ac_prog", so it can be a program name with args.
48265set dummy $ac_prog; ac_word=$2
48266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48267$as_echo_n "checking for $ac_word... " >&6; }
48268if ${ac_cv_path_CCACHE+:} false; then :
48269  $as_echo_n "(cached) " >&6
48270else
48271  case $CCACHE in
48272  [\\/]* | ?:[\\/]*)
48273  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48274  ;;
48275  *)
48276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48277for as_dir in $PATH
48278do
48279  IFS=$as_save_IFS
48280  test -z "$as_dir" && as_dir=.
48281    for ac_exec_ext in '' $ac_executable_extensions; do
48282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48283    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48285    break 2
48286  fi
48287done
48288  done
48289IFS=$as_save_IFS
48290
48291  ;;
48292esac
48293fi
48294CCACHE=$ac_cv_path_CCACHE
48295if test -n "$CCACHE"; then
48296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48297$as_echo "$CCACHE" >&6; }
48298else
48299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48300$as_echo "no" >&6; }
48301fi
48302
48303
48304  test -n "$CCACHE" && break
48305done
48306
48307  else
48308    # The variable is set, but is it from the command line or the environment?
48309
48310    # Try to remove the string !CCACHE! from our list.
48311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48313      # If it failed, the variable was not from the command line. Ignore it,
48314      # but warn the user (except for BASH, which is always set by the calling BASH).
48315      if test "xCCACHE" != xBASH; then
48316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48317$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48318      fi
48319      # Try to locate tool using the code snippet
48320      for ac_prog in ccache
48321do
48322  # Extract the first word of "$ac_prog", so it can be a program name with args.
48323set dummy $ac_prog; ac_word=$2
48324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48325$as_echo_n "checking for $ac_word... " >&6; }
48326if ${ac_cv_path_CCACHE+:} false; then :
48327  $as_echo_n "(cached) " >&6
48328else
48329  case $CCACHE in
48330  [\\/]* | ?:[\\/]*)
48331  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48332  ;;
48333  *)
48334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48335for as_dir in $PATH
48336do
48337  IFS=$as_save_IFS
48338  test -z "$as_dir" && as_dir=.
48339    for ac_exec_ext in '' $ac_executable_extensions; do
48340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48341    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48343    break 2
48344  fi
48345done
48346  done
48347IFS=$as_save_IFS
48348
48349  ;;
48350esac
48351fi
48352CCACHE=$ac_cv_path_CCACHE
48353if test -n "$CCACHE"; then
48354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48355$as_echo "$CCACHE" >&6; }
48356else
48357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48358$as_echo "no" >&6; }
48359fi
48360
48361
48362  test -n "$CCACHE" && break
48363done
48364
48365    else
48366      # If it succeeded, then it was overridden by the user. We will use it
48367      # for the tool.
48368
48369      # First remove it from the list of overridden variables, so we can test
48370      # for unknown variables in the end.
48371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48372
48373      # Check if the provided tool contains a complete path.
48374      tool_specified="$CCACHE"
48375      tool_basename="${tool_specified##*/}"
48376      if test "x$tool_basename" = "x$tool_specified"; then
48377        # A command without a complete path is provided, search $PATH.
48378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48379$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48380        # Extract the first word of "$tool_basename", so it can be a program name with args.
48381set dummy $tool_basename; ac_word=$2
48382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48383$as_echo_n "checking for $ac_word... " >&6; }
48384if ${ac_cv_path_CCACHE+:} false; then :
48385  $as_echo_n "(cached) " >&6
48386else
48387  case $CCACHE in
48388  [\\/]* | ?:[\\/]*)
48389  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48390  ;;
48391  *)
48392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48393for as_dir in $PATH
48394do
48395  IFS=$as_save_IFS
48396  test -z "$as_dir" && as_dir=.
48397    for ac_exec_ext in '' $ac_executable_extensions; do
48398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48399    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48401    break 2
48402  fi
48403done
48404  done
48405IFS=$as_save_IFS
48406
48407  ;;
48408esac
48409fi
48410CCACHE=$ac_cv_path_CCACHE
48411if test -n "$CCACHE"; then
48412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48413$as_echo "$CCACHE" >&6; }
48414else
48415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48416$as_echo "no" >&6; }
48417fi
48418
48419
48420        if test "x$CCACHE" = x; then
48421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48422        fi
48423      else
48424        # Otherwise we believe it is a complete path. Use it as it is.
48425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48426$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48428$as_echo_n "checking for CCACHE... " >&6; }
48429        if test ! -x "$tool_specified"; then
48430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48431$as_echo "not found" >&6; }
48432          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48433        fi
48434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48435$as_echo "$tool_specified" >&6; }
48436      fi
48437    fi
48438  fi
48439
48440
48441
48442  if test "x$CCACHE" = x; then
48443    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48444  fi
48445
48446
48447    CCACHE_STATUS="enabled"
48448    PATH="$OLD_PATH"
48449  elif test "x$enable_ccache" = xno; then
48450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48451$as_echo "no, explicitly disabled" >&6; }
48452  elif test "x$enable_ccache" = x; then
48453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48454$as_echo "no" >&6; }
48455  else
48456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48457$as_echo "unknown" >&6; }
48458    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48459  fi
48460
48461
48462
48463# Check whether --with-ccache-dir was given.
48464if test "${with_ccache_dir+set}" = set; then :
48465  withval=$with_ccache_dir;
48466fi
48467
48468
48469  if test "x$with_ccache_dir" != x; then
48470    # When using a non home ccache directory, assume the use is to share ccache files
48471    # with other users. Thus change the umask.
48472    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48473    if test "x$CCACHE" = x; then
48474      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48475$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48476    fi
48477  fi
48478
48479  if test "x$CCACHE" != x; then
48480
48481  if test "x$CCACHE" != x; then
48482    # Only use ccache if it is 3.1.4 or later, which supports
48483    # precompiled headers.
48484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48485$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48486    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48487    if test "x$HAS_GOOD_CCACHE" = x; then
48488      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48489$as_echo "no, disabling ccache" >&6; }
48490      CCACHE=
48491      CCACHE_STATUS="disabled"
48492    else
48493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48494$as_echo "yes" >&6; }
48495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48496$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48497      PUSHED_FLAGS="$CXXFLAGS"
48498      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48499      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48500/* end confdefs.h.  */
48501
48502int
48503main ()
48504{
48505
48506  ;
48507  return 0;
48508}
48509_ACEOF
48510if ac_fn_cxx_try_compile "$LINENO"; then :
48511  CC_KNOWS_CCACHE_TRICK=yes
48512else
48513  CC_KNOWS_CCACHE_TRICK=no
48514fi
48515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48516      CXXFLAGS="$PUSHED_FLAGS"
48517      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48519$as_echo "yes" >&6; }
48520      else
48521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48522$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48523        CCACHE=
48524        CCACHE_STATUS="disabled"
48525      fi
48526    fi
48527  fi
48528
48529  if test "x$CCACHE" != x; then
48530    CCACHE_SLOPPINESS=time_macros
48531    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48532    CCACHE_FLAGS=-fpch-preprocess
48533
48534    if test "x$SET_CCACHE_DIR" != x; then
48535      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48536      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48537    fi
48538  fi
48539
48540  fi
48541
48542
48543###############################################################################
48544#
48545# And now the finish...
48546#
48547###############################################################################
48548
48549# Check for some common pitfalls
48550
48551  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48552    file_to_test="$SRC_ROOT/LICENSE"
48553    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48554      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
48555    fi
48556  fi
48557
48558
48559  # Did user specify any unknown variables?
48560
48561  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48562    # Replace the separating ! with spaces before presenting for end user.
48563    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48564    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48565$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48566  fi
48567
48568
48569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48570$as_echo_n "checking if build directory is on local disk... " >&6; }
48571
48572  # df -l lists only local disks; if the given directory is not found then
48573  # a non-zero exit code is given
48574  if test "x$DF" = x; then
48575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48576      # msys does not have df; use Windows "net use" instead.
48577      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48578      if test "x$IS_NETWORK_DISK" = x; then
48579        OUTPUT_DIR_IS_LOCAL="yes"
48580      else
48581        OUTPUT_DIR_IS_LOCAL="no"
48582      fi
48583    else
48584      # No df here, say it's local
48585      OUTPUT_DIR_IS_LOCAL="yes"
48586    fi
48587  else
48588    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48589      OUTPUT_DIR_IS_LOCAL="yes"
48590    else
48591      OUTPUT_DIR_IS_LOCAL="no"
48592    fi
48593  fi
48594
48595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48596$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48597
48598
48599
48600  # Check if the user has any old-style ALT_ variables set.
48601  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48602
48603  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48604  # Since we can't properly handle the dependencies for this, warn the user about the situation
48605  if test -e $OUTPUT_ROOT/spec.gmk; then
48606    IS_RECONFIGURE=yes
48607  else
48608    IS_RECONFIGURE=no
48609  fi
48610
48611
48612# At the end, call the custom hook. (Dummy macro if no custom sources available)
48613
48614
48615# We're messing a bit with internal autoconf variables to put the config.status
48616# in the output directory instead of the current directory.
48617CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48618
48619# Create the actual output files. Now the main work of configure is done.
48620cat >confcache <<\_ACEOF
48621# This file is a shell script that caches the results of configure
48622# tests run on this system so they can be shared between configure
48623# scripts and configure runs, see configure's option --config-cache.
48624# It is not useful on other systems.  If it contains results you don't
48625# want to keep, you may remove or edit it.
48626#
48627# config.status only pays attention to the cache file if you give it
48628# the --recheck option to rerun configure.
48629#
48630# `ac_cv_env_foo' variables (set or unset) will be overridden when
48631# loading this file, other *unset* `ac_cv_foo' will be assigned the
48632# following values.
48633
48634_ACEOF
48635
48636# The following way of writing the cache mishandles newlines in values,
48637# but we know of no workaround that is simple, portable, and efficient.
48638# So, we kill variables containing newlines.
48639# Ultrix sh set writes to stderr and can't be redirected directly,
48640# and sets the high bit in the cache file unless we assign to the vars.
48641(
48642  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48643    eval ac_val=\$$ac_var
48644    case $ac_val in #(
48645    *${as_nl}*)
48646      case $ac_var in #(
48647      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48648$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48649      esac
48650      case $ac_var in #(
48651      _ | IFS | as_nl) ;; #(
48652      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48653      *) { eval $ac_var=; unset $ac_var;} ;;
48654      esac ;;
48655    esac
48656  done
48657
48658  (set) 2>&1 |
48659    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48660    *${as_nl}ac_space=\ *)
48661      # `set' does not quote correctly, so add quotes: double-quote
48662      # substitution turns \\\\ into \\, and sed turns \\ into \.
48663      sed -n \
48664	"s/'/'\\\\''/g;
48665	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48666      ;; #(
48667    *)
48668      # `set' quotes correctly as required by POSIX, so do not add quotes.
48669      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48670      ;;
48671    esac |
48672    sort
48673) |
48674  sed '
48675     /^ac_cv_env_/b end
48676     t clear
48677     :clear
48678     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48679     t end
48680     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48681     :end' >>confcache
48682if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48683  if test -w "$cache_file"; then
48684    if test "x$cache_file" != "x/dev/null"; then
48685      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48686$as_echo "$as_me: updating cache $cache_file" >&6;}
48687      if test ! -f "$cache_file" || test -h "$cache_file"; then
48688	cat confcache >"$cache_file"
48689      else
48690        case $cache_file in #(
48691        */* | ?:*)
48692	  mv -f confcache "$cache_file"$$ &&
48693	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48694        *)
48695	  mv -f confcache "$cache_file" ;;
48696	esac
48697      fi
48698    fi
48699  else
48700    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48701$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48702  fi
48703fi
48704rm -f confcache
48705
48706test "x$prefix" = xNONE && prefix=$ac_default_prefix
48707# Let make expand exec_prefix.
48708test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48709
48710DEFS=-DHAVE_CONFIG_H
48711
48712ac_libobjs=
48713ac_ltlibobjs=
48714U=
48715for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48716  # 1. Remove the extension, and $U if already installed.
48717  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48718  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48719  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48720  #    will be set to the directory where LIBOBJS objects are built.
48721  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48722  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48723done
48724LIBOBJS=$ac_libobjs
48725
48726LTLIBOBJS=$ac_ltlibobjs
48727
48728
48729
48730: "${CONFIG_STATUS=./config.status}"
48731ac_write_fail=0
48732ac_clean_files_save=$ac_clean_files
48733ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48734{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48735$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48736as_write_fail=0
48737cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48738#! $SHELL
48739# Generated by $as_me.
48740# Run this file to recreate the current configuration.
48741# Compiler output produced by configure, useful for debugging
48742# configure, is in config.log if it exists.
48743
48744debug=false
48745ac_cs_recheck=false
48746ac_cs_silent=false
48747
48748SHELL=\${CONFIG_SHELL-$SHELL}
48749export SHELL
48750_ASEOF
48751cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48752## -------------------- ##
48753## M4sh Initialization. ##
48754## -------------------- ##
48755
48756# Be more Bourne compatible
48757DUALCASE=1; export DUALCASE # for MKS sh
48758if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48759  emulate sh
48760  NULLCMD=:
48761  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48762  # is contrary to our usage.  Disable this feature.
48763  alias -g '${1+"$@"}'='"$@"'
48764  setopt NO_GLOB_SUBST
48765else
48766  case `(set -o) 2>/dev/null` in #(
48767  *posix*) :
48768    set -o posix ;; #(
48769  *) :
48770     ;;
48771esac
48772fi
48773
48774
48775as_nl='
48776'
48777export as_nl
48778# Printing a long string crashes Solaris 7 /usr/bin/printf.
48779as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48780as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48781as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48782# Prefer a ksh shell builtin over an external printf program on Solaris,
48783# but without wasting forks for bash or zsh.
48784if test -z "$BASH_VERSION$ZSH_VERSION" \
48785    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48786  as_echo='print -r --'
48787  as_echo_n='print -rn --'
48788elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48789  as_echo='printf %s\n'
48790  as_echo_n='printf %s'
48791else
48792  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48793    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48794    as_echo_n='/usr/ucb/echo -n'
48795  else
48796    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48797    as_echo_n_body='eval
48798      arg=$1;
48799      case $arg in #(
48800      *"$as_nl"*)
48801	expr "X$arg" : "X\\(.*\\)$as_nl";
48802	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48803      esac;
48804      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48805    '
48806    export as_echo_n_body
48807    as_echo_n='sh -c $as_echo_n_body as_echo'
48808  fi
48809  export as_echo_body
48810  as_echo='sh -c $as_echo_body as_echo'
48811fi
48812
48813# The user is always right.
48814if test "${PATH_SEPARATOR+set}" != set; then
48815  PATH_SEPARATOR=:
48816  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48817    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48818      PATH_SEPARATOR=';'
48819  }
48820fi
48821
48822
48823# IFS
48824# We need space, tab and new line, in precisely that order.  Quoting is
48825# there to prevent editors from complaining about space-tab.
48826# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48827# splitting by setting IFS to empty value.)
48828IFS=" ""	$as_nl"
48829
48830# Find who we are.  Look in the path if we contain no directory separator.
48831as_myself=
48832case $0 in #((
48833  *[\\/]* ) as_myself=$0 ;;
48834  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48835for as_dir in $PATH
48836do
48837  IFS=$as_save_IFS
48838  test -z "$as_dir" && as_dir=.
48839    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48840  done
48841IFS=$as_save_IFS
48842
48843     ;;
48844esac
48845# We did not find ourselves, most probably we were run as `sh COMMAND'
48846# in which case we are not to be found in the path.
48847if test "x$as_myself" = x; then
48848  as_myself=$0
48849fi
48850if test ! -f "$as_myself"; then
48851  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48852  exit 1
48853fi
48854
48855# Unset variables that we do not need and which cause bugs (e.g. in
48856# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48857# suppresses any "Segmentation fault" message there.  '((' could
48858# trigger a bug in pdksh 5.2.14.
48859for as_var in BASH_ENV ENV MAIL MAILPATH
48860do eval test x\${$as_var+set} = xset \
48861  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48862done
48863PS1='$ '
48864PS2='> '
48865PS4='+ '
48866
48867# NLS nuisances.
48868LC_ALL=C
48869export LC_ALL
48870LANGUAGE=C
48871export LANGUAGE
48872
48873# CDPATH.
48874(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48875
48876
48877# as_fn_error STATUS ERROR [LINENO LOG_FD]
48878# ----------------------------------------
48879# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48880# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48881# script with STATUS, using 1 if that was 0.
48882as_fn_error ()
48883{
48884  as_status=$1; test $as_status -eq 0 && as_status=1
48885  if test "$4"; then
48886    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48887    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48888  fi
48889  $as_echo "$as_me: error: $2" >&2
48890  as_fn_exit $as_status
48891} # as_fn_error
48892
48893
48894# as_fn_set_status STATUS
48895# -----------------------
48896# Set $? to STATUS, without forking.
48897as_fn_set_status ()
48898{
48899  return $1
48900} # as_fn_set_status
48901
48902# as_fn_exit STATUS
48903# -----------------
48904# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48905as_fn_exit ()
48906{
48907  set +e
48908  as_fn_set_status $1
48909  exit $1
48910} # as_fn_exit
48911
48912# as_fn_unset VAR
48913# ---------------
48914# Portably unset VAR.
48915as_fn_unset ()
48916{
48917  { eval $1=; unset $1;}
48918}
48919as_unset=as_fn_unset
48920# as_fn_append VAR VALUE
48921# ----------------------
48922# Append the text in VALUE to the end of the definition contained in VAR. Take
48923# advantage of any shell optimizations that allow amortized linear growth over
48924# repeated appends, instead of the typical quadratic growth present in naive
48925# implementations.
48926if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48927  eval 'as_fn_append ()
48928  {
48929    eval $1+=\$2
48930  }'
48931else
48932  as_fn_append ()
48933  {
48934    eval $1=\$$1\$2
48935  }
48936fi # as_fn_append
48937
48938# as_fn_arith ARG...
48939# ------------------
48940# Perform arithmetic evaluation on the ARGs, and store the result in the
48941# global $as_val. Take advantage of shells that can avoid forks. The arguments
48942# must be portable across $(()) and expr.
48943if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48944  eval 'as_fn_arith ()
48945  {
48946    as_val=$(( $* ))
48947  }'
48948else
48949  as_fn_arith ()
48950  {
48951    as_val=`expr "$@" || test $? -eq 1`
48952  }
48953fi # as_fn_arith
48954
48955
48956if expr a : '\(a\)' >/dev/null 2>&1 &&
48957   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48958  as_expr=expr
48959else
48960  as_expr=false
48961fi
48962
48963if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48964  as_basename=basename
48965else
48966  as_basename=false
48967fi
48968
48969if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48970  as_dirname=dirname
48971else
48972  as_dirname=false
48973fi
48974
48975as_me=`$as_basename -- "$0" ||
48976$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48977	 X"$0" : 'X\(//\)$' \| \
48978	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48979$as_echo X/"$0" |
48980    sed '/^.*\/\([^/][^/]*\)\/*$/{
48981	    s//\1/
48982	    q
48983	  }
48984	  /^X\/\(\/\/\)$/{
48985	    s//\1/
48986	    q
48987	  }
48988	  /^X\/\(\/\).*/{
48989	    s//\1/
48990	    q
48991	  }
48992	  s/.*/./; q'`
48993
48994# Avoid depending upon Character Ranges.
48995as_cr_letters='abcdefghijklmnopqrstuvwxyz'
48996as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
48997as_cr_Letters=$as_cr_letters$as_cr_LETTERS
48998as_cr_digits='0123456789'
48999as_cr_alnum=$as_cr_Letters$as_cr_digits
49000
49001ECHO_C= ECHO_N= ECHO_T=
49002case `echo -n x` in #(((((
49003-n*)
49004  case `echo 'xy\c'` in
49005  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49006  xy)  ECHO_C='\c';;
49007  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49008       ECHO_T='	';;
49009  esac;;
49010*)
49011  ECHO_N='-n';;
49012esac
49013
49014rm -f conf$$ conf$$.exe conf$$.file
49015if test -d conf$$.dir; then
49016  rm -f conf$$.dir/conf$$.file
49017else
49018  rm -f conf$$.dir
49019  mkdir conf$$.dir 2>/dev/null
49020fi
49021if (echo >conf$$.file) 2>/dev/null; then
49022  if ln -s conf$$.file conf$$ 2>/dev/null; then
49023    as_ln_s='ln -s'
49024    # ... but there are two gotchas:
49025    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49026    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49027    # In both cases, we have to default to `cp -pR'.
49028    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49029      as_ln_s='cp -pR'
49030  elif ln conf$$.file conf$$ 2>/dev/null; then
49031    as_ln_s=ln
49032  else
49033    as_ln_s='cp -pR'
49034  fi
49035else
49036  as_ln_s='cp -pR'
49037fi
49038rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49039rmdir conf$$.dir 2>/dev/null
49040
49041
49042# as_fn_mkdir_p
49043# -------------
49044# Create "$as_dir" as a directory, including parents if necessary.
49045as_fn_mkdir_p ()
49046{
49047
49048  case $as_dir in #(
49049  -*) as_dir=./$as_dir;;
49050  esac
49051  test -d "$as_dir" || eval $as_mkdir_p || {
49052    as_dirs=
49053    while :; do
49054      case $as_dir in #(
49055      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49056      *) as_qdir=$as_dir;;
49057      esac
49058      as_dirs="'$as_qdir' $as_dirs"
49059      as_dir=`$as_dirname -- "$as_dir" ||
49060$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49061	 X"$as_dir" : 'X\(//\)[^/]' \| \
49062	 X"$as_dir" : 'X\(//\)$' \| \
49063	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49064$as_echo X"$as_dir" |
49065    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49066	    s//\1/
49067	    q
49068	  }
49069	  /^X\(\/\/\)[^/].*/{
49070	    s//\1/
49071	    q
49072	  }
49073	  /^X\(\/\/\)$/{
49074	    s//\1/
49075	    q
49076	  }
49077	  /^X\(\/\).*/{
49078	    s//\1/
49079	    q
49080	  }
49081	  s/.*/./; q'`
49082      test -d "$as_dir" && break
49083    done
49084    test -z "$as_dirs" || eval "mkdir $as_dirs"
49085  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49086
49087
49088} # as_fn_mkdir_p
49089if mkdir -p . 2>/dev/null; then
49090  as_mkdir_p='mkdir -p "$as_dir"'
49091else
49092  test -d ./-p && rmdir ./-p
49093  as_mkdir_p=false
49094fi
49095
49096
49097# as_fn_executable_p FILE
49098# -----------------------
49099# Test if FILE is an executable regular file.
49100as_fn_executable_p ()
49101{
49102  test -f "$1" && test -x "$1"
49103} # as_fn_executable_p
49104as_test_x='test -x'
49105as_executable_p=as_fn_executable_p
49106
49107# Sed expression to map a string onto a valid CPP name.
49108as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49109
49110# Sed expression to map a string onto a valid variable name.
49111as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49112
49113
49114exec 6>&1
49115## ----------------------------------- ##
49116## Main body of $CONFIG_STATUS script. ##
49117## ----------------------------------- ##
49118_ASEOF
49119test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49120
49121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49122# Save the log message, to keep $0 and so on meaningful, and to
49123# report actual input values of CONFIG_FILES etc. instead of their
49124# values after options handling.
49125ac_log="
49126This file was extended by OpenJDK $as_me jdk8, which was
49127generated by GNU Autoconf 2.69.  Invocation command line was
49128
49129  CONFIG_FILES    = $CONFIG_FILES
49130  CONFIG_HEADERS  = $CONFIG_HEADERS
49131  CONFIG_LINKS    = $CONFIG_LINKS
49132  CONFIG_COMMANDS = $CONFIG_COMMANDS
49133  $ $0 $@
49134
49135on `(hostname || uname -n) 2>/dev/null | sed 1q`
49136"
49137
49138_ACEOF
49139
49140case $ac_config_files in *"
49141"*) set x $ac_config_files; shift; ac_config_files=$*;;
49142esac
49143
49144case $ac_config_headers in *"
49145"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49146esac
49147
49148
49149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49150# Files that config.status was made for.
49151config_files="$ac_config_files"
49152config_headers="$ac_config_headers"
49153
49154_ACEOF
49155
49156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49157ac_cs_usage="\
49158\`$as_me' instantiates files and other configuration actions
49159from templates according to the current configuration.  Unless the files
49160and actions are specified as TAGs, all are instantiated by default.
49161
49162Usage: $0 [OPTION]... [TAG]...
49163
49164  -h, --help       print this help, then exit
49165  -V, --version    print version number and configuration settings, then exit
49166      --config     print configuration, then exit
49167  -q, --quiet, --silent
49168                   do not print progress messages
49169  -d, --debug      don't remove temporary files
49170      --recheck    update $as_me by reconfiguring in the same conditions
49171      --file=FILE[:TEMPLATE]
49172                   instantiate the configuration file FILE
49173      --header=FILE[:TEMPLATE]
49174                   instantiate the configuration header FILE
49175
49176Configuration files:
49177$config_files
49178
49179Configuration headers:
49180$config_headers
49181
49182Report bugs to <build-dev@openjdk.java.net>.
49183OpenJDK home page: <http://openjdk.java.net>."
49184
49185_ACEOF
49186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49187ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49188ac_cs_version="\\
49189OpenJDK config.status jdk8
49190configured by $0, generated by GNU Autoconf 2.69,
49191  with options \\"\$ac_cs_config\\"
49192
49193Copyright (C) 2012 Free Software Foundation, Inc.
49194This config.status script is free software; the Free Software Foundation
49195gives unlimited permission to copy, distribute and modify it."
49196
49197ac_pwd='$ac_pwd'
49198srcdir='$srcdir'
49199AWK='$AWK'
49200test -n "\$AWK" || AWK=awk
49201_ACEOF
49202
49203cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49204# The default lists apply if the user does not specify any file.
49205ac_need_defaults=:
49206while test $# != 0
49207do
49208  case $1 in
49209  --*=?*)
49210    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49211    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49212    ac_shift=:
49213    ;;
49214  --*=)
49215    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49216    ac_optarg=
49217    ac_shift=:
49218    ;;
49219  *)
49220    ac_option=$1
49221    ac_optarg=$2
49222    ac_shift=shift
49223    ;;
49224  esac
49225
49226  case $ac_option in
49227  # Handling of the options.
49228  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49229    ac_cs_recheck=: ;;
49230  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49231    $as_echo "$ac_cs_version"; exit ;;
49232  --config | --confi | --conf | --con | --co | --c )
49233    $as_echo "$ac_cs_config"; exit ;;
49234  --debug | --debu | --deb | --de | --d | -d )
49235    debug=: ;;
49236  --file | --fil | --fi | --f )
49237    $ac_shift
49238    case $ac_optarg in
49239    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49240    '') as_fn_error $? "missing file argument" ;;
49241    esac
49242    as_fn_append CONFIG_FILES " '$ac_optarg'"
49243    ac_need_defaults=false;;
49244  --header | --heade | --head | --hea )
49245    $ac_shift
49246    case $ac_optarg in
49247    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49248    esac
49249    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49250    ac_need_defaults=false;;
49251  --he | --h)
49252    # Conflict between --help and --header
49253    as_fn_error $? "ambiguous option: \`$1'
49254Try \`$0 --help' for more information.";;
49255  --help | --hel | -h )
49256    $as_echo "$ac_cs_usage"; exit ;;
49257  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49258  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49259    ac_cs_silent=: ;;
49260
49261  # This is an error.
49262  -*) as_fn_error $? "unrecognized option: \`$1'
49263Try \`$0 --help' for more information." ;;
49264
49265  *) as_fn_append ac_config_targets " $1"
49266     ac_need_defaults=false ;;
49267
49268  esac
49269  shift
49270done
49271
49272ac_configure_extra_args=
49273
49274if $ac_cs_silent; then
49275  exec 6>/dev/null
49276  ac_configure_extra_args="$ac_configure_extra_args --silent"
49277fi
49278
49279_ACEOF
49280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49281if \$ac_cs_recheck; then
49282  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49283  shift
49284  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49285  CONFIG_SHELL='$SHELL'
49286  export CONFIG_SHELL
49287  exec "\$@"
49288fi
49289
49290_ACEOF
49291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49292exec 5>>config.log
49293{
49294  echo
49295  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49296## Running $as_me. ##
49297_ASBOX
49298  $as_echo "$ac_log"
49299} >&5
49300
49301_ACEOF
49302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49303_ACEOF
49304
49305cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49306
49307# Handling of arguments.
49308for ac_config_target in $ac_config_targets
49309do
49310  case $ac_config_target in
49311    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49312    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49313    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49314    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49315    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49316    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49317    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49318
49319  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49320  esac
49321done
49322
49323
49324# If the user did not use the arguments to specify the items to instantiate,
49325# then the envvar interface is used.  Set only those that are not.
49326# We use the long form for the default assignment because of an extremely
49327# bizarre bug on SunOS 4.1.3.
49328if $ac_need_defaults; then
49329  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49330  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49331fi
49332
49333# Have a temporary directory for convenience.  Make it in the build tree
49334# simply because there is no reason against having it here, and in addition,
49335# creating and moving files from /tmp can sometimes cause problems.
49336# Hook for its removal unless debugging.
49337# Note that there is a small window in which the directory will not be cleaned:
49338# after its creation but before its name has been assigned to `$tmp'.
49339$debug ||
49340{
49341  tmp= ac_tmp=
49342  trap 'exit_status=$?
49343  : "${ac_tmp:=$tmp}"
49344  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49345' 0
49346  trap 'as_fn_exit 1' 1 2 13 15
49347}
49348# Create a (secure) tmp directory for tmp files.
49349
49350{
49351  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49352  test -d "$tmp"
49353}  ||
49354{
49355  tmp=./conf$$-$RANDOM
49356  (umask 077 && mkdir "$tmp")
49357} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49358ac_tmp=$tmp
49359
49360# Set up the scripts for CONFIG_FILES section.
49361# No need to generate them if there are no CONFIG_FILES.
49362# This happens for instance with `./config.status config.h'.
49363if test -n "$CONFIG_FILES"; then
49364
49365
49366ac_cr=`echo X | tr X '\015'`
49367# On cygwin, bash can eat \r inside `` if the user requested igncr.
49368# But we know of no other shell where ac_cr would be empty at this
49369# point, so we can use a bashism as a fallback.
49370if test "x$ac_cr" = x; then
49371  eval ac_cr=\$\'\\r\'
49372fi
49373ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49374if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49375  ac_cs_awk_cr='\\r'
49376else
49377  ac_cs_awk_cr=$ac_cr
49378fi
49379
49380echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49381_ACEOF
49382
49383
49384{
49385  echo "cat >conf$$subs.awk <<_ACEOF" &&
49386  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49387  echo "_ACEOF"
49388} >conf$$subs.sh ||
49389  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49390ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49391ac_delim='%!_!# '
49392for ac_last_try in false false false false false :; do
49393  . ./conf$$subs.sh ||
49394    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49395
49396  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49397  if test $ac_delim_n = $ac_delim_num; then
49398    break
49399  elif $ac_last_try; then
49400    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49401  else
49402    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49403  fi
49404done
49405rm -f conf$$subs.sh
49406
49407cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49408cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49409_ACEOF
49410sed -n '
49411h
49412s/^/S["/; s/!.*/"]=/
49413p
49414g
49415s/^[^!]*!//
49416:repl
49417t repl
49418s/'"$ac_delim"'$//
49419t delim
49420:nl
49421h
49422s/\(.\{148\}\)..*/\1/
49423t more1
49424s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49425p
49426n
49427b repl
49428:more1
49429s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49430p
49431g
49432s/.\{148\}//
49433t nl
49434:delim
49435h
49436s/\(.\{148\}\)..*/\1/
49437t more2
49438s/["\\]/\\&/g; s/^/"/; s/$/"/
49439p
49440b
49441:more2
49442s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49443p
49444g
49445s/.\{148\}//
49446t delim
49447' <conf$$subs.awk | sed '
49448/^[^""]/{
49449  N
49450  s/\n//
49451}
49452' >>$CONFIG_STATUS || ac_write_fail=1
49453rm -f conf$$subs.awk
49454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49455_ACAWK
49456cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49457  for (key in S) S_is_set[key] = 1
49458  FS = ""
49459
49460}
49461{
49462  line = $ 0
49463  nfields = split(line, field, "@")
49464  substed = 0
49465  len = length(field[1])
49466  for (i = 2; i < nfields; i++) {
49467    key = field[i]
49468    keylen = length(key)
49469    if (S_is_set[key]) {
49470      value = S[key]
49471      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49472      len += length(value) + length(field[++i])
49473      substed = 1
49474    } else
49475      len += 1 + keylen
49476  }
49477
49478  print line
49479}
49480
49481_ACAWK
49482_ACEOF
49483cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49484if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49485  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49486else
49487  cat
49488fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49489  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49490_ACEOF
49491
49492# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49493# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49494# trailing colons and then remove the whole line if VPATH becomes empty
49495# (actually we leave an empty line to preserve line numbers).
49496if test "x$srcdir" = x.; then
49497  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49498h
49499s///
49500s/^/:/
49501s/[	 ]*$/:/
49502s/:\$(srcdir):/:/g
49503s/:\${srcdir}:/:/g
49504s/:@srcdir@:/:/g
49505s/^:*//
49506s/:*$//
49507x
49508s/\(=[	 ]*\).*/\1/
49509G
49510s/\n//
49511s/^[^=]*=[	 ]*$//
49512}'
49513fi
49514
49515cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49516fi # test -n "$CONFIG_FILES"
49517
49518# Set up the scripts for CONFIG_HEADERS section.
49519# No need to generate them if there are no CONFIG_HEADERS.
49520# This happens for instance with `./config.status Makefile'.
49521if test -n "$CONFIG_HEADERS"; then
49522cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49523BEGIN {
49524_ACEOF
49525
49526# Transform confdefs.h into an awk script `defines.awk', embedded as
49527# here-document in config.status, that substitutes the proper values into
49528# config.h.in to produce config.h.
49529
49530# Create a delimiter string that does not exist in confdefs.h, to ease
49531# handling of long lines.
49532ac_delim='%!_!# '
49533for ac_last_try in false false :; do
49534  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49535  if test -z "$ac_tt"; then
49536    break
49537  elif $ac_last_try; then
49538    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49539  else
49540    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49541  fi
49542done
49543
49544# For the awk script, D is an array of macro values keyed by name,
49545# likewise P contains macro parameters if any.  Preserve backslash
49546# newline sequences.
49547
49548ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49549sed -n '
49550s/.\{148\}/&'"$ac_delim"'/g
49551t rset
49552:rset
49553s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49554t def
49555d
49556:def
49557s/\\$//
49558t bsnl
49559s/["\\]/\\&/g
49560s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49561D["\1"]=" \3"/p
49562s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49563d
49564:bsnl
49565s/["\\]/\\&/g
49566s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49567D["\1"]=" \3\\\\\\n"\\/p
49568t cont
49569s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49570t cont
49571d
49572:cont
49573n
49574s/.\{148\}/&'"$ac_delim"'/g
49575t clear
49576:clear
49577s/\\$//
49578t bsnlc
49579s/["\\]/\\&/g; s/^/"/; s/$/"/p
49580d
49581:bsnlc
49582s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49583b cont
49584' <confdefs.h | sed '
49585s/'"$ac_delim"'/"\\\
49586"/g' >>$CONFIG_STATUS || ac_write_fail=1
49587
49588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49589  for (key in D) D_is_set[key] = 1
49590  FS = ""
49591}
49592/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49593  line = \$ 0
49594  split(line, arg, " ")
49595  if (arg[1] == "#") {
49596    defundef = arg[2]
49597    mac1 = arg[3]
49598  } else {
49599    defundef = substr(arg[1], 2)
49600    mac1 = arg[2]
49601  }
49602  split(mac1, mac2, "(") #)
49603  macro = mac2[1]
49604  prefix = substr(line, 1, index(line, defundef) - 1)
49605  if (D_is_set[macro]) {
49606    # Preserve the white space surrounding the "#".
49607    print prefix "define", macro P[macro] D[macro]
49608    next
49609  } else {
49610    # Replace #undef with comments.  This is necessary, for example,
49611    # in the case of _POSIX_SOURCE, which is predefined and required
49612    # on some systems where configure will not decide to define it.
49613    if (defundef == "undef") {
49614      print "/*", prefix defundef, macro, "*/"
49615      next
49616    }
49617  }
49618}
49619{ print }
49620_ACAWK
49621_ACEOF
49622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49623  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49624fi # test -n "$CONFIG_HEADERS"
49625
49626
49627eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49628shift
49629for ac_tag
49630do
49631  case $ac_tag in
49632  :[FHLC]) ac_mode=$ac_tag; continue;;
49633  esac
49634  case $ac_mode$ac_tag in
49635  :[FHL]*:*);;
49636  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49637  :[FH]-) ac_tag=-:-;;
49638  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49639  esac
49640  ac_save_IFS=$IFS
49641  IFS=:
49642  set x $ac_tag
49643  IFS=$ac_save_IFS
49644  shift
49645  ac_file=$1
49646  shift
49647
49648  case $ac_mode in
49649  :L) ac_source=$1;;
49650  :[FH])
49651    ac_file_inputs=
49652    for ac_f
49653    do
49654      case $ac_f in
49655      -) ac_f="$ac_tmp/stdin";;
49656      *) # Look for the file first in the build tree, then in the source tree
49657	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49658	 # because $ac_f cannot contain `:'.
49659	 test -f "$ac_f" ||
49660	   case $ac_f in
49661	   [\\/$]*) false;;
49662	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49663	   esac ||
49664	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49665      esac
49666      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49667      as_fn_append ac_file_inputs " '$ac_f'"
49668    done
49669
49670    # Let's still pretend it is `configure' which instantiates (i.e., don't
49671    # use $as_me), people would be surprised to read:
49672    #    /* config.h.  Generated by config.status.  */
49673    configure_input='Generated from '`
49674	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49675	`' by configure.'
49676    if test x"$ac_file" != x-; then
49677      configure_input="$ac_file.  $configure_input"
49678      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49679$as_echo "$as_me: creating $ac_file" >&6;}
49680    fi
49681    # Neutralize special characters interpreted by sed in replacement strings.
49682    case $configure_input in #(
49683    *\&* | *\|* | *\\* )
49684       ac_sed_conf_input=`$as_echo "$configure_input" |
49685       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49686    *) ac_sed_conf_input=$configure_input;;
49687    esac
49688
49689    case $ac_tag in
49690    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49691      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49692    esac
49693    ;;
49694  esac
49695
49696  ac_dir=`$as_dirname -- "$ac_file" ||
49697$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49698	 X"$ac_file" : 'X\(//\)[^/]' \| \
49699	 X"$ac_file" : 'X\(//\)$' \| \
49700	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49701$as_echo X"$ac_file" |
49702    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49703	    s//\1/
49704	    q
49705	  }
49706	  /^X\(\/\/\)[^/].*/{
49707	    s//\1/
49708	    q
49709	  }
49710	  /^X\(\/\/\)$/{
49711	    s//\1/
49712	    q
49713	  }
49714	  /^X\(\/\).*/{
49715	    s//\1/
49716	    q
49717	  }
49718	  s/.*/./; q'`
49719  as_dir="$ac_dir"; as_fn_mkdir_p
49720  ac_builddir=.
49721
49722case "$ac_dir" in
49723.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49724*)
49725  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49726  # A ".." for each directory in $ac_dir_suffix.
49727  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49728  case $ac_top_builddir_sub in
49729  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49730  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49731  esac ;;
49732esac
49733ac_abs_top_builddir=$ac_pwd
49734ac_abs_builddir=$ac_pwd$ac_dir_suffix
49735# for backward compatibility:
49736ac_top_builddir=$ac_top_build_prefix
49737
49738case $srcdir in
49739  .)  # We are building in place.
49740    ac_srcdir=.
49741    ac_top_srcdir=$ac_top_builddir_sub
49742    ac_abs_top_srcdir=$ac_pwd ;;
49743  [\\/]* | ?:[\\/]* )  # Absolute name.
49744    ac_srcdir=$srcdir$ac_dir_suffix;
49745    ac_top_srcdir=$srcdir
49746    ac_abs_top_srcdir=$srcdir ;;
49747  *) # Relative name.
49748    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49749    ac_top_srcdir=$ac_top_build_prefix$srcdir
49750    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49751esac
49752ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49753
49754
49755  case $ac_mode in
49756  :F)
49757  #
49758  # CONFIG_FILE
49759  #
49760
49761_ACEOF
49762
49763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49764# If the template does not know about datarootdir, expand it.
49765# FIXME: This hack should be removed a few years after 2.60.
49766ac_datarootdir_hack=; ac_datarootdir_seen=
49767ac_sed_dataroot='
49768/datarootdir/ {
49769  p
49770  q
49771}
49772/@datadir@/p
49773/@docdir@/p
49774/@infodir@/p
49775/@localedir@/p
49776/@mandir@/p'
49777case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49778*datarootdir*) ac_datarootdir_seen=yes;;
49779*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49780  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49781$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49782_ACEOF
49783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49784  ac_datarootdir_hack='
49785  s&@datadir@&$datadir&g
49786  s&@docdir@&$docdir&g
49787  s&@infodir@&$infodir&g
49788  s&@localedir@&$localedir&g
49789  s&@mandir@&$mandir&g
49790  s&\\\${datarootdir}&$datarootdir&g' ;;
49791esac
49792_ACEOF
49793
49794# Neutralize VPATH when `$srcdir' = `.'.
49795# Shell code in configure.ac might set extrasub.
49796# FIXME: do we really want to maintain this feature?
49797cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49798ac_sed_extra="$ac_vpsub
49799$extrasub
49800_ACEOF
49801cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49802:t
49803/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49804s|@configure_input@|$ac_sed_conf_input|;t t
49805s&@top_builddir@&$ac_top_builddir_sub&;t t
49806s&@top_build_prefix@&$ac_top_build_prefix&;t t
49807s&@srcdir@&$ac_srcdir&;t t
49808s&@abs_srcdir@&$ac_abs_srcdir&;t t
49809s&@top_srcdir@&$ac_top_srcdir&;t t
49810s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49811s&@builddir@&$ac_builddir&;t t
49812s&@abs_builddir@&$ac_abs_builddir&;t t
49813s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49814$ac_datarootdir_hack
49815"
49816eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49817  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49818
49819test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49820  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49821  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49822      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49823  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49824which seems to be undefined.  Please make sure it is defined" >&5
49825$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49826which seems to be undefined.  Please make sure it is defined" >&2;}
49827
49828  rm -f "$ac_tmp/stdin"
49829  case $ac_file in
49830  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49831  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49832  esac \
49833  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49834 ;;
49835  :H)
49836  #
49837  # CONFIG_HEADER
49838  #
49839  if test x"$ac_file" != x-; then
49840    {
49841      $as_echo "/* $configure_input  */" \
49842      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49843    } >"$ac_tmp/config.h" \
49844      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49845    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49846      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49847$as_echo "$as_me: $ac_file is unchanged" >&6;}
49848    else
49849      rm -f "$ac_file"
49850      mv "$ac_tmp/config.h" "$ac_file" \
49851	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49852    fi
49853  else
49854    $as_echo "/* $configure_input  */" \
49855      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49856      || as_fn_error $? "could not create -" "$LINENO" 5
49857  fi
49858 ;;
49859
49860
49861  esac
49862
49863done # for ac_tag
49864
49865
49866as_fn_exit 0
49867_ACEOF
49868ac_clean_files=$ac_clean_files_save
49869
49870test $ac_write_fail = 0 ||
49871  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49872
49873
49874# configure is writing to config.log, and then calls config.status.
49875# config.status does its own redirection, appending to config.log.
49876# Unfortunately, on DOS this fails, as config.log is still kept open
49877# by configure, so config.status won't be able to write to it; its
49878# output is simply discarded.  So we exec the FD to /dev/null,
49879# effectively closing config.log, so it can be properly (re)opened and
49880# appended to by config.status.  When coming back to configure, we
49881# need to make the FD available again.
49882if test "$no_create" != yes; then
49883  ac_cs_success=:
49884  ac_config_status_args=
49885  test "$silent" = yes &&
49886    ac_config_status_args="$ac_config_status_args --quiet"
49887  exec 5>/dev/null
49888  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49889  exec 5>>config.log
49890  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49891  # would make configure fail if this is the last instruction.
49892  $ac_cs_success || as_fn_exit 1
49893fi
49894if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49895  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49896$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49897fi
49898
49899
49900# Try to move the config.log file to the output directory.
49901if test -e ./config.log; then
49902  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49903fi
49904
49905# Make the compare script executable
49906$CHMOD +x $OUTPUT_ROOT/compare.sh
49907
49908# Finally output some useful information to the user
49909
49910  # Finally output some useful information to the user
49911
49912  printf "\n"
49913  printf "====================================================\n"
49914  printf "A new configuration has been successfully created in\n"
49915  printf "$OUTPUT_ROOT\n"
49916  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49917    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49918  else
49919    printf "using default settings.\n"
49920  fi
49921
49922  printf "\n"
49923  printf "Configuration summary:\n"
49924  printf "* Debug level:    $DEBUG_LEVEL\n"
49925  printf "* JDK variant:    $JDK_VARIANT\n"
49926  printf "* JVM variants:   $with_jvm_variants\n"
49927  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49928
49929  printf "\n"
49930  printf "Tools summary:\n"
49931  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49932    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49933  fi
49934  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49935  printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
49936  printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
49937
49938  printf "\n"
49939  printf "Build performance summary:\n"
49940  printf "* Cores to use:   $JOBS\n"
49941  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49942  if test "x$CCACHE_STATUS" != "x"; then
49943    printf "* ccache status:  $CCACHE_STATUS\n"
49944  fi
49945  printf "\n"
49946
49947  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49948    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49949    printf "will result in longer build times.\n"
49950    printf "\n"
49951  fi
49952
49953  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49954    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49955    printf "These are not respected, and will be ignored. It is recommended\n"
49956    printf "that you clean your environment. The following variables are set:\n"
49957    printf "$FOUND_ALT_VARIABLES\n"
49958    printf "\n"
49959  fi
49960
49961  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49962    printf "WARNING: Your build output directory is not on a local disk.\n"
49963    printf "This will severely degrade build performance!\n"
49964    printf "It is recommended that you create an output directory on a local disk,\n"
49965    printf "and run the configure script again from that directory.\n"
49966    printf "\n"
49967  fi
49968
49969  if test "x$IS_RECONFIGURE" = "xyes"; then
49970    printf "WARNING: The result of this configuration has overridden an older\n"
49971    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
49972    printf "proper build. Failure to do so might result in strange build problems.\n"
49973    printf "\n"
49974  fi
49975
49976